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

whoosh_seach multi words?? #51

Closed
ghost opened this issue Aug 30, 2016 · 1 comment
Closed

whoosh_seach multi words?? #51

ghost opened this issue Aug 30, 2016 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Aug 30, 2016

now I can search with
results = BlogPost.query.whoosh_search('cool')

but what if I want to search multi words at the same time??? like
results = BlogPost.query.whoosh_search('cool', 'happy', 'smile')

Is this supported??

@dhamaniasad
Copy link
Collaborator

From the docs:

results = BlogPost.query.whoosh_search('cool', or_=True)

If you do whoosh_seach("cool happy smile"), by default it will look for documents where all the three words are present. If you set or_=True, you will instead use the OR grouping.

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

1 participant