OpenSearch/docs/reference/search/request/index-boost.asciidoc
James Rodewig a63f60b776 [DOCS] Remove heading offsets for REST APIs (#44568)
Several files in the REST APIs nav section are included using
:leveloffset: tags. This increments headings (h2 -> h3, h3 -> h4, etc.)
in those files and removes the :leveloffset: tags.

Other supporting changes:
* Alphabetizes top-level REST API nav items.
* Change 'indices APIs' heading to 'index APIs.'
* Changes 'Snapshot lifecycle management' heading to sentence case.
2019-07-19 14:36:06 -04:00

40 lines
1.2 KiB
Plaintext

[[request-body-search-index-boost]]
==== Index Boost
Allows to configure different boost level per index when searching
across more than one indices. This is very handy when hits coming from
one index matter more than hits coming from another index (think social
graph where each user has an index).
deprecated[5.2.0, This format is deprecated. Please use array format instead.]
[source,js]
--------------------------------------------------
GET /_search
{
"indices_boost" : {
"index1" : 1.4,
"index2" : 1.3
}
}
--------------------------------------------------
// CONSOLE
// TEST[setup:index_boost warning:Object format in indices_boost is deprecated, please use array format instead]
You can also specify it as an array to control the order of boosts.
[source,js]
--------------------------------------------------
GET /_search
{
"indices_boost" : [
{ "alias1" : 1.4 },
{ "index*" : 1.3 }
]
}
--------------------------------------------------
// CONSOLE
// TEST[continued]
This is important when you use aliases or wildcard expression.
If multiple matches are found, the first match will be used.
For example, if an index is included in both `alias1` and `index*`, boost value of `1.4` is applied.