Skip to content

Commit f9fc9bd

Browse files
committed
query_string on multiple fields with "*" fails in 0.19.9
fixed elastic#2296
1 parent d8a3096 commit f9fc9bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/apache/lucene/queryParser/MapperQueryParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.apache.lucene.queryParser;
2121

22+
import com.google.common.base.Objects;
2223
import com.google.common.collect.ImmutableMap;
2324
import org.apache.lucene.analysis.Analyzer;
2425
import org.apache.lucene.analysis.TokenStream;
@@ -549,7 +550,7 @@ private Query getPossiblyAnalyzedPrefixQuery(String field, String termStr) throw
549550
protected Query getWildcardQuery(String field, String termStr) throws ParseException {
550551
if (termStr.equals("*")) {
551552
// we want to optimize for match all query for the "*:*", and "*" cases
552-
if ("*".equals(field) || field.equals(this.field)) {
553+
if ("*".equals(field) || Objects.equal(field, this.field)) {
553554
return newMatchAllDocsQuery();
554555
}
555556
}

0 commit comments

Comments
 (0)