Skip to content

Commit

Permalink
Test that no-index synonyms can be used with the Analyze API (#40781)
Browse files Browse the repository at this point in the history
Relates to #23943
  • Loading branch information
romseygeek committed Apr 4, 2019
1 parent a6faf85 commit 4296ff2
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4296ff2

Please sign in to comment.