mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
* delete asciidoc files
* add migrated files
* fix errors
* Disable docs tests
* Clarify release notes page titles
* Revert "Clarify release notes page titles"
This reverts commit 8be688648d
.
* Comment out edternal URI images
* Clean up query languages landing pages, link to conceptual docs
* Add .md to url
* Fixes inference processor nesting.
---------
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2.2 KiB
2.2 KiB
mapped_pages | |
---|---|
|
Pinned query [query-dsl-pinned-query]
Promotes selected documents to rank higher than those matching a given query. This feature is typically used to guide searchers to curated documents that are promoted over and above any "organic" matches for a search. The promoted or "pinned" documents are identified using the document IDs stored in the _id
field.
Example request [_example_request]
GET /_search
{
"query": {
"pinned": {
"ids": [ "1", "4", "100" ],
"organic": {
"match": {
"description": "iphone"
}
}
}
}
}
Top-level parameters for pinned
[pinned-query-top-level-parameters]
ids
- (Optional, array) Document IDs listed in the order they are to appear in results. Required if
docs
is not specified. docs
- (Optional, array) Documents listed in the order they are to appear in results. Required if
ids
is not specified. You can specify the following attributes for each document:_id
- (Required, string) The unique document ID.
_index
- (Optional, string) The index that contains the document.
organic
- Any choice of query used to rank documents which will be ranked below the "pinned" documents.
Pin documents in a specific index [_pin_documents_in_a_specific_index]
If you’re searching over multiple indices, you can pin a document within a specific index using docs
:
GET /_search
{
"query": {
"pinned": {
"docs": [
{
"_index": "my-index-000001", <1>
"_id": "1"
},
{
"_id": "4" <2>
}
],
"organic": {
"match": {
"description": "iphone"
}
}
}
}
}
- The document with id
1
frommy-index-000001
will be the first result. - When
_index
is missing, all documents with id4
from the queried indices will be pinned with the same score.