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

[DOCS] Reformat has_parent query docs #44443

Merged
merged 3 commits into from
Jul 19, 2019
Merged

[DOCS] Reformat has_parent query docs #44443

merged 3 commits into from
Jul 19, 2019

Conversation

jrodewig
Copy link
Contributor

@jrodewig jrodewig commented Jul 16, 2019

Rewrites the has_parent query to use the new query format.

This creates separate sections for example requests, parameters, and notes.

This is part of #40977, an effort to standardize documentation for query types.

Before

Before image Has Parent Query - Before

After

After image Has Parent Query - After

@jrodewig jrodewig added >docs General docs changes :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.0.2 v7.1.2 v7.4.0 v7.3.1 v7.2.2 labels Jul 16, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a comment

Choose a reason for hiding this comment

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

thanks @jrodewig! This is a nice rework of this documentation.

"term" : {
"tag" : "something"
}
"match_all" : {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what is the purpose of this has_parent query with "match_all" : {} query inside? Is it to retrieve all child docs (something that we warned against)? May be a better example would be to have a more specific query.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great point! I update the index setup and query examples with 31c720a.

Instead of match_all, it now uses a term query similar to the previous example.

querying multiple indexes which might have different mappings. When set to
`false` (the default value) the query will throw an exception if the `type`
is not mapped.
If `false`, {es} ignores the relevance score of the parent document.
Copy link
Contributor

Choose a reason for hiding this comment

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

may be also mention here, that in the case of false, the child docs' scores will be equal to boost of has_parent query which defaults to 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added with 4f290ab.

@jrodewig
Copy link
Contributor Author

Thanks so much for your review @mayya-sharipova.

@jrodewig jrodewig merged commit f3ddd36 into elastic:master Jul 19, 2019
@jrodewig jrodewig deleted the has-parent-query branch July 19, 2019 14:50
jrodewig added a commit that referenced this pull request Jul 19, 2019
jrodewig added a commit that referenced this pull request Jul 19, 2019
jrodewig added a commit that referenced this pull request Jul 19, 2019
jrodewig added a commit that referenced this pull request Jul 19, 2019
jrodewig added a commit that referenced this pull request Jul 19, 2019
@jpountz jpountz added v7.3.0 and removed v7.3.1 labels Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories v7.0.2 v7.1.2 v7.2.2 v7.3.0 v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants