Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] No documentation for nested query type #7363

Open
1 of 4 tasks
navneet1v opened this issue Jun 11, 2024 · 6 comments
Open
1 of 4 tasks

[DOC] No documentation for nested query type #7363

navneet1v opened this issue Jun 11, 2024 · 6 comments

Comments

@navneet1v
Copy link
Contributor

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. Provide a summary of the request and all versions that are affected.
No documentation present for nested query type in the Opensearch documentation. The feature is available since the inception of Opensearch.

What other resources are available? Provide links to related issues, POCs, steps for testing, etc.

PUT /navneet-index
{
  "mappings": {
    "properties": {
      "obj1": {
        "type": "nested"
      }
    }
  }
}
GET /navneet-index/_search
{
  "query": {
    "nested": {
      "path": "obj1",
      "query": {
        "bool": {
          "must": [
            { "match": { "obj1.name": "blue" } },
            { "range": { "obj1.count": { "gt": 5 } } }
          ]
        }
      },
      "score_mode": "avg"
    }
  }
}
@hdhalter
Copy link
Contributor

Hi @navneet1v, We have documentation on the nested field type here: https://opensearch.org/docs/latest/field-types/supported-field-types/nested/#nested-field-type-1. Is this not what you are looking for? Thanks.

@navneet1v
Copy link
Contributor Author

@hdhalter that is the nested field documentation. It is not the documentation on nested query. Both are different thing. I added an example in the gh issue where you see we have an option called as Score mode, this is an important parameter. It has various values like max, avg etc. Hence we should add a separate documentation for nested query and should not club this with nested fields.

@hdhalter
Copy link
Contributor

Thanks for the clarification! I found this example of a nested query: https://opensearch.org/docs/latest/search-plugins/text-chunking/#step-4-search-the-index-using-neural-search, but we can add a new section for it.

@hdhalter
Copy link
Contributor

This will be covered with the other query DSL types: #2173

@navneet1v
Copy link
Contributor Author

Thanks for the clarification! I found this example of a nested query: https://opensearch.org/docs/latest/search-plugins/text-chunking/#step-4-search-the-index-using-neural-search, but we can add a new section for it.

The example is for neural query. Nested query can have any type of query inside it. I think we should have a separate documentation for nested query.

@leanneeliatra
Copy link
Contributor

leanneeliatra commented Jun 14, 2024

This will be covered with the other query DSL types: #2173

I think this is also linked to #7348 to highlight for @kolchfa-aws, if not, I can look into this ticket 7363. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants