Skip to content

Commit 40a8242

Browse files
committed
updated the changes in the doc
1 parent 573edee commit 40a8242

File tree

1 file changed

+5
-35
lines changed

1 file changed

+5
-35
lines changed

docs/reference/search/search-your-data/retrievers-overview.asciidoc

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Applies <<query-rules,query rules>> to the query before returning results.
3636
Used for <<semantic-reranking,semantic reranking>>.
3737
Requires first creating a `rerank` task using the <<put-inference-api,{es} Inference API>>.
3838
* <<pinned-retriever,*Pinned Retriever*>>.
39-
Returns top documents by always placing specific documents at the top of the results, in the order provided. Useful for promoting certain documents for particular queries, regardless of their relevance score. The remaining results are filled by a fallback retriever.
39+
Returns top documents by always placing specific documents at the top of the results, with the remaining hits provided by a secondary retriever.
4040

4141
[discrete]
4242
[[retrievers-overview-why-are-they-useful]]
@@ -149,12 +149,6 @@ GET example-index/_search
149149
}
150150
----
151151
//NOTCONSOLE
152-
==============
153-
154-
[[pinned-retriever]]
155-
=== Pinned Retriever
156-
157-
A `pinned` retriever returns top documents by always placing specific documents at the top of the results, in the order provided. This is useful for promoting certain documents for particular queries, regardless of their relevance score. The remaining results are filled by a fallback retriever.
158152
159153
[discrete]
160154
[[pinned-retriever-parameters]]
@@ -170,38 +164,13 @@ A list of document IDs to pin at the top of the results, in the order provided.
170164
+
171165
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.
172166
173-
`fallback`::
167+
`retriever`::
174168
(Optional, retriever object)
175169
+
176-
A retriever to use for retrieving the remaining documents after the pinned ones.
170+
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.
177171
178172
Either `ids` or `documents` must be specified.
179173
180-
[discrete]
181-
[[pinned-retriever-example-ids]]
182-
==== Example using `ids`
183-
184-
[source,console]
185-
----
186-
GET /restaurants/_search
187-
{
188-
"retriever": {
189-
"pinned": {
190-
"ids": ["doc1", "doc2"],
191-
"fallback": {
192-
"standard": {
193-
"query": {
194-
"match": {
195-
"title": "elasticsearch"
196-
}
197-
}
198-
}
199-
}
200-
}
201-
}
202-
}
203-
----
204-
205174
[discrete]
206175
[[pinned-retriever-example-documents]]
207176
==== Example using `documents`
@@ -216,7 +185,7 @@ GET /restaurants/_search
216185
{ "_id": "doc1", "_index": "my-index" },
217186
{ "_id": "doc2" }
218187
],
219-
"fallback": {
188+
"retriever": {
220189
"standard": {
221190
"query": {
222191
"match": {
@@ -229,6 +198,7 @@ GET /restaurants/_search
229198
}
230199
}
231200
----
201+
//NOTCONSOLE
232202
233203
For more examples on how to use retrievers, please refer to <<retrievers-examples,retriever examples>>.
234204

0 commit comments

Comments
 (0)