Test that no-index synonyms can be used with the Analyze API (#40781)
Relates to #23943
This commit is contained in:
parent
a6faf85f26
commit
4296ff2fd1
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue