Skip to content

Commit

Permalink
[DOCS] Update anchors and links for Elasticsearch API relocation (ela…
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodewig committed Jul 19, 2019
1 parent 76c7e3a commit d46545f
Show file tree
Hide file tree
Showing 56 changed files with 106 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ public void flushAsync(FlushRequest flushRequest, RequestOptions options, Action

/**
* Initiate a synced flush manually using the synced flush API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html">
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api">
* Synced flush API on elastic.co</a>
* @param syncedFlushRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
Expand All @@ -583,7 +583,7 @@ public SyncedFlushResponse flushSynced(SyncedFlushRequest syncedFlushRequest, Re

/**
* Asynchronously initiate a synced flush manually using the synced flush API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html">
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api">
* Synced flush API on elastic.co</a>
* @param syncedFlushRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,9 @@ public final void msearchAsync(MultiSearchRequest searchRequest, RequestOptions

/**
* Executes a search using the Search Scroll API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html">Search Scroll
* API on elastic.co</a>
* See <a
* href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll">Search
* Scroll API on elastic.co</a>
* @param searchScrollRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return the response
Expand All @@ -1024,8 +1025,9 @@ public final SearchResponse searchScroll(SearchScrollRequest searchScrollRequest

/**
* Executes a search using the Search Scroll API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html">Search Scroll
* API on elastic.co</a>
* See <a
* href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll">Search
* Scroll API on elastic.co</a>
* @param searchScrollRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return the response
Expand All @@ -1037,8 +1039,9 @@ public final SearchResponse scroll(SearchScrollRequest searchScrollRequest, Requ

/**
* Asynchronously executes a search using the Search Scroll API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html">Search Scroll
* API on elastic.co</a>
* See <a
* href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll">Search
* Scroll API on elastic.co</a>
* @param searchScrollRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @param listener the listener to be notified upon request completion
Expand All @@ -1052,8 +1055,9 @@ public final void searchScrollAsync(SearchScrollRequest searchScrollRequest, Req

/**
* Asynchronously executes a search using the Search Scroll API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html">Search Scroll
* API on elastic.co</a>
* See <a
* href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll">Search
* Scroll API on elastic.co</a>
* @param searchScrollRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @param listener the listener to be notified upon request completion
Expand All @@ -1066,7 +1070,8 @@ public final void scrollAsync(SearchScrollRequest searchScrollRequest, RequestOp

/**
* Clears one or more scroll ids using the Clear Scroll API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html#_clear_scroll_api">
* See <a
* href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api">
* Clear Scroll API on elastic.co</a>
* @param clearScrollRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
Expand All @@ -1079,7 +1084,8 @@ public final ClearScrollResponse clearScroll(ClearScrollRequest clearScrollReque

/**
* Asynchronously clears one or more scroll ids using the Clear Scroll API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html#_clear_scroll_api">
* See <a
* href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api">
* Clear Scroll API on elastic.co</a>
* @param clearScrollRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
Expand Down
2 changes: 1 addition & 1 deletion docs/java-rest/high-level/document/multi-get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ include-tagged::{doc-tests-file}[{api}-request-item-extras]
<2> Version
<3> Version type

{ref}/search-request-preference.html[`preference`],
{ref}/search-request-body.html#request-body-search-preference[`preference`],
{ref}/docs-get.html#realtime[`realtime`]
and
{ref}/docs-get.html#get-refresh[`refresh`] can be set on the main request but
Expand Down
6 changes: 3 additions & 3 deletions docs/java-rest/high-level/search/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ include-tagged::{doc-tests-file}[{api}-request-profiling-queries-results]
<3> Retrieve the time in millis spent executing the Lucene query
<4> Retrieve the profile results for the sub-queries (if any)

The Rest API documentation contains more information about {ref}/search-profile-queries.html[Profiling Queries] with
The Rest API documentation contains more information about {ref}/search-profile.html#profiling-queries[Profiling Queries] with
a description of the query profiling information.

The `QueryProfileShardResult` also gives access to the profiling information for the Lucene collectors:
Expand All @@ -445,7 +445,7 @@ include-tagged::{doc-tests-file}[{api}-request-profiling-queries-collectors]
<4> Retrieve the profile results for the sub-collectors (if any)

The Rest API documentation contains more information about profiling information
for Lucene collectors. See {ref}/search-profile-queries.html[Profiling queries].
for Lucene collectors. See {ref}/search-profile.html#profiling-queries[Profiling queries].

In a very similar manner to the query tree execution, the `QueryProfileShardResult` objects gives access
to the detailed aggregations tree execution:
Expand All @@ -461,4 +461,4 @@ include-tagged::{doc-tests-file}[{api}-request-profiling-aggs]
<5> Retrieve the profile results for the sub-aggregations (if any)

The Rest API documentation contains more information about
{ref}/search-profile-aggregations.html[Profiling aggregations].
{ref}/search-profile.html#profiling-aggregations[Profiling aggregations].
4 changes: 2 additions & 2 deletions docs/painless/painless-contexts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ specialized code may define new ways to use a Painless script.
| Reindex | <<painless-reindex-context, Painless Documentation>>
| {ref}/docs-reindex.html[Elasticsearch Documentation]
| Sort | <<painless-sort-context, Painless Documentation>>
| {ref}/search-request-sort.html[Elasticsearch Documentation]
| {ref}/search-request-body.html#request-body-search-sort[Elasticsearch Documentation]
| Similarity | <<painless-similarity-context, Painless Documentation>>
| {ref}/index-modules-similarity.html[Elasticsearch Documentation]
| Weight | <<painless-weight-context, Painless Documentation>>
| {ref}/index-modules-similarity.html[Elasticsearch Documentation]
| Score | <<painless-score-context, Painless Documentation>>
| {ref}/query-dsl-function-score-query.html[Elasticsearch Documentation]
| Field | <<painless-field-context, Painless Documentation>>
| {ref}/search-request-script-fields.html[Elasticsearch Documentation]
| {ref}/search-request-body.html#request-body-search-script-fields[Elasticsearch Documentation]
| Filter | <<painless-filter-context, Painless Documentation>>
| {ref}/query-dsl-script-query.html[Elasticsearch Documentation]
| Minimum should match | <<painless-min-should-match-context, Painless Documentation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=== Field context

Use a Painless script to create a
{ref}/search-request-script-fields.html[script field] to return
{ref}/search-request-body.html#request-body-search-script-fields[script field] to return
a customized value for each document in the results of a query.

*Variables*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=== Sort context

Use a Painless script to
{ref}/search-request-sort.html[sort] the documents in a query.
{ref}/search-request-body.html#request-body-search-sort[sort] the documents in a query.

*Variables*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A multi-bucket aggregation that creates composite buckets from different sources
Unlike the other `multi-bucket` aggregation the `composite` aggregation can be used
to paginate **all** buckets from a multi-level aggregation efficiently. This aggregation
provides a way to stream **all** buckets of a specific aggregation similarly to what
<<search-request-scroll, scroll>> does for documents.
<<request-body-search-scroll, scroll>> does for documents.

The composite buckets are built from the combinations of the
values extracted/created for each document and each combination is considered as
Expand Down
18 changes: 9 additions & 9 deletions docs/reference/aggregations/metrics/tophits-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ One or more bucket aggregators determines by which properties a result set get s

The top_hits aggregation returns regular search hits, because of this many per hit features can be supported:

* <<search-request-highlighting,Highlighting>>
* <<search-request-explain,Explain>>
* <<search-request-named-queries-and-filters,Named filters and queries>>
* <<search-request-source-filtering,Source filtering>>
* <<search-request-stored-fields,Stored fields>>
* <<search-request-script-fields,Script fields>>
* <<search-request-docvalue-fields,Doc value fields>>
* <<search-request-version,Include versions>>
* <<search-request-seq-no-primary-term,Include Sequence Numbers and Primary Terms>>
* <<request-body-search-highlighting,Highlighting>>
* <<request-body-search-explain,Explain>>
* <<request-body-search-queries-and-filters,Named filters and queries>>
* <<request-body-search-source-filtering,Source filtering>>
* <<request-body-search-stored-fields,Stored fields>>
* <<request-body-search-script-fields,Script fields>>
* <<request-body-search-docvalue-fields,Doc value fields>>
* <<request-body-search-version,Include versions>>
* <<request-body-search-seq-no-primary-term,Include Sequence Numbers and Primary Terms>>

==== Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ is ascending.
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`sort` |The list of fields to sort on. See <<search-request-sort,`sort`>> for more details. |Optional |
|`sort` |The list of fields to sort on. See <<request-body-search-sort,`sort`>> for more details. |Optional |
|`from` |Buckets in positions prior to the set value will be truncated. |Optional | `0`
|`size` |The number of buckets to return. Defaults to all buckets of the parent aggregation. |Optional |
|`gap_policy` |The policy to apply when gaps are found in the data (see <<gap-policy>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Edge N-Grams are useful for _search-as-you-type_ queries.

TIP: When you need _search-as-you-type_ for text which has a widely known
order, such as movie or song titles, the
<<search-suggesters-completion,completion suggester>> is a much more efficient
<<completion-suggester,completion suggester>> is a much more efficient
choice than edge N-grams. Edge N-grams have the advantage when trying to
autocomplete words that can appear in any order.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/docs/concurrency-control.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ returns:


Note: The <<search-search,Search API>> can return the `_seq_no` and `_primary_term`
for each search hit by setting <<search-request-seq-no-primary-term,`seq_no_primary_term` parameter>>.
for each search hit by setting <<request-body-search-seq-no-primary-term,`seq_no_primary_term` parameter>>.

The sequence number and the primary term uniquely identify a change. By noting down
the sequence number and primary term returned, you can make sure to only change the
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/docs/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Control when the changes made by this request are visible to search. See

Allows to control if and how the updated source should be returned in the response.
By default the updated source is not returned.
See <<search-request-source-filtering, Source filtering>> for details.
See <<request-body-search-source-filtering, Source filtering>> for details.

`if_seq_no` and `if_primary_term`::

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ The accuracy of `hits.total` is controlled by the request parameter `track_total
the request will track the total hits accurately (`"relation": "eq"`). It defaults to `10,000`
which means that the total hit count is accurately tracked up to `10,000` documents.
You can force an accurate count by setting `track_total_hits` to true explicitly.
See the <<search-request-track-total-hits, request body>> documentation
See the <<request-body-search-track-total-hits, request body>> documentation
for more details.

Here is the same exact search above using the alternative request body method:
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/how-to/general.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Elasticsearch is designed as a search engine, which makes it very good at
getting back the top documents that match a query. However, it is not as good
for workloads that fall into the database domain, such as retrieving all
documents that match a particular query. If you need to do this, make sure to
use the <<search-request-scroll,Scroll>> API.
use the <<request-body-search-scroll,Scroll>> API.

[float]
[[maximum-document-size]]
Expand All @@ -27,7 +27,7 @@ needs to fetch the `_id` of the document in all cases, and the cost of getting
this field is bigger for large documents due to how the filesystem cache works.
Indexing this document can use an amount of memory that is a multiplier of the
original size of the document. Proximity search (phrase queries for instance)
and <<search-request-highlighting,highlighting>> also become more expensive
and <<request-body-search-highlighting,highlighting>> also become more expensive
since their cost directly depends on the size of the original document.

It is sometimes useful to reconsider what the unit of information should be.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/how-to/recipes/scoring.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ are different too.

The recommended way to work around this issue is to use a string that identifies
the user that is logged is (a user id or session id for instance) as a
<<search-request-preference,preference>>. This ensures that all queries of a
<<request-body-search-preference,preference>>. This ensures that all queries of a
given user are always going to hit the same shards, so scores remain more
consistent across queries.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/index-modules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ specific index module:
The maximum value of `from + size` for searches to this index. Defaults to
`10000`. Search requests take heap memory and time proportional to
`from + size` and this limits that memory. See
<<search-request-scroll,Scroll>> or <<search-request-search-after,Search After>> for a more efficient alternative
<<request-body-search-scroll,Scroll>> or <<request-body-search-search-after,Search After>> for a more efficient alternative
to raising this.

`index.max_inner_result_window`::
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/index-modules/allocation/delayed.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ this scenario:
If the master had just waited for a few minutes, then the missing shards could
have been re-allocated to Node 5 with the minimum of network traffic. This
process would be even quicker for idle shards (shards not receiving indexing
requests) which have been automatically <<indices-synced-flush,sync-flushed>>.
requests) which have been automatically <<synced-flush-api,sync-flushed>>.

The allocation of replica shards which become unassigned because a node has
left can be delayed with the `index.unassigned.node_left.delayed_timeout`
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/mapping.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Each field has a data `type` which can be:
* a type which supports the hierarchical nature of JSON such as
<<object,`object`>> or <<nested,`nested`>>.
* or a specialised type like <<geo-point,`geo_point`>>,
<<geo-shape,`geo_shape`>>, or <<search-suggesters-completion,`completion`>>.
<<geo-shape,`geo_shape`>>, or <<completion-suggester,`completion`>>.

It is often useful to index the same field in different ways for different
purposes. For instance, a `string` field could be <<mapping-index,indexed>> as
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/mapping/fields/source-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ available then a number of features are not supported:
* The <<docs-update,`update`>>, <<docs-update-by-query,`update_by_query`>>,
and <<docs-reindex,`reindex`>> APIs.
* On the fly <<search-request-highlighting,highlighting>>.
* On the fly <<request-body-search-highlighting,highlighting>>.
* The ability to reindex from one Elasticsearch index to another, either
to change mappings or analysis, or to upgrade an index to a new major
Expand Down Expand Up @@ -77,7 +77,7 @@ stored.
WARNING: Removing fields from the `_source` has similar downsides to disabling
`_source`, especially the fact that you cannot reindex documents from one
Elasticsearch index to another. Consider using
<<search-request-source-filtering,source filtering>> instead.
<<request-body-search-source-filtering,source filtering>> instead.

The `includes`/`excludes` parameters (which also accept wildcards) can be used
as follows:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/mapping/params/store.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Usually this doesn't matter. The field value is already part of the
<<mapping-source-field,`_source` field>>, which is stored by default. If you
only want to retrieve the value of a single field or of a few fields, instead
of the whole `_source`, then this can be achieved with
<<search-request-source-filtering,source filtering>>.
<<request-body-search-source-filtering,source filtering>>.

In certain situations it can make sense to `store` a field. For instance, if
you have a document with a `title`, a `date`, and a very large `content`
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/mapping/types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ string:: <<text,`text`>> and <<keyword,`keyword`>>
=== Specialised datatypes

<<ip>>:: `ip` for IPv4 and IPv6 addresses
<<search-suggesters-completion,Completion datatype>>::
<<completion-suggester,Completion datatype>>::
`completion` to provide auto-complete suggestions
<<token-count>>:: `token_count` to count the number of tokens in a string
{plugins}/mapper-murmur3.html[`mapper-murmur3`]:: `murmur3` to compute hashes of values at index-time and store them in the index
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/mapping/types/nested.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ For instance, if a string field within a nested document has
during the highlighting, these offsets will not be available during the main highlighting
phase. Instead, highlighting needs to be performed via
<<nested-inner-hits,nested inner hits>>. The same consideration applies when loading
fields during a search through <<search-request-docvalue-fields, `docvalue_fields`>>
or <<search-request-stored-fields, `stored_fields`>>.
fields during a search through <<request-body-search-docvalue-fields, `docvalue_fields`>>
or <<request-body-search-stored-fields, `stored_fields`>>.
=============================================

Expand Down
Loading

0 comments on commit d46545f

Please sign in to comment.