apache / apache/lucene

MultiFieldDisjunctionMaxQueryParser [LUCENE-553]

Open
#1,631 1 comment 0 reactions 0 assignees View on GitHub
affects-version:1.9 affects-version:2.0.0 legacy-jira-priority:Minor module:core/queryparser type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Following on from Lucene-323, here is a replacement for the old DistributingMultiFieldQueryParser that works with the new QueryParser. This is essentially a cut-and-paste of MultiFieldQueryParser, using DisjunctionMaxQuery instead of BooleanQuery as the combing operator for the expansion of query terms across the multiple fields being searched. This is an important adjunct to DisjunctionMaxQuery as it provides a way to generate this query from input query strings.

It would be possible to generalize MultiFieldQueryParser to parameterize the combining operator, but this would require modifying it rather than simply adding a new class.

---
Migrated from [LUCENE-553](https://issues.apache.org/jira/browse/LUCENE-553) by Chuck Williams, updated Feb 28 2013
Environment:
```
All
```

Attachments: [MultiFieldDisjunctionMaxQueryParser.java](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-553/MultiFieldDisjunctionMaxQueryParser.java), [MultiFieldDisjunctionMaxQueryParserTest.java](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-553/MultiFieldDisjunctionMaxQueryParserTest.java)

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing MultiFieldQueryParser and the attached MultiFieldDisjunctionMaxQueryParser.java and MultiFieldDisjunctionMaxQueryParserTest.java. Compare the proposed parser with the current QueryParser behavior and confirm the test coverage. Done means the replacement parser supports multi-field query strings using DisjunctionMaxQuery and its tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.