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

basic non relevant search is using the wrong query logic with more than 1 search term #145

Open
neongrau opened this issue Dec 11, 2023 · 0 comments
Labels

Comments

@neongrau
Copy link

Aassuming you have addition filter criteria before full_text_search.

Then you get a query that combines the first term into the your previous criteria $and a global requirement for any further keywords. So this will need different indexes when using either a single term vs many terms search.

While this case should actually be Mymodel.some_criteria.where(:_keywords.all => Mongoid::Search::Util.normalize_keywords(term))

@dblock dblock added the Bug label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants