Skip to content

Commit cc89d53

Browse files
authored
Fix test for index phrases shortcut with multi-term synonyms (#49366)
Lucene 8.3 included a root fix for #43976, which was temporarily fixed in elasticsearch by #44340. Since we have upgraded to 8.3 we no longer need this workaround. This commit fixes the test that was added to check the workaround, and instead checks that fields with index_phrases enabled correctly build queries when used with multi-term synonyms. Closes #47777
1 parent 4ac79f9 commit cc89d53

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/test/java/org/elasticsearch/index/mapper/TextFieldMapperTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@ public void testNestedIndexPrefixes() throws IOException {
771771
}
772772
}
773773

774-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/47777")
775774
public void testFastPhraseMapping() throws IOException {
776775

777776
QueryShardContext queryShardContext = indexService.newQueryShardContext(
@@ -841,8 +840,7 @@ protected TokenStreamComponents createComponents(String fieldName) {
841840
assertThat(q7, is(new BooleanQuery.Builder().add(new BooleanQuery.Builder()
842841
.add(new TermQuery(new Term("synfield", "foo")), BooleanClause.Occur.SHOULD)
843842
.add(new PhraseQuery.Builder()
844-
.add(new Term("synfield", "bar"))
845-
.add(new Term("synfield", "baz"))
843+
.add(new Term("synfield._index_phrase", "bar baz"))
846844
.build(), BooleanClause.Occur.SHOULD)
847845
.build(), BooleanClause.Occur.SHOULD).build()));
848846

0 commit comments

Comments
 (0)