You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the has_parent and has_child queries are basically constant_score query wrappers around the has_parent and has_child filters. This adds score support to both queries. Both queries will support a score_type option. The has_child will support the same options as the top_children query and the none option which is the default and yields the current behaviour. The has_parent query will support the score type options: score and none. The latter is the default and yields the current behaviour.
If the score_type is set to a value other than none then the has_parent query will map the matched parent score into the related children documents. The has_child query will then map the matched children documents into the related parent document. The score_type on both queries defines how the children documents scores are mapped in the parent documents. Both queries are executed in two phases. First phase collects the parent uid values of matching documents with an aggregated score per parent uid value. In the second phase either child or parent typed documents are emitted as hit that have the same parent uid value as found during the first phase. The score computed in the first phase will be used as score.
The text was updated successfully, but these errors were encountered:
Added score support to `has_child` and `has_parent` queries. Both queries support a score_type option. The has_child support the same options as the top_children query and the none option which is the default and yields the current behaviour. The has_parent query support the score type options: score and none. The latter is the default and yields the current behaviour.
If the score_type is set to a value other than none then the has_parent query map the matched parent score into the related children documents. The has_child query then map the matched children documents into the related parent document. The score_type on both queries defines how the children documents scores are mapped in the parent documents. Both queries are executed in two phases. First phase collects the parent uid values of matching documents with an aggregated score per parent uid value. In the second phase either child or parent typed documents are emitted as hit that have the same parent uid value as found during the first phase. The score computed in the first phase will be used as score.
Closes#2502
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
Added score support to `has_child` and `has_parent` queries. Both queries support a score_type option. The has_child support the same options as the top_children query and the none option which is the default and yields the current behaviour. The has_parent query support the score type options: score and none. The latter is the default and yields the current behaviour.
If the score_type is set to a value other than none then the has_parent query map the matched parent score into the related children documents. The has_child query then map the matched children documents into the related parent document. The score_type on both queries defines how the children documents scores are mapped in the parent documents. Both queries are executed in two phases. First phase collects the parent uid values of matching documents with an aggregated score per parent uid value. In the second phase either child or parent typed documents are emitted as hit that have the same parent uid value as found during the first phase. The score computed in the first phase will be used as score.
Closeselastic#2502
Currently the
has_parent
andhas_child
queries are basicallyconstant_score
query wrappers around thehas_parent
andhas_child
filters. This adds score support to both queries. Both queries will support ascore_type
option. Thehas_child
will support the same options as thetop_children
query and thenone
option which is the default and yields the current behaviour. Thehas_parent
query will support the score type options:score
andnone
. The latter is the default and yields the current behaviour.If the
score_type
is set to a value other thannone
then thehas_parent
query will map the matched parent score into the related children documents. Thehas_child
query will then map the matched children documents into the related parent document. Thescore_type
on both queries defines how the children documents scores are mapped in the parent documents. Both queries are executed in two phases. First phase collects the parent uid values of matching documents with an aggregated score per parent uid value. In the second phase either child or parent typed documents are emitted as hit that have the same parent uid value as found during the first phase. The score computed in the first phase will be used as score.The text was updated successfully, but these errors were encountered: