jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  


jDiction 2.0.1 released. http://jdiction.org/downloads

Author Topic: Solution: JDiction not indexing articles correct for com_finder (smart search)  (Read 155 times)


  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Flantic

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?

« Last Edit: June 13, 2017, 07:15:45 am by nkt »

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1561
    • View Profile

Thank you very much for you contribution I will check it and try to include it in the next release.