Skip to content

Commit

Permalink
Fixing boolean field tests
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Mar 20, 2024
1 parent 7cebf44 commit 3ba54d5
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,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)
);
assertParseMaximalWarnings();
Expand All @@ -235,16 +232,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"))
Expand Down

0 comments on commit 3ba54d5

Please sign in to comment.