diff --git a/docs/reference/elasticsearch/rest-apis/collapse-search-results.md b/docs/reference/elasticsearch/rest-apis/collapse-search-results.md index 3049fa72746ad..af52cca449473 100644 --- a/docs/reference/elasticsearch/rest-apis/collapse-search-results.md +++ b/docs/reference/elasticsearch/rest-apis/collapse-search-results.md @@ -8,7 +8,7 @@ navigation_title: Collapse search results # Collapse search results [collapse-search-results] -You can use the `collapse` parameter to collapse search results based on field values. The collapsing is done by selecting only the top sorted document per collapse key. +You can use the Search API's [`collapse` parameter](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-body-application-json-collapse) to collapse search results based on field values. The collapsing is done by selecting only the top sorted document per collapse key. For example, the following search collapses results by `user.id` and sorts them by `http.response.bytes`. diff --git a/docs/reference/elasticsearch/rest-apis/create-index-from-source.md b/docs/reference/elasticsearch/rest-apis/create-index-from-source.md index 6ea684baf1d34..4fc97ae306292 100644 --- a/docs/reference/elasticsearch/rest-apis/create-index-from-source.md +++ b/docs/reference/elasticsearch/rest-apis/create-index-from-source.md @@ -16,6 +16,8 @@ For the most up-to-date API details, refer to [Index APIs](https://www.elastic.c :::: +The [create index from source API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from) copies mappings and settings from a source index or data stream to a destination index or data stream, with optional overrides. + ## {{api-request-title}} [indices-create-index-from-source-api-request] diff --git a/docs/reference/elasticsearch/rest-apis/filter-search-results.md b/docs/reference/elasticsearch/rest-apis/filter-search-results.md index 6fdc96f9c5ee5..74ba208acdd6f 100644 --- a/docs/reference/elasticsearch/rest-apis/filter-search-results.md +++ b/docs/reference/elasticsearch/rest-apis/filter-search-results.md @@ -7,7 +7,7 @@ applies_to: # Filter search results [filter-search-results] -You can use two methods to filter search results: +You can use the [search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) to filter results using either boolean `filter` clauses or the `post_filter` parameter. * Use a boolean query with a `filter` clause. Search requests apply [boolean filters](/reference/query-languages/query-dsl/query-dsl-bool-query.md) to both search hits and [aggregations](/reference/aggregations/index.md). * Use the search API’s `post_filter` parameter. Search requests apply [post filters](#post-filter) only to search hits, not aggregations. You can use a post filter to calculate aggregations based on a broader result set, and then further narrow the results. diff --git a/docs/reference/elasticsearch/rest-apis/find-text-structure-examples.md b/docs/reference/elasticsearch/rest-apis/find-text-structure-examples.md index d23e5891f8934..3b1f9d7b1534e 100644 --- a/docs/reference/elasticsearch/rest-apis/find-text-structure-examples.md +++ b/docs/reference/elasticsearch/rest-apis/find-text-structure-examples.md @@ -5,7 +5,7 @@ navigation_title: Find text structure API examples --- # Find text structure API examples -The [find text structure API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure) provides a starting point for ingesting data into {{es}} in a format that is suitable for subsequent use with other Elastic Stack functionality. This page shows you examples of using the API. +The [find text structure API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure) provides a starting point for ingesting data into {{es}} in a format that is suitable for subsequent use with other {{stack}} functionality. This page shows you examples of using the API. ## Finding the structure of NYC yellow cab example data [find-structure-example-nyc] diff --git a/docs/reference/elasticsearch/rest-apis/highlighting.md b/docs/reference/elasticsearch/rest-apis/highlighting.md index a2ea3185094b3..d175c9eac117e 100644 --- a/docs/reference/elasticsearch/rest-apis/highlighting.md +++ b/docs/reference/elasticsearch/rest-apis/highlighting.md @@ -8,7 +8,7 @@ applies_to: # Highlighting [highlighting] -Highlighters enable you to retrieve the best-matching highlighted snippets from one or more fields in your search results so you can show users where the query matches are. When you request highlights, the response contains an additional `highlight` element for each search hit that includes the highlighted fields and the highlighted fragments. +You can use the Search API's [`highlight` parameter](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-body-application-json-highlight)to retrieve the best-matching highlighted snippets from one or more fields in your search results so you can show users where the query matches are. When you request highlights, the response contains an additional `highlight` element for each search hit that includes the highlighted fields and the highlighted fragments. For the most up-to-date API details, refer to [search APIs](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-search). ::::{note} Highlighters don’t reflect the boolean logic of a query when extracting terms to highlight. Thus, for some complex boolean queries (e.g nested boolean queries, queries using `minimum_should_match` etc.), parts of documents may be highlighted that don’t correspond to query matches. diff --git a/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control.md b/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control.md index 3e9db8feb348f..c04062187afa9 100644 --- a/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control.md +++ b/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control.md @@ -7,9 +7,9 @@ applies_to: # Optimistic concurrency control [optimistic-concurrency-control] -Elasticsearch is distributed. When documents are created, updated, or deleted, the new version of the document has to be replicated to other nodes in the cluster. Elasticsearch is also asynchronous and concurrent, meaning that these replication requests are sent in parallel, and may arrive at their destination out of sequence. Elasticsearch needs a way of ensuring that an older version of a document never overwrites a newer version. +{{es}} is distributed. When documents are created, updated, or deleted, the new version of the document has to be replicated to other nodes in the cluster. {{es}} is also asynchronous and concurrent, meaning that these replication requests are sent in parallel, and may arrive at their destination out of sequence. {{es}} needs a way of ensuring that an older version of a document never overwrites a newer version. -To ensure an older version of a document doesn’t overwrite a newer version, every operation performed to a document is assigned a sequence number by the primary shard that coordinates that change. The sequence number is increased with each operation and thus newer operations are guaranteed to have a higher sequence number than older operations. Elasticsearch can then use the sequence number of operations to make sure a newer document version is never overridden by a change that has a smaller sequence number assigned to it. +To ensure an older version of a document doesn’t overwrite a newer version, every operation performed to a document is assigned a sequence number by the primary shard that coordinates that change. The sequence number is increased with each operation and thus newer operations are guaranteed to have a higher sequence number than older operations. {{es}} can then use the sequence number of operations to make sure a newer document version is never overridden by a change that has a smaller sequence number assigned to it. For example, the following indexing command will create a document and assign it an initial sequence number and primary term: @@ -41,7 +41,7 @@ You can see the assigned sequence number and primary term in the `_seq_no` and ` % TESTRESPONSE[s/"_seq_no": 362/"_seq_no": $body._seq_no/] % TESTRESPONSE[s/"_primary_term": 2/"_primary_term": $body._primary_term/] -Elasticsearch keeps tracks of the sequence number and primary term of the last operation to have changed each of the documents it stores. The sequence number and primary term are returned in the `_seq_no` and `_primary_term` fields in the response of the [GET API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get): +{{es}} keeps tracks of the sequence number and primary term of the last operation to have changed each of the documents it stores. The sequence number and primary term are returned in the `_seq_no` and `_primary_term` fields in the response of the [GET API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get): ```console GET products/_doc/1567 diff --git a/docs/reference/elasticsearch/rest-apis/paginate-search-results.md b/docs/reference/elasticsearch/rest-apis/paginate-search-results.md index d99cf88fd317c..f3b202caf5b8f 100644 --- a/docs/reference/elasticsearch/rest-apis/paginate-search-results.md +++ b/docs/reference/elasticsearch/rest-apis/paginate-search-results.md @@ -7,7 +7,7 @@ applies_to: # Paginate search results [paginate-search-results] -By default, searches return the top 10 matching hits. To page through a larger set of results, you can use the [search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search)'s `from` and `size` parameters. The `from` parameter defines the number of hits to skip, defaulting to `0`. The `size` parameter is the maximum number of hits to return. Together, these two parameters define a page of results. +By default, searches return the top 10 matching hits. To page through a larger set of results, you can use the [search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search)'s [`from`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-from) and [`size`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-size) parameters. The `from` parameter defines the number of hits to skip, defaulting to `0`. The `size` parameter is the maximum number of hits to return. Together, these two parameters define a page of results. ```console GET /_search diff --git a/docs/reference/elasticsearch/rest-apis/query-api-keys.md b/docs/reference/elasticsearch/rest-apis/query-api-keys.md index 57a578d1c9198..ad162c3378279 100644 --- a/docs/reference/elasticsearch/rest-apis/query-api-keys.md +++ b/docs/reference/elasticsearch/rest-apis/query-api-keys.md @@ -8,7 +8,7 @@ navigation_title: Query API key information # Query API key information examples -This page provides usage examples for the [Query API key information API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys), which retrieves API key metadata in a paginated fashion. These examples demonstrate how to retrieve, filter, sort, and aggregate API key data using query DSL and aggregation features. +The [Query API key information API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys) retrieves API key metadata in a paginated fashion. This page shows examples to demonstrate how to retrieve, filter, sort, and aggregate API key data using query DSL and aggregation features. You can learn how to: diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index ec1d53f9a0155..21de428c9d752 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -9,7 +9,7 @@ applies_to: # Reindex indices examples -This page provides examples of how to use the [Reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex). +The [Reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex) copies documents from a source index, data stream, or alias to a destination, allowing for optional data modification via scripts or ingest pipelines. You can learn how to: diff --git a/docs/reference/elasticsearch/rest-apis/rescore-search-results.md b/docs/reference/elasticsearch/rest-apis/rescore-search-results.md index 6f253279cc199..5814f013efd98 100644 --- a/docs/reference/elasticsearch/rest-apis/rescore-search-results.md +++ b/docs/reference/elasticsearch/rest-apis/rescore-search-results.md @@ -8,10 +8,7 @@ applies_to: # Rescore search results -Rescoring can help to improve precision by reordering just the top -(e.g. 100 - 500) documents returned by initial retrieval phase -(query, knn search) by using a secondary (usually more costly) algorithm, -instead of applying the costly algorithm to all documents in the index. +You can use the Search API's [`rescore` parameter](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-body-application-json-rescore)to rescore the top documents returned by a search request. Rescoring can help improve precision by reordering just the top (e.g. 100 - 500) documents returned by the initial retrieval phase (query, knn search) by using a secondary (usually more costly) algorithm, instead of applying the costly algorithm to all documents in the index. ## How `rescore` works [rescore] diff --git a/docs/reference/elasticsearch/rest-apis/retrieve-inner-hits.md b/docs/reference/elasticsearch/rest-apis/retrieve-inner-hits.md index 0f95d57d61ca1..a27a33b0e49b1 100644 --- a/docs/reference/elasticsearch/rest-apis/retrieve-inner-hits.md +++ b/docs/reference/elasticsearch/rest-apis/retrieve-inner-hits.md @@ -7,7 +7,7 @@ applies_to: # Retrieve inner hits [inner-hits] -The [parent-join](/reference/elasticsearch/mapping-reference/parent-join.md) and [nested](/reference/elasticsearch/mapping-reference/nested.md) features allow the return of documents that have matches in a different scope. In the parent/child case, parent documents are returned based on matches in child documents or child documents are returned based on matches in parent documents. In the nested case, documents are returned based on matches in nested inner objects. +Use the [search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) with the `inner_hits` parameter to retrieve the exact nested or parent/child documents that caused each search hit to match. The [parent-join](/reference/elasticsearch/mapping-reference/parent-join.md) and [nested](/reference/elasticsearch/mapping-reference/nested.md) features allow the return of documents that have matches in a different scope. In the parent/child case, parent documents are returned based on matches in child documents or child documents are returned based on matches in parent documents. In the nested case, documents are returned based on matches in nested inner objects. In both cases, the actual matches in the different scopes that caused a document to be returned are hidden. In many cases, it’s very useful to know which inner nested objects (in the case of nested) or children/parent documents (in the case of parent/child) caused certain information to be returned. The inner hits feature can be used for this. This feature returns per search hit in the search response additional nested hits that caused a search hit to match in a different scope. diff --git a/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields.md b/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields.md index 34fb91c531b95..f3818c3c3906d 100644 --- a/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields.md +++ b/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields.md @@ -8,7 +8,7 @@ applies_to: # Retrieve stored fields using the Get document API [get-stored-fields] -Use the `stored_fields` query parameter in a [Get document](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get) API request to retrieve fields marked as stored (`"store": true`) in the index mapping. +You can use the Get API's [`stored_fields` parameter](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get#operation-get-stored_fields) to retrieve fields marked as stored (`"store": true`) in the index mapping. Fields not marked as stored are excluded from the response, even if specified in the request. diff --git a/docs/reference/elasticsearch/rest-apis/search-suggesters.md b/docs/reference/elasticsearch/rest-apis/search-suggesters.md index 08b72601867d5..d44b1c6c039ba 100644 --- a/docs/reference/elasticsearch/rest-apis/search-suggesters.md +++ b/docs/reference/elasticsearch/rest-apis/search-suggesters.md @@ -7,7 +7,7 @@ applies_to: --- # Suggester examples [search-suggesters] -The suggest feature suggests similar looking terms based on a provided text by using a suggester. The suggest request part is defined alongside the query part in a `_search` request. If the query part is left out, only suggestions are returned. +The [suggest parameter of the search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-body-application-json-suggest) suggests similar looking terms based on a provided text by using a suggester. The suggest request part is defined alongside the query part in a `_search` request. If the query part is left out, only suggestions are returned. ::::{note} For the most up-to-date details, refer to [Search APIs](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-search). diff --git a/docs/reference/elasticsearch/rest-apis/sort-search-results.md b/docs/reference/elasticsearch/rest-apis/sort-search-results.md index b9822d4970f7c..82408044acb31 100644 --- a/docs/reference/elasticsearch/rest-apis/sort-search-results.md +++ b/docs/reference/elasticsearch/rest-apis/sort-search-results.md @@ -7,7 +7,7 @@ applies_to: # Sort search results -Allows you to add one or more sorts on specific fields. Each sort can be reversed as well. The sort is defined on a per field level, with special field name for `_score` to sort by score, and `_doc` to sort by index order. +The [sortparameter in the search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-body-application-json-sort) allows you to add one or more sorts on specific fields. Each sort can be reversed as well. The sort is defined on a per field level, with special field name for `_score` to sort by score, and `_doc` to sort by index order. To optimize sorting performance, avoid sorting by [`text`](/reference/elasticsearch/mapping-reference/text.md)fields; instead, use [`keyword`](/reference/elasticsearch/mapping-reference/keyword.md) or [`numerical`](/reference/elasticsearch/mapping-reference/number.md) fields. Additionally, you can improve performance by enabling pre-sorting at index time using [index sorting](/reference/elasticsearch/index-settings/sorting.md). While this can speed up query-time sorting, it may reduce indexing performance and increase memory usage. diff --git a/docs/reference/elasticsearch/rest-apis/term-vectors-examples.md b/docs/reference/elasticsearch/rest-apis/term-vectors-examples.md index 05e78efdede6b..3d7dd582a5fc9 100644 --- a/docs/reference/elasticsearch/rest-apis/term-vectors-examples.md +++ b/docs/reference/elasticsearch/rest-apis/term-vectors-examples.md @@ -5,9 +5,9 @@ navigation_title: Term vectors API examples --- # Term vectors API examples -[Term vectors](/reference/elasticsearch/mapping-reference/term-vector.md) provide information about the terms that were produced by the analysis process, including term frequencies, positions, offsets, and payloads. They're useful for applications like highlighting, more-like-this queries, and text analysis. +The [term vectors API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors) retrieves information and statistics about terms in the fields of a stored or artificial document, including their frequency, positions, and offsets. -This page shows you examples of using the [term vectors API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors). +[Term vectors](/reference/elasticsearch/mapping-reference/term-vector.md) provide information about the terms that were produced by the analysis process, including term frequencies, positions, offsets, and payloads. They're useful for applications like highlighting, more-like-this queries, and text analysis. ## Returning stored term vectors [docs-termvectors-api-stored-termvectors] diff --git a/docs/reference/elasticsearch/rest-apis/update-by-query-api.md b/docs/reference/elasticsearch/rest-apis/update-by-query-api.md index 00bc1bc8b0221..70011fabc391b 100644 --- a/docs/reference/elasticsearch/rest-apis/update-by-query-api.md +++ b/docs/reference/elasticsearch/rest-apis/update-by-query-api.md @@ -8,7 +8,7 @@ applies_to: # Update by query API examples -This page provides examples of how to use the [Update by query API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query). +The [Update by query API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query) updates all documents that match a specified query, enabling bulk modification of the document source or metadata via a script. You can learn how to: diff --git a/docs/reference/elasticsearch/rest-apis/vector-tile-search.md b/docs/reference/elasticsearch/rest-apis/vector-tile-search.md index 772525ed45d55..323357fb88ccc 100644 --- a/docs/reference/elasticsearch/rest-apis/vector-tile-search.md +++ b/docs/reference/elasticsearch/rest-apis/vector-tile-search.md @@ -8,7 +8,7 @@ navigation_title: Vector tile search API # Vector tile search API examples -This page shows how to create an index with geospatial data and retrieve vector tile results using the [vector tile search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt-1). +The [vector tile search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt-1) searches for geospatial data within a specific tile coordinate (zoom/x/y) and returns the results as a binary Mapbox Vector Tile (MVT) containing hits, aggregations, and metadata. This page shows how to create an index with geospatial data and retrieve vector tile results using the API. You can learn how to: