Skip to content

Commit

Permalink
Merge pull request #200 from nulib/4618-modify-hybrid-search-query
Browse files Browse the repository at this point in the history
  • Loading branch information
bmquinn committed Apr 22, 2024
2 parents b832639 + e9d67cc commit 5a1e6c0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion chat/src/helpers/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ def extract_prompt_value(v):

def prepare_response(config):
try:
subquery = {"match": {"all_text": {"query": config.question}}}
subquery = {
"match": {
"all_titles": {
"query": config.question,
"operator": "AND",
"analyzer": "english"
}
}
}
docs = config.opensearch.similarity_search(
query=config.question, k=config.k, subquery=subquery, _source={"excludes": ["embedding"]}
)
Expand Down

0 comments on commit 5a1e6c0

Please sign in to comment.