Skip to content
Merged
Changes from all commits
Commits
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
16 changes: 4 additions & 12 deletions solutions/search/retrievers-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ Which would return the following results:

## Example: Grouping results by year with `collapse` [retrievers-examples-collapsing-retriever-results]

In our result set, we have many documents with the same `year` value. We can clean this up using the `collapse` parameter with our retriever. This, as with the standard
% [collapse](/raw-migrated-files/elasticsearch/elasticsearch-reference/collapse-search-results.md) feature,
In our result set, we have many documents with the same `year` value. We can clean this up using the `collapse` parameter with our retriever. This, as with the standard [collapse](https://www.elastic.co/guide/en/elasticsearch/reference/current/collapse-search-results.html) feature,
enables grouping results by any field and returns only the highest-scoring document from each group. In this example we’ll collapse our results based on the `year` field.

```console
Expand Down Expand Up @@ -552,9 +551,7 @@ This returns the following response with collapsed results.

## Example: Highlighting results based on nested sub-retrievers [retrievers-examples-highlighting-retriever-results]

Highlighting is now also available for nested sub-retrievers matches. For example, consider the same `rrf` retriever as above, with a `knn` and `standard` retriever as its sub-retrievers. We can specify a `highlight` section,
% TODO URL as defined in the [highlighting](/raw-migrated-files/elasticsearch/elasticsearch-reference/highlighting.md) documentation,
and compute highlights for the top results.
Highlighting is now also available for nested sub-retrievers matches. For example, consider the same `rrf` retriever as above, with a `knn` and `standard` retriever as its sub-retrievers. We can specify a `highlight` section, as defined in the [highlighting](https://www.elastic.co/guide/en/elasticsearch/reference/current/highlighting.html) documentation, and compute highlights for the top results.

```console
GET /retrievers_example/_search
Expand Down Expand Up @@ -751,9 +748,7 @@ POST /retrievers_example_nested/_doc/3
POST /retrievers_example_nested/_refresh
```

Now we can run an `rrf` retriever query and also compute inner hits
% TODO URL [inner hits](/raw-migrated-files/elasticsearch/elasticsearch-reference/inner-hits.md)
for the `nested_field.nested_vector` field, based on the `knn` query specified.
Now we can run an `rrf` retriever query and also compute [inner hits](https://www.elastic.co/guide/en/elasticsearch/reference/current/inner-hits.html) for the `nested_field.nested_vector` field, based on the `knn` query specified.

```console
GET /retrievers_example_nested/_search
Expand Down Expand Up @@ -1276,10 +1271,7 @@ The output of which, albeit a bit verbose, will provide all the necessary info t

## Example: Rerank results of an RRF retriever [retrievers-examples-text-similarity-reranker-on-top-of-rrf]

To demonstrate the full functionality of retrievers, the following examples also require access to a semantic reranking model
% TODO URL [semantic reranking model](/raw-migrated-files/elasticsearch/elasticsearch-reference/semantic-reranking.md#semantic-reranking-models)
set up using the inference APIs.
% [Elastic inference APIs](/raw-migrated-files/elasticsearch/elasticsearch-reference/inference-apis.md).
To demonstrate the full functionality of retrievers, the following examples also require access to a [semantic reranking model](https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-reranking.html) set up using the [Elastic inference APIs](https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html).

In this example we’ll set up a reranking service and use it with the `text_similarity_reranker` retriever to rerank our top results.

Expand Down
Loading