Skip to content

Commit d877b93

Browse files
jtibshiranikcm
authored andcommitted
Remove references to multiple types in the search documentation. (#34625)
1 parent 919f632 commit d877b93

File tree

7 files changed

+26
-41
lines changed

7 files changed

+26
-41
lines changed

docs/reference/search.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[partintro]
55
--
66

7-
Most search APIs are <<search-multi-index-type,multi-index&#44; multi-type>>, with the
7+
Most search APIs are <<search-multi-index,multi-index>>, with the
88
exception of the <<search-explain>> endpoints.
99

1010
[float]

docs/reference/search/count.asciidoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
== Count API
33

44
The count API allows to easily execute a query and get the number of
5-
matches for that query. It can be executed across one or more indices
6-
and across one or more types. The query can either be provided using a
7-
simple query string as a parameter, or using the
8-
<<query-dsl,Query DSL>> defined within the request
5+
matches for that query. It can be executed across one or more indices.
6+
The query can either be provided using a simple query string as a
7+
parameter, or using the <<query-dsl,Query DSL>> defined within the request
98
body. Here is an example:
109

1110
[source,js]
@@ -50,9 +49,9 @@ The query is optional, and when not provided, it will use `match_all` to
5049
count all the docs.
5150

5251
[float]
53-
=== Multi index, Multi type
52+
=== Multi index
5453

55-
The count API can be applied to <<search-multi-index-type,multiple types in multiple indices>>.
54+
The count API can be applied to <<search-multi-index,multiple indices>>.
5655

5756
[float]
5857
=== Request Parameters

docs/reference/search/explain.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ The explain api computes a score explanation for a query and a specific
55
document. This can give useful feedback whether a document matches or
66
didn't match a specific query.
77

8-
The `index` and `type` parameters expect a single index and a single
9-
type respectively.
8+
Note that a single index must be provided to the `index` parameter.
109

1110
[float]
1211
=== Usage

docs/reference/search/multi-search.asciidoc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ body\n
2222
may be preceded by a carriage return `\r`. When sending requests to this endpoint the
2323
`Content-Type` header should be set to `application/x-ndjson`.
2424

25-
The header part includes which index / indices to search on, optional
26-
(mapping) types to search on, the `search_type`, `preference`, and
27-
`routing`. The body includes the typical search body request (including
28-
the `query`, `aggregations`, `from`, `size`, and so on). Here is an example:
25+
The header part includes which index / indices to search on, the `search_type`, `preference`,
26+
and `routing`. The body includes the typical search body request (including the `query`,
27+
`aggregations`, `from`, `size`, and so on). Here is an example:
2928

3029
[source,js]
3130
--------------------------------------------------
@@ -58,9 +57,9 @@ the original multi search request. If there was a complete failure for that
5857
specific search request, an object with `error` message and corresponding
5958
status code will be returned in place of the actual search response.
6059

61-
The endpoint allows to also search against an index/indices and
62-
type/types in the URI itself, in which case it will be used as the
63-
default unless explicitly defined otherwise in the header. For example:
60+
The endpoint allows to also search against an index/indices in the URI itself,
61+
in which case it will be used as the default unless explicitly defined otherwise
62+
in the header. For example:
6463

6564
[source,js]
6665
--------------------------------------------------

docs/reference/search/request/scroll.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ POST <1> /_search/scroll <2>
6767
// TEST[continued s/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==/$body._scroll_id/]
6868

6969
<1> `GET` or `POST` can be used.
70-
<2> The URL should not include the `index` or `type` name -- these
71-
are specified in the original `search` request instead.
70+
<2> The URL should not include the `index` name -- this
71+
is specified in the original `search` request instead.
7272
<3> The `scroll` parameter tells Elasticsearch to keep the search context open
7373
for another `1m`.
7474
<4> The `scroll_id` parameter

docs/reference/search/search-template.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ body\n
613613
--------------------------------------------------
614614
// NOTCONSOLE
615615

616-
The header part supports the same `index`, `types`, `search_type`,
616+
The header part supports the same `index`, `search_type`,
617617
`preference`, and `routing` options as the usual Multi Search API.
618618

619619
The body includes a search template body request and supports inline,
@@ -624,7 +624,6 @@ stored and file templates. Here is an example:
624624
$ cat requests
625625
{"index": "test"}
626626
{"source": {"query": {"match": {"user" : "{{username}}" }}}, "params": {"username": "john"}} <1>
627-
{"index": "_all", "types": "accounts"}
628627
{"source": {"query": {"{{query_type}}": {"name": "{{name}}" }}}, "params": {"query_type": "match_phrase_prefix", "name": "Smith"}}
629628
{"index": "_all"}
630629
{"id": "template_1", "params": {"query_string": "search for these words" }} <2>

docs/reference/search/search.asciidoc

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ that match the query. The query can either be provided using a simple
66
<<search-uri-request,query string as a parameter>>, or using a
77
<<search-request-body,request body>>.
88

9-
["float",id="search-multi-index-type"]
10-
=== Multi-Index, Multi-Type
9+
["float",id="search-multi-index"]
10+
=== Multi-Index
1111

12-
All search APIs can be applied across multiple types within an index, and
13-
across multiple indices with support for the
14-
<<multi-index,multi index syntax>>. For
12+
All search APIs can be applied across multiple indices with support for
13+
the <<multi-index,multi index syntax>>. For
1514
example, we can search on all documents within the twitter index:
1615

1716
[source,js]
@@ -21,8 +20,8 @@ GET /twitter/_search?q=user:kimchy
2120
// CONSOLE
2221
// TEST[setup:twitter]
2322

24-
We can also search all tweets with a certain tag across several indices
25-
(for example, when each user has his own index):
23+
We can also search all documents with a certain tag across several indices
24+
(for example, when there is one index per user):
2625

2726
[source,js]
2827
--------------------------------------------------
@@ -31,21 +30,11 @@ GET /kimchy,elasticsearch/_search?q=tag:wow
3130
// CONSOLE
3231
// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
3332

34-
Or we can search all tweets across all available indices using `_all`
35-
placeholder:
33+
Or we can search across all available indices using `_all`:
3634

3735
[source,js]
38-
--------------------------------------------------
36+
---------------------------------------------------
3937
GET /_all/_search?q=tag:wow
40-
--------------------------------------------------
41-
// CONSOLE
42-
// TEST[setup:twitter]
43-
44-
Or even search across all indices and all types:
45-
46-
[source,js]
47-
--------------------------------------------------
48-
GET /_search?q=tag:wow
49-
--------------------------------------------------
38+
---------------------------------------------------
5039
// CONSOLE
51-
// TEST[setup:twitter]
40+
// TEST[setup:twitter]

0 commit comments

Comments
 (0)