Skip to content

Commit

Permalink
Merge pull request #2485 from kuzzleio/add-fields-search-query
Browse files Browse the repository at this point in the history
Add fields property to allowed fields
  • Loading branch information
rolljee authored Oct 19, 2023
2 parents ba75dc9 + 07b1716 commit 651e1f9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/2/api/controllers/document/export/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Following arguments are available: `query`, `fields` and `fieldsName`.
An empty body matches all documents in the queried collection.

::: info
Only the following fields are available in the top level of the search body: `aggregations`, `aggs`, `collapse`, `explain`, `from`, `highlight`, `query`, `search_timeout`, `size`, `sort`, `_name`, `_source`, `_source_excludes`, `_source_includes`
Only the following fields are available in the top level of the search body: `aggregations`, `aggs`, `collapse`, `explain`, `fields`, `from`, `highlight`, `query`, `search_timeout`, `size`, `sort`, `_name`, `_source`, `_source_excludes`, `_source_includes`
:::

---
Expand Down
5 changes: 2 additions & 3 deletions doc/2/api/controllers/document/search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ When using a cursor with the `scroll` option, Elasticsearch has to duplicate the
It can lead to memory leaks if a scroll duration too large is provided, or if too many scroll sessions are open simultaneously.
:::


::: info
<SinceBadge version="2.2.0"/>
You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key.
Expand Down Expand Up @@ -179,7 +178,7 @@ or
An empty body matches all documents in the queried collection.

::: info
Only the following fields are available in the top level of the search body: `aggregations`, `aggs`, `collapse`, `explain`, `from`, `highlight`, `query`, `search_timeout`, `size`, `sort`, `_name`, `_source`, `_source_excludes`, `_source_includes`
Only the following fields are available in the top level of the search body: `aggregations`, `aggs`, `collapse`, `explain`, `fields`, `from`, `highlight`, `query`, `search_timeout`, `size`, `sort`, `_name`, `_source`, `_source_excludes`, `_source_includes`
:::

---
Expand Down Expand Up @@ -246,4 +245,4 @@ Returns a paginated search result set, with the following properties:
"index": "<index>"
"collections": ["<collection>", "<anotherCollection>"]
}
```
```
1 change: 1 addition & 0 deletions doc/2/guides/main-concepts/querying/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Elasticsearch supports many keywords in a search query root level. For security
- `aggs`
- `collapse`
- `explain`
- `fields`
- `from`
- `highlight`
- `query`
Expand Down
1 change: 1 addition & 0 deletions lib/service/storage/elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class ElasticSearch extends Service {
"aggs",
"collapse",
"explain",
"fields",
"from",
"highlight",
"query",
Expand Down

0 comments on commit 651e1f9

Please sign in to comment.