Spaces:
Running
on
T4
Running
on
T4
rerank model
Browse files
semantic_search/query_rewrite.py
CHANGED
@@ -365,7 +365,7 @@ def get_new_query_res(query):
|
|
365 |
if(imp_item == ""):
|
366 |
imp_item = query
|
367 |
|
368 |
-
ps = PorterStemmer()
|
369 |
# def stem_(sentence):
|
370 |
# words = word_tokenize(sentence)
|
371 |
|
@@ -378,6 +378,7 @@ def get_new_query_res(query):
|
|
378 |
#imp_item = stem_(imp_item)
|
379 |
print("imp_item---------------")
|
380 |
print(imp_item)
|
|
|
381 |
if('must' in query_['bool']):
|
382 |
query_['bool']['must'].append({
|
383 |
"simple_query_string": {
|
|
|
365 |
if(imp_item == ""):
|
366 |
imp_item = query
|
367 |
|
368 |
+
#ps = PorterStemmer()
|
369 |
# def stem_(sentence):
|
370 |
# words = word_tokenize(sentence)
|
371 |
|
|
|
378 |
#imp_item = stem_(imp_item)
|
379 |
print("imp_item---------------")
|
380 |
print(imp_item)
|
381 |
+
print(query_)
|
382 |
if('must' in query_['bool']):
|
383 |
query_['bool']['must'].append({
|
384 |
"simple_query_string": {
|