Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When search term is part of different words in the index wordlist, only first matching is returned #336

Open
mk-conn opened this issue May 4, 2022 · 0 comments

Comments

@mk-conn
Copy link

mk-conn commented May 4, 2022

Hey,

Lets have a look at this case:

  • there are several documents about java, javascript etc..
  • the wordlist table in the search index sqlite has the terms 'java', 'javascript', 'javase' , 'java-interview'
  • asYouType is enabled
  • a user is searching for 'java' and expects to get results for 'java', 'javascript' , etc...

Only search results for 'java' are returned because TNTSearch::getWordlistByKeyword only returns 'java' because of SELECT * FROM wordlist WHERE term like :keyword ORDER BY length(term) ASC, num_hits DESC LIMIT 1 (l. 308) --> is this by mistake or by intention? In my opinion, when asYouType is enabled the wordlist returned should contain all the words starting with 'java', so the LIMIT 1 could be removed?

@mk-conn mk-conn changed the title When search term is part of different words only first part is matched When search term is part of different words in the index wordlist, only first matching is returned May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant