OpenSearch/docs/reference/migration/migrate_2_0/index_apis.asciidoc

43 lines
1.4 KiB
Plaintext
Raw Normal View History

=== Index API changes
==== Index aliases
Fields used in alias filters no longer have to exist in the mapping at alias
creation time. Previously, alias filters were parsed at alias creation time
and the parsed form was cached in memory. Now, alias filters are parsed at
request time and the fields in filters are resolved from the current mapping.
This also means that index aliases now support `has_parent` and `has_child`
queries.
The <<alias-retrieving, GET alias api>> will now throw an exception if no
matching aliases are found. This change brings the defaults for this API in
line with the other Indices APIs. The <<multi-index>> options can be used on a
request to change this behavior.
==== File based index templates
Index templates can no longer be configured on disk. Use the
<<indices-templates,`_template`>> API instead.
==== Analyze API changes
The Analyze API now returns the the `position` of the first token as `0`
instead of `1`.
The `prefer_local` parameter has been removed. The `_analyze` API is a light
operation and the caller shouldn't be concerned about whether it executes on
the node that receives the request or another node.
The `text()` method on `AnalyzeRequest` now returns `String[]` instead of
`String`.
==== Removed `id_cache` from clear cache api
The <<indices-clearcache,clear cache>> API no longer supports the `id_cache`
option. Instead, use the `fielddata` option to clear the cache for the
`_parent` field.