mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
[DOCS] Changed score_type to score_mode for has_child/parent queries
This commit is contained in:
parent
5937cefd85
commit
7a9aad30f4
@ -35,7 +35,7 @@ supported score types are `max`, `sum`, `avg` or `none`. The default is
|
|||||||
`none` and yields the same behaviour as in previous versions. If the
|
`none` and yields the same behaviour as in previous versions. If the
|
||||||
score type is set to another value than `none`, the scores of all the
|
score type is set to another value than `none`, the scores of all the
|
||||||
matching child documents are aggregated into the associated parent
|
matching child documents are aggregated into the associated parent
|
||||||
documents. The score type can be specified with the `score_type` field
|
documents. The score type can be specified with the `score_mode` field
|
||||||
inside the `has_child` query:
|
inside the `has_child` query:
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
@ -43,7 +43,7 @@ inside the `has_child` query:
|
|||||||
{
|
{
|
||||||
"has_child" : {
|
"has_child" : {
|
||||||
"type" : "blog_tag",
|
"type" : "blog_tag",
|
||||||
"score_type" : "sum",
|
"score_mode" : "sum",
|
||||||
"query" : {
|
"query" : {
|
||||||
"term" : {
|
"term" : {
|
||||||
"tag" : "something"
|
"tag" : "something"
|
||||||
@ -58,4 +58,4 @@ inside the `has_child` query:
|
|||||||
|
|
||||||
With the current implementation, all `_parent` field values and all `_id`
|
With the current implementation, all `_parent` field values and all `_id`
|
||||||
field values of parent documents are loaded into memory (heap) via field data
|
field values of parent documents are loaded into memory (heap) via field data
|
||||||
in order to support fast lookups, so make sure there is enough memory for it.
|
in order to support fast lookups, so make sure there is enough memory for it.
|
||||||
|
@ -32,14 +32,14 @@ case equal to the boost on the `has_parent` query (Defaults to 1). If
|
|||||||
the score type is set to `score`, then the score of the matching parent
|
the score type is set to `score`, then the score of the matching parent
|
||||||
document is aggregated into the child documents belonging to the
|
document is aggregated into the child documents belonging to the
|
||||||
matching parent document. The score type can be specified with the
|
matching parent document. The score type can be specified with the
|
||||||
`score_type` field inside the `has_parent` query:
|
`score_mode` field inside the `has_parent` query:
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
{
|
{
|
||||||
"has_parent" : {
|
"has_parent" : {
|
||||||
"parent_type" : "blog",
|
"parent_type" : "blog",
|
||||||
"score_type" : "score",
|
"score_mode" : "score",
|
||||||
"query" : {
|
"query" : {
|
||||||
"term" : {
|
"term" : {
|
||||||
"tag" : "something"
|
"tag" : "something"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user