Project

General

Profile

Actions

Feature #38446

closed

Support multiple multi-word phrases in the search engine

Feature #38446: Support multiple multi-word phrases in the search engine

Added by Go MAEDA over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search engine
Target version:
Resolution:
Fixed

Description

Currently, the search engine does not support multiple multi-word phrases.

For example, we cannot search objects that contain two phrases "closed issue" and "closed version". If you give a search string "closed issue" "closed version", the search engine search for objects containing three strings "closed issue", "closed", and "version". This is due to the behavior of Redmine::Search::Tokenizer#tokens.

Redmine::Search::Tokenizer.new(%q|"closed issue" "closed version"|).tokens
=> ["closed issue", "closed", "version"]

If the Tokenizer returns two tokens, "closed issue" and "closed version" for the same input, it will be possible to search for multiple multi-word phrases.


Files

38446.patch (1.51 KB) 38446.patch Go MAEDA, 2024-04-29 04:28
38446-v2.patch (1.53 KB) 38446-v2.patch Go MAEDA, 2024-04-30 10:14

Related issues 1 (0 open — 1 closed)

Related to Redmine - Feature #38435: "contains any of" operator for text filters to perform OR search of multiple termsClosedGo MAEDAActions

Updated by Go MAEDA over 2 years ago Actions #1

I am submitting a patch for this issue, which enhances the tokenizer's ability to handle multiple quoted phrases.

Updated by Go MAEDA over 2 years ago Actions #2

Updated the patch.

  • In the regular expressions, changed [:space:] to \p{Zs} which does not match with TAB, CR, and LF
  • Improved the regular expression for gsub.

Updated by Go MAEDA over 2 years ago Actions #3

  • Target version set to Candidate for next major release

Updated by Go MAEDA over 2 years ago Actions #4

  • Target version changed from Candidate for next major release to 6.0.0

Setting the target version to 6.0.0.

Updated by Go MAEDA over 2 years ago Actions #5

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

Committed the patch in r22886.

Updated by Go MAEDA over 2 years ago Actions #6

  • Subject changed from Searching multiple multi-word phrases to Support multiple multi-word phrases in the search engine

Updated by Go MAEDA over 2 years ago Actions #7

  • Related to Feature #38435: "contains any of" operator for text filters to perform OR search of multiple terms added
Actions

Also available in: PDF Atom