Skip to content

Commit 198ebed

Browse files
Improved documentation
1 parent 0780c74 commit 198ebed

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/reference/analysis/tokenfilters/synonym-graph-tokenfilter.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ PUT /test_index
8888
--------------------------------------------------
8989
// CONSOLE
9090
With the above request the word `bar` gets skipped but a mapping `foo => baz` is still added. However, if the mapping
91-
being added was "foo, baz => bar" or "bar, foo, baz" nothing would get added to the synonym list. This is because the
92-
target word for the mapping is itself eliminated because it was a stop word.
91+
being added was "foo, baz => bar" nothing would get added to the synonym list. This is because the target word for the
92+
mapping is itself eliminated because it was a stop word. Similarly, if the mapping was "bar, foo, baz" and `expand` was
93+
set to `false` no mapping would get added as when `expand=false` the target mapping is the first word. However, if
94+
`expand=true` then the mappings added would be equivalent to `foo, baz => foo, baz` i.e, all mappings other than the
95+
stop word.
9396

9497
[float]
9598
==== `tokenizer` and `ignore_case` are deprecated

docs/reference/analysis/tokenfilters/synonym-tokenfilter.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ PUT /test_index
7575
--------------------------------------------------
7676
// CONSOLE
7777
With the above request the word `bar` gets skipped but a mapping `foo => baz` is still added. However, if the mapping
78-
being added was "foo, baz => bar" or "bar, foo, baz" nothing would get added to the synonym list. This is because the
79-
target word for the mapping is itself eliminated because it was a stop word.
78+
being added was "foo, baz => bar" nothing would get added to the synonym list. This is because the target word for the
79+
mapping is itself eliminated because it was a stop word. Similarly, if the mapping was "bar, foo, baz" and `expand` was
80+
set to `false` no mapping would get added as when `expand=false` the target mapping is the first word. However, if
81+
`expand=true` then the mappings added would be equivalent to `foo, baz => foo, baz` i.e, all mappings other than the
82+
stop word.
8083

8184

8285
[float]

0 commit comments

Comments
 (0)