Skip to content

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

Description

@neongrau

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))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions