Skip to content

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

@mk-conn

Description

@mk-conn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions