apache / apache/lucene

MultiFieldQueryParser not work for slop and boost [LUCENE-8967]

Open
#10,010 0 comments 0 reactions 0 assignees View on GitHub
affects-version:5.4 legacy-jira-priority:Major module:core/queryparser type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

scenes: in multiple fields query
boosts setting: title^2 content^0.5
query string like: "cat dog"\~10

-----
In this scenes, MultiFieldQueryParser does not works.
Please see the attached picture for the code of the related question.

![issue.png](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-8967/issue.png)

---
Migrated from [LUCENE-8967](https://issues.apache.org/jira/browse/LUCENE-8967) by Xiang Li
Attachments: [issue.png](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-8967/issue.png)

Contributor guide

Open the contributing guide

Research direction

Start with MultiFieldQueryParser and reproduce the multiple-field query using title^2, content^0.5, and the quoted "cat dog"~10 syntax shown in the issue and attached image. Trace how slop and boost are handled, then add a regression test that defines the expected parsed query behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.