-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Vadim Dalecky <[email protected]>
- Loading branch information
Showing
3 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# search | ||
|
||
The `search` service provides you with APIs to query elasticsearch. | ||
The `search` service provides you with APIs to query Elasticsearch. | ||
|
||
The services are split into two parts: | ||
The services are split into two parts: (1) low-level API; and (2) high-level API. | ||
|
||
# low level API | ||
## Low-level API | ||
|
||
With low level API you work directly with elasticsearch DSL | ||
|
||
```typescript | ||
const results = await data.search.search(request, params); | ||
``` | ||
|
||
# high level API | ||
## High-level API | ||
|
||
With high level API you work with kibana abstractions around elasticsearch DSL: filters, queries and aggregations. | ||
Using high-level API you work with Kibana abstractions around Elasticsearch DSL: filters, queries, and aggregations. Provided by the *Search Source* service. | ||
|
||
```typescript | ||
const search = data.search.searchSource.createEmpty(); | ||
search.setField('query', data.query.queryString); | ||
const results = await search.fetch(); | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters