Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Oct 7, 2024
1 parent e34871e commit d6dcea1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void testMatchInterval() throws IOException {
}""", TEXT_FIELD_NAME);

IntervalQueryBuilder builder = (IntervalQueryBuilder) parseQuery(json);
Query expected = new IntervalQuery(TEXT_FIELD_NAME, Intervals.unordered(Intervals.term("hello"), Intervals.term("world")));
Query expected = new IntervalQuery(TEXT_FIELD_NAME, XIntervals.unordered(Intervals.term("hello"), Intervals.term("world")));

assertEquals(expected, builder.toQuery(createSearchExecutionContext()));

Expand All @@ -222,7 +222,7 @@ public void testMatchInterval() throws IOException {
builder = (IntervalQueryBuilder) parseQuery(json);
expected = new IntervalQuery(
TEXT_FIELD_NAME,
Intervals.maxgaps(40, Intervals.unordered(Intervals.term("hello"), Intervals.term("world")))
Intervals.maxgaps(40, XIntervals.unordered(Intervals.term("hello"), Intervals.term("world")))
);
assertEquals(expected, builder.toQuery(createSearchExecutionContext()));

Expand All @@ -241,7 +241,7 @@ public void testMatchInterval() throws IOException {

builder = (IntervalQueryBuilder) parseQuery(json);
expected = new BoostQuery(
new IntervalQuery(TEXT_FIELD_NAME, Intervals.ordered(Intervals.term("hello"), Intervals.term("world"))),
new IntervalQuery(TEXT_FIELD_NAME, XIntervals.ordered(Intervals.term("hello"), Intervals.term("world"))),
2
);
assertEquals(expected, builder.toQuery(createSearchExecutionContext()));
Expand All @@ -263,7 +263,7 @@ public void testMatchInterval() throws IOException {
builder = (IntervalQueryBuilder) parseQuery(json);
expected = new IntervalQuery(
TEXT_FIELD_NAME,
Intervals.maxgaps(10, Intervals.ordered(Intervals.term("Hello"), Intervals.term("world")))
Intervals.maxgaps(10, XIntervals.ordered(Intervals.term("Hello"), Intervals.term("world")))
);
assertEquals(expected, builder.toQuery(createSearchExecutionContext()));

Expand All @@ -285,7 +285,7 @@ public void testMatchInterval() throws IOException {
builder = (IntervalQueryBuilder) parseQuery(json);
expected = new IntervalQuery(
TEXT_FIELD_NAME,
Intervals.fixField(MASKED_FIELD, Intervals.maxgaps(10, Intervals.ordered(Intervals.term("Hello"), Intervals.term("world"))))
Intervals.fixField(MASKED_FIELD, Intervals.maxgaps(10, XIntervals.ordered(Intervals.term("Hello"), Intervals.term("world"))))
);
assertEquals(expected, builder.toQuery(createSearchExecutionContext()));

Expand Down Expand Up @@ -314,7 +314,7 @@ public void testMatchInterval() throws IOException {
expected = new IntervalQuery(
TEXT_FIELD_NAME,
Intervals.containing(
Intervals.maxgaps(10, Intervals.ordered(Intervals.term("Hello"), Intervals.term("world"))),
Intervals.maxgaps(10, XIntervals.ordered(Intervals.term("Hello"), Intervals.term("world"))),
Intervals.term("blah")
)
);
Expand Down Expand Up @@ -426,7 +426,7 @@ public void testCombineInterval() throws IOException {
Intervals.containedBy(
Intervals.maxgaps(
30,
Intervals.ordered(Intervals.term("one"), Intervals.unordered(Intervals.term("two"), Intervals.term("three")))
XIntervals.ordered(Intervals.term("one"), XIntervals.unordered(Intervals.term("two"), Intervals.term("three")))
),
Intervals.term("SENTENCE")
)
Expand Down Expand Up @@ -486,7 +486,7 @@ public void testCombineDisjunctionInterval() throws IOException {
Intervals.notContainedBy(
Intervals.maxgaps(
30,
Intervals.ordered(Intervals.term("atmosphere"), Intervals.or(Intervals.term("cold"), Intervals.term("outside")))
XIntervals.ordered(Intervals.term("atmosphere"), Intervals.or(Intervals.term("cold"), Intervals.term("outside")))
),
Intervals.term("freeze")
)
Expand Down

0 comments on commit d6dcea1

Please sign in to comment.