浏览代码

Adjust wording according to review.

Isabel Drost-Fromm 9 年之前
父节点
当前提交
7bcc079d60

+ 1 - 1
core/src/main/java/org/elasticsearch/index/query/ExistsQueryBuilder.java

@@ -134,7 +134,7 @@ public class ExistsQueryBuilder extends AbstractQueryBuilder<ExistsQueryBuilder>
                 (FieldNamesFieldMapper.FieldNamesFieldType)context.getMapperService().fullName(FieldNamesFieldMapper.NAME);
         if (fieldNamesFieldType == null) {
             // can only happen when no types exist, so no docs exist either
-            return Queries.newMatchNoDocsQuery("Missing types in " + NAME);
+            return Queries.newMatchNoDocsQuery("Missing types in \"" + NAME + "\" query.");
         }
 
         final Collection<String> fields;

+ 1 - 1
core/src/main/java/org/elasticsearch/index/query/IdsQueryBuilder.java

@@ -204,7 +204,7 @@ public class IdsQueryBuilder extends AbstractQueryBuilder<IdsQueryBuilder> {
     protected Query doToQuery(QueryShardContext context) throws IOException {
         Query query;
         if (this.ids.isEmpty()) {
-             query = Queries.newMatchNoDocsQuery("Missing ids in " + this.getName());
+             query = Queries.newMatchNoDocsQuery("Missing ids in \"" + this.getName() + "\" query.");
         } else {
             Collection<String> typesForQuery;
             if (types.length == 0) {

+ 1 - 1
core/src/main/java/org/elasticsearch/index/query/MatchNoneQueryBuilder.java

@@ -93,7 +93,7 @@ public class MatchNoneQueryBuilder extends AbstractQueryBuilder<MatchNoneQueryBu
 
     @Override
     protected Query doToQuery(QueryShardContext context) throws IOException {
-        return Queries.newMatchNoDocsQuery("User requested " + this.getName());
+        return Queries.newMatchNoDocsQuery("User requested \"" + this.getName() + "\" query.");
     }
 
     @Override

+ 1 - 1
core/src/main/java/org/elasticsearch/index/query/TermsQueryBuilder.java

@@ -317,7 +317,7 @@ public class TermsQueryBuilder extends AbstractQueryBuilder<TermsQueryBuilder> {
             throw new UnsupportedOperationException("query must be rewritten first");
         }
         if (values == null || values.isEmpty()) {
-            return Queries.newMatchNoDocsQuery("No terms supplied for " + getName());
+            return Queries.newMatchNoDocsQuery("No terms supplied for \"" + getName() + "\" query.");
         }
         return handleTermsQuery(values, fieldName, context);
     }

+ 1 - 1
core/src/main/java/org/elasticsearch/index/search/MatchQuery.java

@@ -287,7 +287,7 @@ public class MatchQuery {
 
     protected Query zeroTermsQuery() {
         if (zeroTermsQuery == DEFAULT_ZERO_TERMS_QUERY) {
-            return Queries.newMatchNoDocsQuery("No query supplied in match query");
+            return Queries.newMatchNoDocsQuery("Matching no documents because no terms present.");
         }
 
         return Queries.newMatchAllQuery();