11[[search-search]]
2- == Search
2+ == 搜索
33
4- The search API allows you to execute a search query and get back search hits
5- that match the query. The query can either be provided using a simple
6- <<search-uri-request,query string as a parameter>>, or using a
7- <<search-request-body,request body>>.
4+ 搜索 API 允许你执行搜索请求并返回匹配的搜索结果。
5+ 我们既可以通过一个简单的 <<search-uri-request, 查询字符串作为参数>>,
6+ 也可以通过 <<search-request-body, 请求体>> 来指定查询请求。
87
98["float",id="search-multi-index"]
10- === Multi-Index
9+ === 多索引
1110
12- All search APIs can be applied across multiple indices with support for
13- the <<multi-index,multi index syntax>>. For
14- example, we can search on all documents within the twitter index:
11+ 所有的搜索 API 都可以借助 <<multi-index, 多索引语法>> 来应用于多个索引。
12+ 例如,我们可以搜索 twitter 索引中的所有文档:
1513
1614[source,js]
1715--------------------------------------------------
@@ -20,8 +18,8 @@ GET /twitter/_search?q=user:kimchy
2018// CONSOLE
2119// TEST[setup:twitter]
2220
23- We can also search all documents with a certain tag across several indices
24- (for example, when there is one index per user):
21+ 我们还可以搜索具有指定标签的若干个索引中所有的推文
22+ (比如说,当每个用户都有自己的索引):
2523
2624[source,js]
2725--------------------------------------------------
@@ -30,7 +28,7 @@ GET /kimchy,elasticsearch/_search?q=tag:wow
3028// CONSOLE
3129// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
3230
33- Or we can search across all available indices using `_all`:
31+ 或者我们可以使用 `_all` 来搜索所有可用索引中的所有推文:
3432
3533[source,js]
3634---------------------------------------------------
0 commit comments