rednotebook icon indicating copy to clipboard operation
rednotebook copied to clipboard

Search for multiple words

Open jendrikseipp opened this issue 7 years ago • 5 comments

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 avatar Mar 20 '17 16:03 jendrikseipp

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 avatar Mar 20 '17 16:03 jendrikseipp

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


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

jendrikseipp avatar Mar 20 '17 16:03 jendrikseipp

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 avatar Mar 20 '17 16:03 jendrikseipp

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


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

jendrikseipp avatar Mar 20 '17 16:03 jendrikseipp

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

jendrikseipp avatar Nov 02 '19 09:11 jendrikseipp

We're working on this feature in #558.

jendrikseipp avatar Dec 29 '22 21:12 jendrikseipp

Duplicate of #564.

jendrikseipp avatar Dec 29 '22 22:12 jendrikseipp