jDiction Forum

English => Extensions and jDiction => Topic started by: nkt on June 13, 2017, 07:14:07 am

Title: Solution: JDiction not indexing articles correct for com_finder (smart search)
Post by: nkt on June 13, 2017, 07:14:07 am
Hi all,

Unfortunately jDiction isn't indexing all the articles when multiple languages are configured and the total amount of articles is higher than the batch size of the indexer. However I created a solution for this problem, simply replace /ROOT/libraries/jdiction/finder/adapter.php with the attached file and your indexer will index all the articles in a correct manner.

Technical details: Not all articles are indexed. This is because the indexer increases the offset for the getItems query for every indexed article. This means that every article that is indexed the offset of the MySQL query for all languages increases, therefore skipping articles. This was temporary solved by dividing the offset by 2, however this means that a lot of articles will get indexed twice. This increases the indexed article counter, while no new articles are actually added. This results in not enough index iterations (batches) to index all articles since the amount of indexations is not equal to the amount of uniquely added articles, because some articles are indexed twice. Eventually this leads to a premature stop of the indexation. This problem is solved by adding an counter/offset per language which I have added in the attached file. See comments in attached file for explanation of the code.

@Harald: can you update jDiction so this improvement is included?

Greetz,
Nick
Title: Re: Solution: JDiction not indexing articles correct for com_finder (smart search)
Post by: Harald Leithner on June 16, 2017, 05:34:58 pm
Thank you very much for you contribution I will check it and try to include it in the next release.
Title: Re: Solution: JDiction not indexing articles correct for com_finder (smart search)
Post by: Harald Leithner on December 04, 2017, 09:09:42 pm
Hi,

so the last release didn't include you fix but the upcoming will. Would you like to test if its working correct?

http://update.jdiction.org/packages/pkg_jdiction/git/plg_jdiction-2.1.1-git.c87142e.zip

This also includes the better export function, if you want to test this too.