Searching for article titles delivers irregular results

We are running into a strange search problem on OJS 2.4.5 (shared hosting): When searching for some article titles as they are displayed in the table of contents, there are no results. However, when we remove some (random) word from the query string, the article is found. After a few tests, I couldn’t narrow it down to special characters, quotation marks etc. in the titles.

Example:

  • title in OJS is: Bedeutungsebenen der rekonstruierten Altstadt von Wrocław
  • unsuccessful search query: Bedeutungsebenen der rekonstruierten Altstadt von Wrocław (same as the title)
  • successfull search query: Bedeutungsebenen rekonstruierten Wrocław

The journal is a huge retrodigitization project, about 3600 articles with pdf galleys have been imported into the database. Could this issue be related to the large database or a problem with ignoring the common words? Thanks for any ideas!

Hi @ojsbsb,

I’d suggest starting by regenerating your search index, in case that’s the problem. Run…

php tools/rebuildSearchIndex.php

This may take a while. Once that’s done, try testing again, and then you may have to do some database exploration.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

thank you, but this is already the second version of the index, after the first index regeneration still showed problems. The problem only seems to move, but not disappear.

Can you give me a hint what to look for in the tables? I made myself a little bit familiar with the way OJS stores search keywords and links information across the tables. Could you maybe point me to the SQL query which OJS does for each search, so that I can run it manually to check whether it really is a database problem? I already searched the codebase in GitHub myself, but I am not sure I found the right fiiles.

Hi @ojsbsb,

To determine what query OJS is using to fetch something, try turning on the “Debug” option in config.inc.php. This will cause SQL statements to be dumped to the browser for all users, so turn it on only briefly, load the page you want to debug, then turn it off again immediately.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks! We found the problem (quite some time ago already, sorry for the late reply): The value results_per_keyword was set to 500, which was apparently too low. It is now on 5000, which makes everything work fine.

1 Like