Skip to content

Commit

Permalink
Remove type query (#47207)
Browse files Browse the repository at this point in the history
Running a type query in 7x already emits deprecation warnings. We can remove it
altogether in 8x.

Part of #41059
  • Loading branch information
romseygeek committed Sep 27, 2019
1 parent 9ac223c commit 237b238
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 250 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.IndexAnalyzers;
import org.elasticsearch.index.mapper.MetadataFieldMapper.TypeParser;
import org.elasticsearch.index.query.QueryShardContext;
import org.elasticsearch.search.internal.SearchContext;

import java.io.IOException;
Expand Down Expand Up @@ -223,14 +222,6 @@ public <T extends MetadataFieldMapper> T metadataMapper(Class<T> type) {
return mapping.metadataMapper(type);
}

public IndexFieldMapper indexMapper() {
return metadataMapper(IndexFieldMapper.class);
}

public TypeFieldMapper typeMapper() {
return metadataMapper(TypeFieldMapper.class);
}

public SourceFieldMapper sourceMapper() {
return metadataMapper(SourceFieldMapper.class);
}
Expand All @@ -247,10 +238,6 @@ public IndexFieldMapper IndexFieldMapper() {
return metadataMapper(IndexFieldMapper.class);
}

public Query typeFilter(QueryShardContext context) {
return typeMapper().fieldType().termQuery(type, context);
}

public boolean hasNestedObjects() {
return hasNestedObjects;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.elasticsearch.index.query.TermQueryBuilder;
import org.elasticsearch.index.query.TermsQueryBuilder;
import org.elasticsearch.index.query.TermsSetQueryBuilder;
import org.elasticsearch.index.query.TypeQueryBuilder;
import org.elasticsearch.index.query.WildcardQueryBuilder;
import org.elasticsearch.index.query.WrapperQueryBuilder;
import org.elasticsearch.index.query.functionscore.ExponentialDecayFunctionBuilder;
Expand Down Expand Up @@ -773,7 +772,6 @@ private void registerQueryParsers(List<SearchPlugin> plugins) {
registerQuery(new QuerySpec<>(ScriptScoreQueryBuilder.NAME, ScriptScoreQueryBuilder::new, ScriptScoreQueryBuilder::fromXContent));
registerQuery(
new QuerySpec<>(SimpleQueryStringBuilder.NAME, SimpleQueryStringBuilder::new, SimpleQueryStringBuilder::fromXContent));
registerQuery(new QuerySpec<>(TypeQueryBuilder.NAME, TypeQueryBuilder::new, TypeQueryBuilder::fromXContent));
registerQuery(new QuerySpec<>(ScriptQueryBuilder.NAME, ScriptQueryBuilder::new, ScriptQueryBuilder::fromXContent));
registerQuery(new QuerySpec<>(GeoDistanceQueryBuilder.NAME, GeoDistanceQueryBuilder::new, GeoDistanceQueryBuilder::fromXContent));
registerQuery(new QuerySpec<>(GeoBoundingBoxQueryBuilder.NAME, GeoBoundingBoxQueryBuilder::new,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ public List<RescorerSpec<?>> getRescorers() {
"term",
"terms",
"terms_set",
"type",
"wildcard",
"wrapper",
"distance_feature"
Expand Down

0 comments on commit 237b238

Please sign in to comment.