Skip to content

Commit ab24a04

Browse files
author
Christoph Büscher
authored
Move mentions of updateable flag (#43536)
The new "updateable" flag used with synonym and synonym_graph should be mentioned with the reload API endpoint which I also moved under the x-pack basic role with this change.
1 parent ff92ad6 commit ab24a04

File tree

4 files changed

+15
-50
lines changed

4 files changed

+15
-50
lines changed

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

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ appear before it in the chain.
4141
Additional settings are:
4242

4343
* `expand` (defaults to `true`).
44-
* `updateable` (defaults to false). If `true`, this marks the filter to be updateable using the
45-
<<indices-reload-analyzers,analyzer reload API>>, but it will also restrict the filter to only be usable in
46-
<<search-analyzer,search analyzers>>.
4744
* `lenient` (defaults to `false`). If `true` ignores exceptions while parsing the synonym configuration. It is important
4845
to note that only those synonym rules which cannot get parsed are ignored. For instance consider the following request:
4946

@@ -186,41 +183,3 @@ error.
186183
If you need to build analyzers that include both multi-token filters and synonym
187184
filters, consider using the <<analysis-multiplexer-tokenfilter,multiplexer>> filter,
188185
with the multi-token filters in one branch and the synonym filter in the other.
189-
190-
=== Updateability of search time synonyms
191-
192-
Synonym filters that are used in <<search-analyzer,search analyzers>> can be marked
193-
as updateable using the `updateable` flag:
194-
195-
[source,js]
196-
--------------------------------------------------
197-
PUT /test_index
198-
{
199-
"settings": {
200-
"index" : {
201-
"analysis" : {
202-
"analyzer" : {
203-
"synonym" : {
204-
"tokenizer" : "whitespace",
205-
"filter" : ["synonym"]
206-
}
207-
},
208-
"filter" : {
209-
"synonym" : {
210-
"type" : "synonym",
211-
"synonyms_path" : "analysis/synonym.txt",
212-
"updateable" : true
213-
}
214-
}
215-
}
216-
}
217-
}
218-
}
219-
--------------------------------------------------
220-
// CONSOLE
221-
222-
Using the <<indices-reload-analyzers,analyzer reload API>>, you can trigger reloading of the
223-
synonym definition. The contents of the configured synonyms file will be reloaded and the
224-
synonyms definition the filter uses will be updated.
225-
226-
NOTE: Trying to use the above analyzer as an index analyzer will result in an error.

docs/reference/indices.asciidoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ index settings, aliases, mappings, and index templates.
5656
* <<indices-refresh>>
5757
* <<indices-flush>>
5858
* <<indices-forcemerge>>
59-
* <<indices-reload-analyzers>>
6059

6160
--
6261

@@ -110,5 +109,3 @@ include::indices/refresh.asciidoc[]
110109

111110
include::indices/forcemerge.asciidoc[]
112111

113-
include::indices/reload-analyzers.asciidoc[]
114-

docs/reference/indices/reload-analyzers.asciidoc renamed to docs/reference/indices/apis/reload-analyzers.asciidoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
[role="xpack"]
2+
[testenv="basic"]
13
[[indices-reload-analyzers]]
24
== Reload Search Analyzers
35

46
experimental[]
57

68
Reloads search analyzers and its resources.
79

8-
The `_reload_search_analyzers` API can be run on one or more indices and will
9-
reload all search analyzers that contain components that were marked as
10-
updateable when they were created, such as
11-
<<analysis-synonym-tokenfilter,synonym token filters>>:
10+
Synonym filters (both `synonym` and `synonym_graph`) can be declared as
11+
updateable if they are only used in <<search-analyzer,search analyzers>>
12+
with the `updateable` flag:
1213

1314
[source,js]
1415
--------------------------------------------------
@@ -49,8 +50,14 @@ PUT /test_index
4950
<1> Mark the synonym filter as updateable.
5051
<2> Synonym analyzer is usable as a search_analyzer.
5152

52-
Calling the `_reload_search_analyzers` endpoint will now trigger reloading of the
53-
synonyms from the configured "synonym.txt" file.
53+
NOTE: Trying to use the above analyzer as an index analyzer will result in an error.
54+
55+
Using the <<indices-reload-analyzers,analyzer reload API>>, you can trigger reloading of the
56+
synonym definition. The contents of the configured synonyms file will be reloaded and the
57+
synonyms definition the filter uses will be updated.
58+
59+
The `_reload_search_analyzers` API can be run on one or more indices and will trigger
60+
reloading of the synonyms from the configured file.
5461

5562
NOTE: Reloading will happen on every node the index has shards, so its important
5663
to update the synonym file contents on every data node (even the ones that don't currently

docs/reference/rest-api/index.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ directly to configure and access {xpack} features.
1212
* <<data-frame-apis,{dataframe-cap} APIs>>
1313
* <<graph-explore-api,Graph Explore API>>
1414
* <<freeze-index-api>>, <<unfreeze-index-api>>
15+
* <<indices-reload-analyzers,Reload Search Analyzers API>>
1516
* <<index-lifecycle-management-api,Index lifecycle management APIs>>
1617
* <<licensing-apis,Licensing APIs>>
1718
* <<ml-apis,Machine Learning APIs>>
@@ -35,4 +36,5 @@ include::{es-repo-dir}/rollup/rollup-api.asciidoc[]
3536
include::{xes-repo-dir}/rest-api/security.asciidoc[]
3637
include::{es-repo-dir}/indices/apis/unfreeze.asciidoc[]
3738
include::{xes-repo-dir}/rest-api/watcher.asciidoc[]
39+
include::{es-repo-dir}/indices/apis/reload-analyzers.asciidoc[]
3840
include::defs.asciidoc[]

0 commit comments

Comments
 (0)