From 443f740795fd2511f7851136fb9ee8872e1f45ae Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sat, 21 Jul 2012 13:55:50 -0700 Subject: [PATCH] *:* query string query should resolve to match_all query, since the wildcard field support, it no longer does --- .../java/org/apache/lucene/queryParser/MapperQueryParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/apache/lucene/queryParser/MapperQueryParser.java b/src/main/java/org/apache/lucene/queryParser/MapperQueryParser.java index 97905bf54be..3bb59b08f1d 100644 --- a/src/main/java/org/apache/lucene/queryParser/MapperQueryParser.java +++ b/src/main/java/org/apache/lucene/queryParser/MapperQueryParser.java @@ -31,7 +31,6 @@ import org.elasticsearch.common.lucene.search.Queries; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.index.mapper.FieldMapper; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.index.mapper.internal.AllFieldMapper; import org.elasticsearch.index.query.QueryParseContext; import org.elasticsearch.index.query.support.QueryParsers; @@ -548,7 +547,7 @@ public class MapperQueryParser extends QueryParser { @Override protected Query getWildcardQuery(String field, String termStr) throws ParseException { - if (AllFieldMapper.NAME.equals(field) && termStr.equals("*")) { + if ("*".equals(field) && termStr.equals("*")) { return newMatchAllDocsQuery(); } Collection fields = extractMultiFields(field);