File tree Expand file tree Collapse file tree
nucliadb/src/nucliadb/search/search/query_parser/parsers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,13 +96,14 @@ async def parse_keyword_query(
9696) -> KeywordQuery :
9797 query = item .query
9898
99- # If there was a rephrase with image, we should use the rephrased query for keyword search
100- rephrased_query = await fetcher .get_rephrased_query ()
101- if item .query_image is not None and rephrased_query is not None :
102- query = rephrased_query
99+ # only when a query image is used, we use the rephrased query for keyword
100+ # search
101+ if item .query_image is not None :
102+ rephrased_query = await fetcher .get_rephrased_query ()
103+ if rephrased_query is not None :
104+ query = rephrased_query
103105
104106 is_synonyms_query = False
105-
106107 if item .with_synonyms :
107108 synonyms_query = await query_with_synonyms (query , fetcher = fetcher )
108109 if synonyms_query is not None :
You can’t perform that action at this time.
0 commit comments