Add an operator to query parser for term quorum (ie: BooleanQuery.setMinimumNumberShouldMatch) [LUCENE-3833]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
A project I'm working on requires **term quorum** searching with stemming turned off. The users are accostomed to Sphinx search, and thus expect a query like [ A AND (B C D)/2 ] to return only documents that contain A or at least two of B, C or D.
So this document would match:
a b c
But this one wouldn't:
a b
This can be a useful form of fuzzy searching, and I think we support it via the MM parameter, but we lack a user-facing operator for this. It would be great to add it.
---
Migrated from [LUCENE-3833](https://issues.apache.org/jira/browse/LUCENE-3833) by Mike Lissner (@mlissner), 1 vote, updated Oct 27 2012
Attachments: [LUCENE-3833.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-3833/LUCENE-3833.patch)
Linked issues:
- [SOLR-2368](https://issues.apache.org/jira/browse/SOLR-2368)
- [SOLR-3028](https://issues.apache.org/jira/browse/SOLR-3028)
Contributor guide
Research direction
Start by tracing the query parser's handling of Boolean expressions and the existing MM parameter; the issue's A AND (B C D)/2 example defines the expected semantics. Review the attached LUCENE-3833.patch for historical context. Done means the parser accepts a term-quorum operator and produces the described minimum-should-match behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100