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

Search for multiple words #180

Closed
jendrikseipp opened this issue Mar 20, 2017 · 7 comments
Closed

Search for multiple words #180

jendrikseipp opened this issue Mar 20, 2017 · 7 comments

Comments

@jendrikseipp
Copy link
Owner

jendrikseipp commented Mar 20, 2017

Originally reported by jendrikseipp at https://bugs.launchpad.net/bugs/1161130 (2013-03-27T22:18:49Z):


It would be nice if RedNotebook could do an AND search for multiple words, i.e. the search for "Linux journal" should return all days containing both words.

Note that an implementation has to highlight the found words separately in the day contents.

@jendrikseipp
Copy link
Owner Author

Original comment by clcyrot (2013-11-28T16:31:56Z):


I share this request ! It would be very useful in every day use.
Thank you.

@jendrikseipp
Copy link
Owner Author

Original comment by michael-j-hays (2016-02-17T08:27:14Z):


I also would like this feature, for narrowing down search results. Thanks.

@jendrikseipp
Copy link
Owner Author

Original comment by biffster (2016-02-28T20:17:59Z):


I am not a coder, so I would not be much help in solving this. However, I recommend incorporating Matt Chaput's Whoosh python package - https://pypi.python.org/pypi/Whoosh/ - to do the actual searching. Per the Whoosh documentation:

It lets you connect terms with AND or OR, eleminate terms with NOT, group terms together into clauses with parentheses, do range, prefix, and wilcard queries, and specify different fields to search.

You could let Whoosh handle all of the search logic, and then focus on the rest of your code.

@jendrikseipp
Copy link
Owner Author

Original comment by jendrikseipp (2016-02-29T12:58:40Z):


I agree that whoosh seems to be the best solution for this.

@jendrikseipp
Copy link
Owner Author

I think a simple solution should be sufficient: split the query by whitespace and return the days that contain all searched words.

@jendrikseipp
Copy link
Owner Author

We're working on this feature in #558.

@jendrikseipp
Copy link
Owner Author

Duplicate of #564.

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

No branches or pull requests

1 participant