Feature #38435
closed
"contains any of" operator for text filters to perform OR search of multiple terms
Added by Go MAEDA over 1 year ago.
Updated over 1 year ago.
Description
The attached patch adds a new operator "contains any of" for string/text filters and "Any searchable text" filter introduced by #38402. With this new operator, you can perform an OR search with multiple terms specified in single filter.
For example, if you choose the "Subject" filter and specify the "contains any of" operator and give "close block" as the value, issues containing either "close" or "block" in the subject will be displayed.
I believe this new OR search support in addition to the AND search added in Redmine 5.0 (#35764) will make Redmine's query system even more powerful.
Files
I think there should be a way to search also by multiple multi-word phrases. For example issues with "closed issue" or "closed version".
Robert Korulczyk wrote in #note-1:
I think there should be a way to search also by multiple multi-word phrases. For example issues with "closed issue" or "closed version".
Thank you for your comment. Due to the behavior of Redmine::Search::Tokenizer#tokens
, the new filter does not support multiple quoted strings. This is the same with the search box in the upper right corner and the existing "contains" filter.
Redmine::Search::Tokenizer.new(%q|"closed issue" "closed version"|).tokens
=> ["closed issue", "closed", "version"]
I agree with improving Redmine::Search::Tokenizer#token
to support multiple quoted strings, I think this should be discussed independently of this new "contains any of" filter. I have just opened #38446 for this improvement.
- Target version set to 5.1.0
Setting the target version to 5.1.0.
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
- Related to Feature #38446: Support multiple multi-word phrases in the search engine added
Also available in: Atom
PDF