#community-help

Addressing Search Ranking Issue in Collections

TLDR Robert inquired about preventing repetitive search terms in an array from ranking higher. Jason suggested using query_by_weights to adjust the field's weight.

Powered by Struct AI
Sep 08, 2021 (24 months ago)
Robert
Photo of md5-a0aba3e46685345ae57c342a8130989f
Robert
04:32 PM
We have a collection with a string[] field, and when we query by that field, if that array has multiple elements that have that search term highlighted it ranks higher than other string fields. Is it possible to introduce a new query param in the search API endpoint to disable this functionality and to treat multiple hits in the same array field (1 hit in each element) of the same document with the same rank as if that field would be a simple string with just 1 hit?
Sep 09, 2021 (24 months ago)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:00 AM
Robert Could you try reducing the weight of this field using query_by_weights?
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
02:45 AM
Robert I think Jason’s reply was for you :)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:46 AM
Oh, my bad. Sorry about that!