Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mvectors
Browse files
semantic_search/all_search_execute.py
CHANGED
|
@@ -437,8 +437,6 @@ def handler(input_,session_id):
|
|
| 437 |
|
| 438 |
|
| 439 |
else:
|
| 440 |
-
|
| 441 |
-
|
| 442 |
if( st.session_state.input_hybridType == "OpenSearch Hybrid Query"):
|
| 443 |
url_ = url + "?search_pipeline=hybrid_search_pipeline"
|
| 444 |
|
|
@@ -491,16 +489,14 @@ def handler(input_,session_id):
|
|
| 491 |
if(id == i_["_id"]):
|
| 492 |
i_["_score"] = score
|
| 493 |
rrf_hits_unsorted.append(i_)
|
| 494 |
-
print("rrf_hits_unsorted------------------------------")
|
| 495 |
docs = sorted(rrf_hits_unsorted, key=lambda x: x['_score'],reverse=True)
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
|
| 500 |
|
| 501 |
arr = []
|
| 502 |
dup = []
|
| 503 |
for doc in docs:
|
|
|
|
| 504 |
if(doc['_source']['image_url'] not in dup):
|
| 505 |
res_ = {
|
| 506 |
"desc":doc['_source']['product_description'],
|
|
|
|
| 437 |
|
| 438 |
|
| 439 |
else:
|
|
|
|
|
|
|
| 440 |
if( st.session_state.input_hybridType == "OpenSearch Hybrid Query"):
|
| 441 |
url_ = url + "?search_pipeline=hybrid_search_pipeline"
|
| 442 |
|
|
|
|
| 489 |
if(id == i_["_id"]):
|
| 490 |
i_["_score"] = score
|
| 491 |
rrf_hits_unsorted.append(i_)
|
|
|
|
| 492 |
docs = sorted(rrf_hits_unsorted, key=lambda x: x['_score'],reverse=True)
|
| 493 |
+
|
|
|
|
|
|
|
| 494 |
|
| 495 |
|
| 496 |
arr = []
|
| 497 |
dup = []
|
| 498 |
for doc in docs:
|
| 499 |
+
print("doc")
|
| 500 |
if(doc['_source']['image_url'] not in dup):
|
| 501 |
res_ = {
|
| 502 |
"desc":doc['_source']['product_description'],
|