Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4
-
None
-
New
Description
An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries.
The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include:
checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases
checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works
checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works.
checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad
checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad
checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported
Code plus Junit test to follow...
Attachments
Attachments
Issue Links
- is blocked by
-
LUCENE-1567 New flexible query parser
- Resolved
- is related to
-
LUCENE-5205 SpanQueryParser with recursion, analysis and syntax very similar to classic QueryParser
- Resolved
-
SOLR-7466 Allow optional leading wildcards in complexphrase
- Resolved
- is required by
-
SOLR-1604 Wildcards, ORs etc inside Phrase Queries
- Closed
- relates to
-
LUCENE-1823 QueryParser with new features for Lucene 3
- Open
-
SOLR-1604 Wildcards, ORs etc inside Phrase Queries
- Closed