diff --git a/server/src/test/java/org/opensearch/index/mapper/BooleanFieldMapperTests.java b/server/src/test/java/org/opensearch/index/mapper/BooleanFieldMapperTests.java index c0415c92b6997..5392bd6c358d3 100644 --- a/server/src/test/java/org/opensearch/index/mapper/BooleanFieldMapperTests.java +++ b/server/src/test/java/org/opensearch/index/mapper/BooleanFieldMapperTests.java @@ -32,14 +32,12 @@ package org.opensearch.index.mapper; -import org.apache.lucene.document.SortedNumericDocValuesField; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.IndexableField; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.SortedNumericDocValues; import org.apache.lucene.index.Term; import org.apache.lucene.search.BoostQuery; -import org.apache.lucene.search.IndexOrDocValuesQuery; import org.apache.lucene.search.TermQuery; import org.apache.lucene.util.BytesRef; import org.opensearch.common.xcontent.XContentFactory; @@ -208,13 +206,7 @@ public void testBoosts() throws Exception { })); MappedFieldType ft = mapperService.fieldType("field"); - assertEquals( - new IndexOrDocValuesQuery( - new BoostQuery(new TermQuery(new Term("field", "T")), 2.0f), - SortedNumericDocValuesField.newSlowExactQuery("field", 1) - ), - ft.termQuery("true", null) - ); + assertEquals(new BoostQuery(new TermQuery(new Term("field", "T")), 2.0f), ft.termQuery("true", null)); assertParseMaximalWarnings(); } @@ -235,16 +227,6 @@ public void testIndexedValueForSearch() throws Exception { BooleanFieldMapper.Values.FALSE ); - assertEquals( - new BooleanFieldMapper.BooleanFieldType("bool").indexedValueForSearch(new BytesRef("T")), - BooleanFieldMapper.Values.TRUE - ); - - assertEquals( - new BooleanFieldMapper.BooleanFieldType("bool").indexedValueForSearch(new BytesRef("F")), - BooleanFieldMapper.Values.FALSE - ); - IllegalArgumentException e = expectThrows( IllegalArgumentException.class, () -> new BooleanFieldMapper.BooleanFieldType("bool").indexedValueForSearch(new BytesRef("random"))