[TEST] improve Phrase Collate filter test
This commit is contained in:
parent
179dad69b6
commit
ac4942b5a7
|
@ -1253,6 +1253,18 @@ public class SuggestSearchTests extends ElasticsearchIntegrationTest {
|
|||
assertSuggestionSize(searchSuggest, 0, 10, "title");
|
||||
assertSuggestionPhraseCollateMatchExists(searchSuggest, "title", 2);
|
||||
|
||||
collateWithParams = XContentFactory.jsonBuilder()
|
||||
.startObject()
|
||||
.startObject("query")
|
||||
.startObject("{{query_type}}")
|
||||
.field("{{query_field}}", "{{suggestion}}")
|
||||
.endObject()
|
||||
.endObject()
|
||||
.endObject().string();
|
||||
|
||||
params.clear();
|
||||
params.put("query_type", "match_phrase");
|
||||
params.put("query_field", "title");
|
||||
// collate filter request with prune set to true
|
||||
phraseSuggestWithParamsAndReturn = suggest.collateFilter(collateWithParams).collateQuery(null).collateParams(params).collatePrune(true);
|
||||
searchSuggest = searchSuggest("united states house of representatives elections in washington 2006", phraseSuggestWithParamsAndReturn);
|
||||
|
|
Loading…
Reference in New Issue