prasadnu commited on
Commit
b0c7934
·
1 Parent(s): c0981b1

multilingual

Browse files
semantic_search/all_search_execute.py CHANGED
@@ -503,18 +503,18 @@ def handler(input_,session_id):
503
  path = "demostore-search-index-reindex-new/_search?search_pipeline=ml_inference_for_vector_search_and_language_translation"
504
  url = host + path
505
  else:
506
- url_ = url + "?search_pipeline=hybrid_search_pipeline"
507
-
508
  if(st.session_state.re_ranker == 'true' and st.session_state.input_reranker == 'Cohere Rerank'):
509
 
510
- url_ = url + "?search_pipeline=hybrid_rerank_pipeline"
511
-
512
  hybrid_payload["ext"] = {"rerank": {
513
  "query_context": {
514
  "query_text": query
515
  }
516
  }}
517
- r = requests.get(url_, auth=awsauth, json=hybrid_payload, headers=headers)
518
  response_ = json.loads(r.text)
519
  docs = response_['hits']['hits']
520
 
 
503
  path = "demostore-search-index-reindex-new/_search?search_pipeline=ml_inference_for_vector_search_and_language_translation"
504
  url = host + path
505
  else:
506
+ path = "demostore-search-index-reindex-new/_search?search_pipeline=hybrid_search_pipeline"
507
+ url = host + path
508
  if(st.session_state.re_ranker == 'true' and st.session_state.input_reranker == 'Cohere Rerank'):
509
 
510
+ path = "demostore-search-index-reindex-new/_search?search_pipeline=hybrid_rerank_pipeline"
511
+ url = host + path
512
  hybrid_payload["ext"] = {"rerank": {
513
  "query_context": {
514
  "query_text": query
515
  }
516
  }}
517
+ r = requests.get(url, auth=awsauth, json=hybrid_payload, headers=headers)
518
  response_ = json.loads(r.text)
519
  docs = response_['hits']['hits']
520