File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
server/src/main/java/org/elasticsearch/indices Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,6 @@ tasks.named("yamlRestCompatTest").configure {
106106 ' mtermvectors/11_basic_with_types/Basic tests for multi termvector get' ,
107107 ' mtermvectors/21_deprecated_with_types/Deprecated camel case and _ parameters should fail in Term Vectors query' ,
108108 ' mtermvectors/30_mix_typeless_typeful/mtermvectors without types on an index that has types' ,
109- ' search/150_rewrite_on_coordinator/Ensure that we fetch the document only once' , // terms_lookup
110- ' search/171_terms_query_with_types/Terms Query with No.of terms exceeding index.max_terms_count should FAIL' , // bulk
111109 ' search/260_parameter_validation/test size=-1 is deprecated' , // size=-1 change
112110 ' search/310_match_bool_prefix/multi_match multiple fields with cutoff_frequency throws exception' , // cutoff_frequency
113111 ' search/340_type_query/type query' , // type_query - probably should behave like match_all
Original file line number Diff line number Diff line change 1717import org .elasticsearch .common .xcontent .ToXContentFragment ;
1818import org .elasticsearch .common .xcontent .XContentBuilder ;
1919import org .elasticsearch .common .xcontent .XContentParser ;
20+ import org .elasticsearch .core .RestApiVersion ;
2021import org .elasticsearch .index .mapper .MapperService ;
2122import org .elasticsearch .index .query .TermsQueryBuilder ;
2223
2324import java .io .IOException ;
2425import java .util .Objects ;
2526
2627import static org .elasticsearch .common .xcontent .ConstructingObjectParser .constructorArg ;
28+ import static org .elasticsearch .core .RestApiVersion .equalTo ;
2729
2830/**
2931 * Encapsulates the parameters needed to fetch terms.
@@ -107,6 +109,8 @@ public TermsLookup routing(String routing) {
107109 PARSER .declareString (constructorArg (), new ParseField ("id" ));
108110 PARSER .declareString (constructorArg (), new ParseField ("path" ));
109111 PARSER .declareString (TermsLookup ::routing , new ParseField ("routing" ));
112+ PARSER .declareString ((termLookup ,type )-> {}, new ParseField ("type" )
113+ .forRestApiVersion (equalTo (RestApiVersion .V_7 )));
110114 }
111115
112116 public static TermsLookup parseTermsLookup (XContentParser parser ) throws IOException {
You can’t perform that action at this time.
0 commit comments