I’m a bit confused reconciling the documented behavior of proximityDistance with the observed behavior. In our federated search, it is undesirable to have a high proximity distance for one of our types of queries (for company name, where we only display if there’s a likely match), so we plan on using _rankingInfo
to throw away matches with high proximity distance.
One of our optionalWords is “LLC”. However the search for “Lewis and Clark LLC” returns the following record with proximityDistance: 10
instead of an expected proximity distance of 1 or 2.
{
"display_name": "Lewis and Clark",
"all_cleaned_aliases": [
"my company", "lewis and clark"
],
"objectID": "obfuscated-id"
}
The getRankingInfo
documentation states:
proximityDistance
(integer): The sum of the distances between matched words when the query contains more than one word. Corresponds to theproximity
criterion in the ranking formula.
More clarification would be helpful because the proximity calculation in the ranking formula seems very unclear given the observed behavior.