Skip to content

Commit

Permalink
[Remove] TypeFieldMapper (#3196)
Browse files Browse the repository at this point in the history
Removes last trace of TypeFieldMapper since types have been removed and
NestedPathFieldMapper is now available.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 741445a)
  • Loading branch information
nknize authored and github-actions[bot] committed May 5, 2022
1 parent 4878f3a commit b9b62d7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
package org.opensearch.common.lucene.search;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.Term;
import org.apache.lucene.queries.ExtendedCommonTermsQuery;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanClause.Occur;
Expand All @@ -43,17 +42,14 @@
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.MatchNoDocsQuery;
import org.apache.lucene.search.PrefixQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.BytesRef;
import org.opensearch.OpenSearchException;
import org.opensearch.common.Nullable;
import org.opensearch.index.mapper.SeqNoFieldMapper;
import org.opensearch.index.mapper.TypeFieldMapper;

import java.io.IOException;
import java.util.Collection;
Expand Down Expand Up @@ -87,7 +83,7 @@ public static Query newLenientFieldQuery(String field, RuntimeException e) {
}

public static Query newNestedFilter() {
return new PrefixQuery(new Term(TypeFieldMapper.NAME, new BytesRef("__")));
return not(newNonNestedFilter());
}

/**
Expand Down
187 changes: 0 additions & 187 deletions server/src/main/java/org/opensearch/index/mapper/TypeFieldMapper.java

This file was deleted.

0 comments on commit b9b62d7

Please sign in to comment.