Page 1 of 1

Search result is not full

PostPosted: Wed Feb 07, 2018 7:43 pm
by Bidouille
Hello,

If I try a search with https://forum.openoffice.org/en/forum/s ... ked+unknow
It results only one thread.
With a search engine, we have more:
https://www.qwant.com/?q=unknow+locked+ ... .org%2Fen&

Maybe a database reindex solve it

Re: Search result is not full

PostPosted: Wed Feb 07, 2018 11:49 pm
by RusselB
The first search is looking for the specific term "unknow" (without the quotation marks)
The second search is presuming that the search term should have a wildcard character at the end of the term. eg: unknow becomes unknow*, which matches the term unknow (as specified) and the term unknown (as matched with the wildcard)

Re: Search result is not full

PostPosted: Wed Feb 07, 2018 11:55 pm
by Hagar Delest
Good catch!
I've relaunched the search index (414525 words) few minutes ago, Will see if there is any difference. But I guess not at all.

Re: Search result is not full

PostPosted: Thu Feb 08, 2018 1:11 am
by robleyd
Seems to be two results now including this topic :-)

Re: Search result is not full

PostPosted: Thu Feb 08, 2018 2:21 am
by RusselB
Since there appears to be a bit more than an hour from when Hagar relaunched the search index and Robleyd's post, I'm having to wonder if my earlier post isn't the actual problem.
Namely a non-wildcard search on the forum vs. A wildcard search using the 3rd party (website) search

Re: Search result is not full

PostPosted: Thu Feb 08, 2018 2:51 am
by robleyd
The evidence so far suggests you are correct RusselB. Having obviously too much time on my hands, I'm going to have a scratch through the source of phpBB and see if I can get a definitive answer.

 Edit: Seems my php skills have degraded from lack of use - didn't get an answer :-) 

Re: Search result is not full

PostPosted: Thu Feb 08, 2018 6:26 am
by robleyd
Update: after applying a few more brain cells to the problem, I have a result.

Short answer - the search is for the actual word only.

Long answer: phpBB uses a table of words to store the words in posts and the count of those words. When a search is requested, the SQL query is thus (for the example search above):

Code: Select all   Expand viewCollapse view
SELECT word_id, word_text, word_common
FROM phpbb_search_wordlist
WHERE word_text IN ('locked', 'unknow')
ORDER BY word_count ASC


The query result from that is then used with other queries to build the search result page information.