Skip to content

[DOC] terms_set query requires minimum_should_match but documentation says it's optional #10056

@akshansh-modi

Description

@akshansh-modi

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Tell us about your request.

The documentation for the terms_set query currently states:

“All parameters except <terms> are optional.”

However, when a query is executed without any of the following parameters:

  • minimum_should_match_field
  • minimum_should_match_script

It throws a runtime error:

"reason": "failed to create query: No minimum should match has been specified"

This implies that exactly one of these fields is required. The documentation should be corrected to reflect this mandatory requirement.

Elasticsearch, which OpenSearch is based on, explicitly documents this behavior. Their terms_set docs mention that "Exactly one of these parameters must be provided."

Related issue in OpenSearch main repo: [#18261](opensearch-project/OpenSearch#18261)


Version:
All — This issue applies to all versions of OpenSearch that support the terms_set query.


What other resources are available?


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions