Identifying Best Match Field in Document Search
TLDR Jack wanted to display the best match field in a document search. Despite Kishore Nallan's suggestion of looking at field weights, Jack decided to sort highlighted fields by number of matched tokens.
Sep 19, 2023 (2 months ago)
best_field_scorefield, but I can't see one telling me which field was the best?
Kishore Nallan12:47 PM
Kishore Nallan12:48 PM
Kishore Nallan12:50 PM
Indexed 3015 threads (79% resolved)
Clarifying Fields Inside `text_match_info`
Matthew asks for clarification on `text_match_info` fields. Jason explains no documentation exists but offers help. This leads to Kishore Nallan explaining specifics about `best_field_weight` and `best_field_score`.
Understanding `text_match_type` Parameter in Query Optimization
John sought clarity on how `text_match_type` parameter works in search queries, while incorporating field weights for scoring. Kishore Nallan clarified that linear combination with weights had been considered but proved ineffective.
Sorting Search Results Based on Weights
Pantelis wanted to sort search results by weight. Kishore Nallan suggested using "prioritize_exact_match: false" and "text_match_type: 'max_weight'" to achieve the desired result.