Skip to content

Conversation

@jrodewig
Copy link
Contributor

Rewrites the has_child query to use the new query format.

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

Before

Before image Has Child Query - Before

After

After image Has Child 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 v6.8.2 v7.4.0 v7.3.1 v7.2.2 labels Jul 10, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

LGTM, I left two suggestions but feel free to adress them at will.

unique parent documents increases. Each `has_child` query in a search can
increase query time significantly.
If you care about query performance, do not use this query. If need to use the
Copy link
Member

Choose a reason for hiding this comment

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

" If need" <- not a native speaker, but is there a verb missing? Or something else from the sentence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You didn't miss anything. Just a typo. Should read If you need... Fixed with 164d716.

`false` (the default value) the query will throw an exception if the `type`
is not mapped.
`max_children`::
(integer) Optional. Maximum number of child documents allowed for returned parent
Copy link
Member

Choose a reason for hiding this comment

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

Reading this I was wondering if "child documents" here means child documents that match the query condition. I might have missed that part, but maybe its worth clarifying.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clarified with 6f4668e

@jrodewig jrodewig merged commit e04c846 into elastic:master Jul 11, 2019
@jrodewig jrodewig deleted the has-child-query branch July 11, 2019 13:10
jrodewig added a commit that referenced this pull request Jul 11, 2019
@jrodewig jrodewig removed the v6.8.2 label Jul 11, 2019
@jpountz jpountz added v7.3.0 and removed v7.3.1 labels Jul 15, 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