Project

General

Profile

Actions

Feature #38435

closed

"contains any of" operator for text filters to perform OR search of multiple terms

Added by Go MAEDA about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Filters
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

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

Actions #1

Updated by Robert Korulczyk about 1 year ago

I think there should be a way to search also by multiple multi-word phrases. For example issues with "closed issue" or "closed version".

Actions #2

Updated by Go MAEDA about 1 year ago

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.

Actions #3

Updated by Go MAEDA about 1 year ago

  • Target version set to 5.1.0

Setting the target version to 5.1.0.

Actions #4

Updated by Go MAEDA about 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch.

Actions

Also available in: Atom PDF