John
07/01/2022, 10:51 AM_text_match
will always be higher if both search terms can be matched in one field vs. separate fields, no matter the query_weight
. Is there any non-hacky way to get around this? Feels like it could be a parameter.
Example: You have fields title
and type
and two documents
{"title": "Nike Shoerack", "type": "shoe_rack"}
{"title": "Nike Air Force 1", "type": "shoe"}
In this case I would like to be able to have query_weight=1
for title and `query_weight=5`for the type
to ensure that type is always the most important attribute. With my current setup, I get the shoerack first if I search for nike shoe
Jason Bosco
07/01/2022, 2:58 PMprioritize_exact_match=false
as a query param?John
07/01/2022, 3:01 PMKishore Nallan
07/01/2022, 11:46 PMJohn
07/02/2022, 4:28 PMmultiple_match_query_weight=2
• title
with query_weight=1
• description
with query_weight=1
• type
with query_weight=5
Then nike shoe
in title would be better than nike
in title and shoe
in description (because the text matches in title are multiplied by 2
or something like that), but not better than nike
in title and shoe
in type. Maybe it gets too complicated or doesn’t work in Typesense, just throwing the idea out there!