Skip to content

Commit

Permalink
Fix test for index phrases shortcut with multi-term synonyms (#49366)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
romseygeek authored Nov 21, 2019
1 parent 4ac79f9 commit cc89d53
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,6 @@ public void testNestedIndexPrefixes() throws IOException {
}
}

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

QueryShardContext queryShardContext = indexService.newQueryShardContext(
Expand Down Expand Up @@ -841,8 +840,7 @@ protected TokenStreamComponents createComponents(String fieldName) {
assertThat(q7, is(new BooleanQuery.Builder().add(new BooleanQuery.Builder()
.add(new TermQuery(new Term("synfield", "foo")), BooleanClause.Occur.SHOULD)
.add(new PhraseQuery.Builder()
.add(new Term("synfield", "bar"))
.add(new Term("synfield", "baz"))
.add(new Term("synfield._index_phrase", "bar baz"))
.build(), BooleanClause.Occur.SHOULD)
.build(), BooleanClause.Occur.SHOULD).build()));

Expand Down

0 comments on commit cc89d53

Please sign in to comment.