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 24, 2024
1 parent 3934e9c commit ef9b400
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 ef9b400

Please sign in to comment.