Skip to content

Commit

Permalink
exclude source
Browse files Browse the repository at this point in the history
Signed-off-by: zhichao-aws <[email protected]>
  • Loading branch information
zhichao-aws committed Aug 14, 2024
1 parent 1d2383b commit e6e774e
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion _search-plugins/neural-sparse-with-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ PUT /my-nlp-index
"default_pipeline": "nlp-ingest-pipeline-sparse"
},
"mappings": {
"_source": {
"_source": {
"excludes": [
"passage_embedding"
]
Expand Down Expand Up @@ -424,6 +424,28 @@ The response contains the matching documents:
}
```

To reduce the latency of disk I/O and network I/O about sparse embedding source , you can exclude the embedding vector source in query as follows:

```json
GET my-nlp-index/_search
{
"_source": {
"excludes": [
"passage_embedding"
]
},
"query": {
"neural_sparse": {
"passage_embedding": {
"query_text": "Hi world",
"model_id": "<bi-encoder or tokenizer ID>"
}
}
}
}
```
{% include copy-curl.html %}

## Accelerating neural sparse search

To learn more about improving retrieval time for neural sparse search, see [Accelerating neural sparse search]({{site.url}}{{site.baseurl}}/search-plugins/neural-sparse-search/#accelerating-neural-sparse-search).
Expand Down

0 comments on commit e6e774e

Please sign in to comment.