RFI / Bulk Option to Convert Leads into Targets?

I know this is an odd request since standard operating procedure is to convert/promote a Target into a Lead, however I think we picked up some bad advice when we first deployed our system back in 2018 and we would like to migrate substantially all of our 1,400 “Leads” into “Targets” in order to clean things up.

I’m super adept at SQL and if the worst case is to do a SELECT INTO I’m down to clown.

Looks like I can EXPORT all Leads and then try and IMPORT them in.

Also:

  1. why is the underlying table called “prospects” ?
  2. why is it not apparently being index so that records are available in search?

Getting the following errors dumped out with any import:

NOTICE: [8] Uninitialized string offset: 0 on line 156 in file /www/SuiteCRM-7.10.10/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Storage/File.php
NOTICE: [8] Uninitialized string offset: 1 on line 157 in file /www/SuiteCRM-7.10.10/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Storage/File.php
NOTICE: [8] Uninitialized string offset: 2 on line 158 in file /www/SuiteCRM-7.10.10/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Storage/File.php

Either an SQL statement, or an Export followed by Import sound like good options.

It was called Prospects in the past. So it’s just a historical left-over from SugarCRM days.

I don’t know about your import errors… you’d have to find a way to fix them or work around them. Meanwhile that might be a good reason to turn to SQL.

Any thoughts on why Targets do not show up in system Search?

The errors you have seem to be related to Search (Lucene)…

A useful diagnostic could be trying a different PHP version, an older one as long as it is supported in the matrix:

I’m using 7.4 for php

FWIW, just found the Search Settings option :wink:

I think there are configurations to include or exclude modules from search, but I am not sure where (code? UI?), you’ll have to search the Forums…

I found the Search settings and added the module to the enabled list, but will need to figure out how to trigger some re-indexing or try re-importing again

1 Like

Reindexing should be automatic.

Some people use a workflow for “all records” to change some field in each record, causing it to run the indexer. (make sure your workflow runs only once, and off business hours)

Or you can go for full reindex:

No joy on indexing of Targets and I found and tried that “Reindexing AOD Search” link did not work, so i rolled everything back.

I’m looking at installing Lucene or Elasticsearch

SUCCESS! By installing ElasticSearch 7.x

Amusing that it calls it “Prospects” :wink:

Please let me know exactly what didn’t work in the link to my blog post, so I can fix it or update it.

Are your Scheduler jobs running? In Admin / Scheduler jobs, check that these two jobs show a “last ran successfully” that is a recent time:

“Optimise AOD Index”
“Perform Lucene Index”

Yes the scheduler jobs were running – at least the last run dtstamp was getting updated – just no activity visible in the /Index/Index directory and in fact it looks like it has not done anything in years:

root@crm:/www/suitecrm/modules/AOD_Index/Index/Index# ls -alt
total 2388
-rw-rw-rw- 1 www-data www-data       0 Mar 16 16:04 read.lock.file
drwxr-xr-x 2 www-data www-data  126976 Jan 15  2021 .
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcem_t.del
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcem_u.del
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcfe.sti
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcff.cfs
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcfg.fdt
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcfg.fdx
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 optimization.lock.file
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 read-lock-processing.lock.file
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 segments_buna0
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 segments_buna1
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 segments_buna2
-rw-rw-rw- 1 www-data www-data      20 Jan 15  2021 segments.gen
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 write.lock.file
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcem_p.del
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcem_q.del
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcem_r.del
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcem_s.del
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcf9.sti
-rw-rw-rw- 1 www-data www-data       0 Jan 15  2021 _5xcfa.cfs

You should really try and fix that.

Maybve a full reindex is needed.

But I would start by trying to move all those lock files into a different directory, see if that gets the automatic indexing to work.

I tried deleting the lock files first, and then tripping off the reindex and then the whole directory over per your instructions and- it never recreated the directory, so i created it and tried again and never saw any evidence that it was creating files in it so i just moved it back and restored the database

Often the indexing fails simply because of file permissions, it is unable to create directories.

But I find it strange that there ano errors in any of the two logs.

Maybe there’s an on/off switch for Elastic Search somewhere, and yours is turned off?

I literally JUST installed Elastic yesterday when it was evident that the internal indexing system was not functioning correctly (eg, not indexing the Targets / Prospects table)

Sorry, my bad, I confused Lucene with Elastic, they’re different things. I think Lucene works, if you can get around the problems.

But if you were able to get Elastic up and running, which is something not everybody less-technical can achieve, you now have a much more modern and better system, so… :cool: :sunglasses:

1 Like