public class FullWildcardEnabledMultiFieldQueryParser
extends MultiFieldQueryParser
| Constructor and Description |
|---|
FullWildcardEnabledMultiFieldQueryParser(String[] fields,
Analyzer analyzer)
Creates a MultiFieldQueryParser.
|
| Modifier and Type | Method and Description |
|---|---|
protected Query |
_getFieldQuery(String field,
String queryText) |
protected Query |
_getFuzzyQuery(String field,
String termStr,
float minSimilarity) |
protected Query |
_getPrefixQuery(String field,
String termStr) |
protected Query |
_getRangeQuery(String field,
String part1,
String part2,
boolean inclusive,
boolean inclusive2) |
protected Query |
_getWildcardQuery(String field,
String termStr) |
protected Query |
getFieldQuery(String field,
String queryText,
int slop)
Overwritten to redirect to
_getFieldQuery(String, String) |
protected Query |
getFuzzyQuery(String field,
String termStr,
float minSimilarity)
Overwritten to redirect to
_getFuzzyQuery(String, String, float) |
protected Query |
getPrefixQuery(String field,
String termStr)
Overwritten to redirect to
_getPrefixQuery(String, String) |
protected Query |
getRangeQuery(String field,
String part1,
String part2,
boolean inclusive,
boolean inclusive2)
Overwritten to redirect to
#_getRangeQuery(String, String, String, boolean) |
protected Query |
getWildcardQuery(String field,
String termStr)
Overwritten to redirect to
_getWildcardQuery(String, String) |
public FullWildcardEnabledMultiFieldQueryParser(String[] fields, Analyzer analyzer)
It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms
and you specify the two fields title and body):
(title:term1 body:term1) (title:term2 body:term2)
When setDefaultOperator(AND_OPERATOR) is set, the result will be:
+(title:term1 body:term1) +(title:term2 body:term2)
In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.
protected Query getFieldQuery(String field, String queryText, int slop) throws ParseException
_getFieldQuery(String, String)ParseExceptionprotected Query _getFieldQuery(String field, String queryText) throws ParseException
ParseExceptionprotected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException
_getFuzzyQuery(String, String, float)ParseExceptionprotected Query _getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException
ParseExceptionprotected Query getPrefixQuery(String field, String termStr) throws ParseException
_getPrefixQuery(String, String)ParseExceptionprotected Query _getPrefixQuery(String field, String termStr) throws ParseException
ParseExceptionprotected Query getWildcardQuery(String field, String termStr) throws ParseException
_getWildcardQuery(String, String)ParseExceptionprotected Query _getWildcardQuery(String field, String termStr) throws ParseException
ParseExceptionprotected Query getRangeQuery(String field, String part1, String part2, boolean inclusive, boolean inclusive2) throws ParseException
#_getRangeQuery(String, String, String, boolean)ParseExceptionCopyright © 2017 SAP SE. All Rights Reserved.