Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/reference/query-dsl/terms-set-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,22 @@ GET /job-candidates/_search
`terms`::
+
--
(Required, array of strings) Array of terms you wish to find in the provided
(Required, array) Array of terms you wish to find in the provided
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove "array of strings" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the PR description. The elements are not restricted to string, but can be anything parsable to a field value, including JSON “number” types. Documenting as “array of strings” is incorrect and misleading.

`<field>`. To return a document, a required number of terms must exactly match
the field values, including whitespace and capitalization.

The required number of matching terms is defined in the
`minimum_should_match_field` or `minimum_should_match_script` parameter.
The required number of matching terms is defined in the `minimum_should_match`,
`minimum_should_match_field` or `minimum_should_match_script` parameters. Exactly
one of these parameters must be provided.
--

`minimum_should_match`::
+
--
(Optional) Specification for the number of matching terms required to return
a document.
Comment on lines +174 to +175
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(Optional) Specification for the number of matching terms required to return
a document.
(Optional, integer) Specification for the number of matching terms required to return
a document.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restricting to “integer” is incorrect. The value can be anything described on the linked documentation page, some of which are integers, but also many of which are strings with very specific formats:

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html


For valid values, see <<query-dsl-minimum-should-match, `minimum_should_match` parameter>>.
--

`minimum_should_match_field`::
Expand Down
Loading