Skip to content

Commit

Permalink
Updates for hybrid query.
Browse files Browse the repository at this point in the history
Signed-off-by: jzonthemtn <[email protected]>
  • Loading branch information
jzonthemtn committed Jan 21, 2025
1 parent b9396d4 commit 52c620c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
28 changes: 28 additions & 0 deletions scripts/hybrid_query.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"_source": {
"excludes": [
"title_embedding"
]
},
"query": {
"hybrid": {
"queries": [
{
"match": {
"title_text": {
"query": "#$query##"
}
}
},
{
"neural": {
"title_embedding": {
"query_text": "#$query##",
"k": 50
}
}
}
]
}
}
}
26 changes: 0 additions & 26 deletions scripts/opensearch-scripts/create-pipeline.sh

This file was deleted.

3 changes: 3 additions & 0 deletions scripts/opensearch-scripts/get-pipelines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -e

curl http://localhost:9200/_search/pipeline | jq
9 changes: 5 additions & 4 deletions scripts/run-query-set.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"query_set_id": "6d2a8d56-a9e6-4f99-9a81-482974d11c32",
"judgments_id": "c2d46e06-0e37-4370-b547-296b554c646e",
"query_set_id": "6b1ac777-758d-4f33-9bb6-7e3f15e77637",
"judgments_id": "76267535-0591-4e13-9e3d-8de5cb1329a6",
"index": "ecommerce",
"search_pipeline": "",
"search_pipeline": "hybrid-search-pipeline",
"id_field": "asin",
"k": 10,
"threshold": 1.0,
"query": "{\"query\": {\"match\": {\"description\": \"#$query##\"}}}"
"query": "{\"_source\": {\"excludes\": [\"title_embedding\"]},\"query\": {\"hybrid\": {\"queries\": [{\"match\": {\"title_text\": {\"query\": \"#$query##\"}}},{\"neural\": {\"title_embedding\": {\"query_text\": \"#$query##\",\"k\": 50}}}]}}}",
"not_used_query": "{\"query\": {\"match\": {\"description\": \"#$query##\"}}}"
}

0 comments on commit 52c620c

Please sign in to comment.