[TEST] Add mapping to use an actual stopword analyzer
This test was added when the default analyzer was filtering stopwords. But since 1.0 the default analyzer doesn't filter stopwords
This commit is contained in:
parent
2e56253293
commit
10a1fcb65a
|
@ -410,9 +410,12 @@ public class SuggestSearchTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Test // see #2817
|
||||
public void testStopwordsOnlyPhraseSuggest() throws ElasticsearchException, IOException {
|
||||
createIndex("test");
|
||||
assertAcked(prepareCreate("test").addMapping("typ1", "body", "type=string,analyzer=stopwd").setSettings(
|
||||
settingsBuilder()
|
||||
.put("index.analysis.analyzer.stopwd.tokenizer", "whitespace")
|
||||
.putArray("index.analysis.analyzer.stopwd.filter", "stop")
|
||||
));
|
||||
ensureGreen();
|
||||
|
||||
index("test", "typ1", "1", "body", "this is a test");
|
||||
refresh();
|
||||
|
||||
|
|
Loading…
Reference in New Issue