Test that no-index synonyms can be used with the Analyze API (#40781)

Relates to #23943
This commit is contained in:
Alan Woodward 2019-04-04 09:03:08 +01:00 committed by Alan Woodward
parent a6faf85f26
commit 4296ff2fd1
1 changed files with 28 additions and 0 deletions

View File

@ -273,6 +273,34 @@
- match: { tokens.3.token: magazine }
- match: { tokens.3.position: 2 }
---
"synonym_without_index":
- do:
indices.analyze:
body:
text: wibble
tokenizer: standard
filter: [ { type: synonym, synonyms: [ "wibble, quack" ]}]
- length: { tokens: 2 }
- match: { tokens.0.token: wibble }
- match: { tokens.0.position: 0 }
- match: { tokens.1.token: quack }
- match: { tokens.1.position: 0 }
---
"synonym_graph_without_index":
- do:
indices.analyze:
body:
text: wibble
tokenizer: standard
filter: [ { type: synonym_graph, synonyms: [ "wibble, quack" ]}]
- length: { tokens: 2 }
- match: { tokens.0.token: quack }
- match: { tokens.0.position: 0 }
- match: { tokens.1.token: wibble }
- match: { tokens.1.position: 0 }
---
"synonym_graph":
- do: