|
@@ -280,14 +280,14 @@ public class QueryStringQueryParser extends XQueryParser {
|
|
|
|
|
|
@Override
|
|
|
public Query getFieldQuery(String field, String queryText, boolean quoted) throws ParseException {
|
|
|
- if (quoted) {
|
|
|
- return getFieldQuery(field, queryText, getPhraseSlop());
|
|
|
- }
|
|
|
-
|
|
|
if (field != null && EXISTS_FIELD.equals(field)) {
|
|
|
return existsQuery(queryText);
|
|
|
}
|
|
|
|
|
|
+ if (quoted) {
|
|
|
+ return getFieldQuery(field, queryText, getPhraseSlop());
|
|
|
+ }
|
|
|
+
|
|
|
// Detects additional operators '<', '<=', '>', '>=' to handle range query with one side unbounded.
|
|
|
// It is required to use a prefix field operator to enable the detection since they are not treated
|
|
|
// as logical operator by the query parser (e.g. age:>=10).
|
|
@@ -333,6 +333,10 @@ public class QueryStringQueryParser extends XQueryParser {
|
|
|
|
|
|
@Override
|
|
|
protected Query getFieldQuery(String field, String queryText, int slop) throws ParseException {
|
|
|
+ if (field != null && EXISTS_FIELD.equals(field)) {
|
|
|
+ return existsQuery(queryText);
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, Float> fields = extractMultiFields(field, true);
|
|
|
if (fields.isEmpty()) {
|
|
|
return newUnmappedFieldQuery(field);
|