Skip to content

Include Pinned Retriever in 9.1 Documentation #129216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 56 commits into from
Jun 17, 2025
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
12fb2fa
propgating retrievers to inner retrievers
mridula-s109 Jun 2, 2025
81e99b6
test feature taken care of
mridula-s109 Jun 6, 2025
05fb0ab
Merge branch 'elastic:main' into main
mridula-s109 Jun 6, 2025
605c035
Small changes in concurrent multipart upload interfaces (#128977)
tlrx Jun 6, 2025
2dca633
Unmute FollowingEngineTests#testProcessOnceOnPrimary() test (#129054)
martijnvg Jun 6, 2025
4c0e3c9
[Build] Add support for publishing to maven central (#128659)
breskeby Jun 6, 2025
e2189e6
ESQL: Check for errors while loading blocks (#129016)
nik9000 Jun 6, 2025
aec1688
Make `PhaseCacheManagementTests` project-aware (#129047)
nielsbauman Jun 6, 2025
8c423ce
Vector test tools (#128934)
benwtrent Jun 6, 2025
df3ef0d
ES|QL: refactor generative tests (#129028)
luigidellaquila Jun 6, 2025
0eebc8c
Add a test of LOOKUP JOIN against a time series index (#129007)
bpintea Jun 6, 2025
b1e15f0
Make ILM `ClusterStateWaitStep` project-aware (#129042)
nielsbauman Jun 6, 2025
846b09a
Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT tes…
elasticsearchmachine Jun 6, 2025
a97d582
Remove `ClusterState` param from ILM `AsyncBranchingStep` (#129076)
nielsbauman Jun 6, 2025
763b502
Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT tes…
elasticsearchmachine Jun 6, 2025
8a660c8
Mute org.elasticsearch.upgrades.UpgradeClusterClientYamlTestSuiteIT t…
elasticsearchmachine Jun 6, 2025
aa16175
Mute org.elasticsearch.upgrades.UpgradeClusterClientYamlTestSuiteIT t…
elasticsearchmachine Jun 6, 2025
6e58b1e
Mute org.elasticsearch.packaging.test.DockerTests test081SymlinksAreF…
elasticsearchmachine Jun 7, 2025
05f70f0
Threadpool merge executor is aware of available disk space (#127613)
albertzaharovits Jun 8, 2025
713ab42
Add option to include or exclude vectors from _source retrieval (#128…
jimczi Jun 9, 2025
0776562
Remove direct minScore propagation to inner retrievers
mridula-s109 Jun 9, 2025
f145d26
cleaned up skip
mridula-s109 Jun 9, 2025
d8b6897
Mute org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDis…
elasticsearchmachine Jun 9, 2025
82c7ab1
Add transport version for ML inference Mistral chat completion (#129033)
Jan-Kazlouski-elastic Jun 9, 2025
eca383d
Correct index path validation (#129144)
benwtrent Jun 9, 2025
fb6ec9a
Mute org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDis…
elasticsearchmachine Jun 9, 2025
6806b24
Implemented completion task for Google VertexAI (#128694)
leo-hoet Jun 9, 2025
0ef36a1
Merge remote-tracking branch 'upstream/main'
mridula-s109 Jun 9, 2025
ece13d9
Merge remote-tracking branch 'upstream/main'
mridula-s109 Jun 9, 2025
36cd91e
Merge remote-tracking branch 'upstream/main'
mridula-s109 Jun 10, 2025
74b431d
ES|QL - kNN function initial support (#127322)
carlosdelest Jun 10, 2025
c678ebd
Remove optional seed from ES|QL SAMPLE (#128887)
jan-elastic Jun 10, 2025
7d37afa
[Inference API] Add "rerank" task type to "elastic" provider (#126022)
timgrein Jun 10, 2025
eed00f4
Rename target destination for microbenchmarks (#128878)
idegtiarenko Jun 10, 2025
f768664
Include direct memory and non-heap memory in ML memory calculations (…
jan-elastic Jun 10, 2025
2d605ee
Throw better exception for unsupported aggregations over shape fields…
iverase Jun 10, 2025
b68ddd1
Update Test Framework To Handle Query Rewrites That Rely on Non-Null …
Mikep86 Jun 10, 2025
f1bf18e
Update ReproduceInfoPrinter to correctly print a reproduction line fo…
mosche Jun 10, 2025
9abfe1d
Increment inference stats counter for shard bulk inference calls (#12…
jimczi Jun 10, 2025
2fa185a
Synthetic source: avoid storing multi fields of type text and match_o…
martijnvg Jun 10, 2025
ac213d5
Adding `scheduled_report_id` field to kibana reporting template (#127…
ymao1 Jun 10, 2025
01de61e
ES|QL: Add FORK generative tests (#129135)
ioanatia Jun 10, 2025
f48c383
ES|QL Completion command syntax change (#129189)
afoucret Jun 10, 2025
ae4f6e4
Included pinned retriever in 9.1 docs
mridula-s109 Jun 10, 2025
071b4e3
Merge remote-tracking branch 'upstream/main' into update-pinned-docs
mridula-s109 Jun 10, 2025
d906c96
reverted unnecessary change
mridula-s109 Jun 10, 2025
a536750
Merge remote-tracking branch 'upstream' into update-pinned-docs
mridula-s109 Jun 11, 2025
a93c6bf
made the suggested changes
mridula-s109 Jun 11, 2025
0461cc5
Merge branch 'main' into update-pinned-docs
mridula-s109 Jun 11, 2025
ee7a777
Merge branch 'main' into update-pinned-docs
mridula-s109 Jun 11, 2025
4de5087
Update retrievers.md
mridula-s109 Jun 11, 2025
de3f154
Update docs/reference/elasticsearch/rest-apis/retrievers.md
mridula-s109 Jun 17, 2025
3ee741c
Update docs/reference/elasticsearch/rest-apis/retrievers.md
mridula-s109 Jun 17, 2025
20a033c
Merge branch 'main' into update-pinned-docs
mridula-s109 Jun 17, 2025
4e2e4f2
Update retrievers.md
mridula-s109 Jun 17, 2025
4c6964b
Merge branch 'main' into update-pinned-docs
mridula-s109 Jun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 53 additions & 3 deletions docs/reference/elasticsearch/rest-apis/retrievers.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ The following retrievers are available:
`text_similarity_reranker`
: A [retriever](#text-similarity-reranker-retriever) that enhances search results by re-ranking documents based on semantic similarity to a specified inference text, using a machine learning model.

`pinned` {applies_to}`stack: GA 9.1`
: A [retriever](#pinned-retriever) that always places specified documents at the top of the results, with the remaining hits provided by a secondary retriever.

`rule`
: A [retriever](#rule-retriever) that applies contextual [Searching with query rules](/reference/elasticsearch/rest-apis/searching-with-query-rules.md#query-rules) to pin or exclude documents for specific queries.

Expand Down Expand Up @@ -921,7 +924,57 @@ GET movies/_search
1. The `rule` retriever is the outermost retriever, applying rules to the search results that were previously reranked using the `rrf` retriever.
2. The `rrf` retriever returns results from all of its sub-retrievers, and the output of the `rrf` retriever is used as input to the `rule` retriever.

## Pinned Retriever [pinned-retriever]
```yaml {applies_to}
stack: ga 9.1
```


A `pinned` retriever returns top documents by always placing specific documents at the top of the results, with the remaining hits provided by a secondary retriever. This retriever offers similar functionality to the [pinned query](/reference/query-languages/query-dsl/query-dsl-pinned-query.md), but works seamlessly with other retrievers. This is useful for promoting certain documents for particular queries, regardless of their relevance score.

#### Parameters [pinned-retriever-parameters]

`ids`
: (Optional, array of strings)

A list of document IDs to pin at the top of the results, in the order provided.

`docs`
: (Optional, array of objects)

A list of objects specifying documents to pin. Each object must contain at least an `_id` field, and may also specify `_index` if pinning documents across multiple indices.

`retriever`
: (Optional, retriever object)

A retriever (for example a `standard` retriever or a specialized retriever such as `rrf` retriever) used to retrieve the remaining documents after the pinned ones.

Either `ids` or `docs` must be specified.

### Example using `docs` [pinned-retriever-example-documents]

```console
GET /restaurants/_search
{
"retriever": {
"pinned": {
"docs": [
{ "_id": "doc1", "_index": "my-index" },
{ "_id": "doc2" }
],
"retriever": {
"standard": {
"query": {
"match": {
"title": "elasticsearch"
}
}
}
}
}
}
}
```

## Common usage guidelines [retriever-common-parameters]

Expand All @@ -946,6 +999,3 @@ When a retriever is specified as part of a search, the following elements are no
* [`terminate_after`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#request-body-search-terminate-after)
* [`sort`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#search-sort-param)
* [`rescore`](/reference/elasticsearch/rest-apis/filter-search-results.md#rescore) use a [rescorer retriever](#rescorer-retriever) instead



Loading