Skip to content

Commit

Permalink
Fix term 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 Jan 29, 2024
1 parent d455bee commit 468313a
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,20 @@ public void testTermQuery() {
Query query = InetAddressPoint.newExactQuery("field", InetAddresses.forString(ip));

assertEquals(
new IndexOrDocValuesQuery(query, SortedSetDocValuesField.newSlowExactQuery("field", new BytesRef(ip))),
new IndexOrDocValuesQuery(
query,
SortedSetDocValuesField.newSlowExactQuery("field", new BytesRef(((PointRangeQuery) query).getLowerPoint()))
),
ft.termQuery(ip, null)
);

ip = "192.168.1.7";
query = InetAddressPoint.newExactQuery("field", InetAddresses.forString(ip));
assertEquals(
new IndexOrDocValuesQuery(query, SortedSetDocValuesField.newSlowExactQuery("field", new BytesRef(ip))),
new IndexOrDocValuesQuery(
query,
SortedSetDocValuesField.newSlowExactQuery("field", new BytesRef(((PointRangeQuery) query).getLowerPoint()))
),
ft.termQuery(ip, null)
);

Expand Down

0 comments on commit 468313a

Please sign in to comment.