|
@@ -6,12 +6,11 @@ that match the query. The query can either be provided using a simple
|
|
|
<<search-uri-request,query string as a parameter>>, or using a
|
|
|
<<search-request-body,request body>>.
|
|
|
|
|
|
-["float",id="search-multi-index-type"]
|
|
|
-=== Multi-Index, Multi-Type
|
|
|
+["float",id="search-multi-index"]
|
|
|
+=== Multi-Index
|
|
|
|
|
|
-All search APIs can be applied across multiple types within an index, and
|
|
|
-across multiple indices with support for the
|
|
|
-<<multi-index,multi index syntax>>. For
|
|
|
+All search APIs can be applied across multiple indices with support for
|
|
|
+the <<multi-index,multi index syntax>>. For
|
|
|
example, we can search on all documents within the twitter index:
|
|
|
|
|
|
[source,js]
|
|
@@ -21,8 +20,8 @@ GET /twitter/_search?q=user:kimchy
|
|
|
// CONSOLE
|
|
|
// TEST[setup:twitter]
|
|
|
|
|
|
-We can also search all tweets with a certain tag across several indices
|
|
|
-(for example, when each user has his own index):
|
|
|
+We can also search all documents with a certain tag across several indices
|
|
|
+(for example, when there is one index per user):
|
|
|
|
|
|
[source,js]
|
|
|
--------------------------------------------------
|
|
@@ -31,21 +30,11 @@ GET /kimchy,elasticsearch/_search?q=tag:wow
|
|
|
// CONSOLE
|
|
|
// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
|
|
|
|
|
|
-Or we can search all tweets across all available indices using `_all`
|
|
|
-placeholder:
|
|
|
+Or we can search across all available indices using `_all`:
|
|
|
|
|
|
[source,js]
|
|
|
---------------------------------------------------
|
|
|
+---------------------------------------------------
|
|
|
GET /_all/_search?q=tag:wow
|
|
|
---------------------------------------------------
|
|
|
-// CONSOLE
|
|
|
-// TEST[setup:twitter]
|
|
|
-
|
|
|
-Or even search across all indices and all types:
|
|
|
-
|
|
|
-[source,js]
|
|
|
---------------------------------------------------
|
|
|
-GET /_search?q=tag:wow
|
|
|
---------------------------------------------------
|
|
|
+---------------------------------------------------
|
|
|
// CONSOLE
|
|
|
-// TEST[setup:twitter]
|
|
|
+// TEST[setup:twitter]
|