diff --git a/zulia-query-parser/src/test/java/io/zulia/server/search/queryparser/ParserTest.java b/zulia-query-parser/src/test/java/io/zulia/server/search/queryparser/ParserTest.java index 11161258..e3e1556f 100644 --- a/zulia-query-parser/src/test/java/io/zulia/server/search/queryparser/ParserTest.java +++ b/zulia-query-parser/src/test/java/io/zulia/server/search/queryparser/ParserTest.java @@ -41,7 +41,6 @@ public static void initAll() { newParser = new ZuliaFlexibleQueryParser(zuliaPerFieldAnalyzer, serverIndexConfig); oldParser = new ZuliaLegacyMultiFieldQueryParser(zuliaPerFieldAnalyzer, serverIndexConfig); - oldParser.setSplitOnWhitespace(true); } public static Query parse(String query, Collection defaultFields, Operator defaultOperator, int minMatch, ZuliaParser parser1) throws Exception { @@ -67,8 +66,10 @@ public void basicTest() throws Exception { Assertions.assertEquals(q, q2); + oldParser.setSplitOnWhitespace(true); q = parse("Lung Cancer", List.of("field1", "field2"), Operator.OR, 0, oldParser); q2 = parse("Lung Cancer", List.of("field1", "field2"), Operator.OR, 0, newParser); + oldParser.setSplitOnWhitespace(false); Assertions.assertEquals(q, q2);