Skip to content

Commit 86d9797

Browse files
authored
Remove the _all metadata field (#26356)
* Remove the _all metadata field This change removes the `_all` metadata field. This field is deprecated in 6 and cannot be activated for indices created in 6 so it can be safely removed in the next major version (e.g. 7).
1 parent f95dec7 commit 86d9797

File tree

68 files changed

+84
-2148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+84
-2148
lines changed

core/src/main/java/org/apache/lucene/search/uhighlight/CustomUnifiedHighlighter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.apache.lucene.util.BytesRef;
3636
import org.apache.lucene.util.automaton.CharacterRunAutomaton;
3737
import org.elasticsearch.common.Nullable;
38-
import org.elasticsearch.common.lucene.all.AllTermQuery;
3938
import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery;
4039
import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery;
4140
import org.elasticsearch.index.search.ESToParentBlockJoinQuery;
@@ -206,9 +205,6 @@ private Collection<Query> rewriteCustomQuery(Query query) {
206205
tqs.add(new TermQuery(term));
207206
}
208207
return tqs;
209-
} else if (query instanceof AllTermQuery) {
210-
AllTermQuery atq = (AllTermQuery) query;
211-
return Collections.singletonList(new TermQuery(atq.getTerm()));
212208
} else if (query instanceof FunctionScoreQuery) {
213209
return Collections.singletonList(((FunctionScoreQuery) query).getSubQuery());
214210
} else if (query instanceof ESToParentBlockJoinQuery) {

core/src/main/java/org/elasticsearch/action/admin/indices/analyze/TransportAnalyzeAction.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import org.elasticsearch.index.analysis.NamedAnalyzer;
5656
import org.elasticsearch.index.analysis.TokenFilterFactory;
5757
import org.elasticsearch.index.analysis.TokenizerFactory;
58-
import org.elasticsearch.index.mapper.AllFieldMapper;
5958
import org.elasticsearch.index.mapper.KeywordFieldMapper;
6059
import org.elasticsearch.index.mapper.MappedFieldType;
6160
import org.elasticsearch.index.shard.ShardId;
@@ -151,13 +150,11 @@ protected AnalyzeResponse shardOperation(AnalyzeRequest request, ShardId shardId
151150
}
152151
if (field == null) {
153152
/**
154-
* TODO: _all is disabled by default and index.query.default_field can define multiple fields or pattterns so we should
153+
* TODO: _all is disabled by default and index.query.default_field can define multiple fields or patterns so we should
155154
* probably makes the field name mandatory in analyze query.
156155
**/
157156
if (indexService != null) {
158157
field = indexService.getIndexSettings().getDefaultFields().get(0);
159-
} else {
160-
field = AllFieldMapper.NAME;
161158
}
162159
}
163160
final AnalysisRegistry analysisRegistry = indicesService.getAnalysis();

core/src/main/java/org/elasticsearch/common/lucene/all/AllEntries.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

core/src/main/java/org/elasticsearch/common/lucene/all/AllField.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

core/src/main/java/org/elasticsearch/common/lucene/all/AllTermQuery.java

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)