Sorting within Group_by with Group_limit
TLDR Morgan wants to sort within groups after grouping, Kishore Nallan offers advice and validates. Proposed solutions do not guarantee prioritizing
inStock within groups.
Dec 21, 2021 (21 months ago)
group_limitflag, is there any way to sort inside the group so we can use
group_limitto just get the few entries we need?
Kishore Nallan04:02 PM
sort_byis used to sort the result. which can be tricky because the default search result sequence seems to be based on matching. exact match always comes first, but when using sort_by, that sequence is disrupted.
Kishore Nallan04:07 PM
group_limit. I use the shoe example in the document,
group_by=brand&group_limit=3returns certain brands and limit 3, but what if I want to have a the first 3 to favor
in_stock? something like
Kishore Nallan04:10 PM
sort_by=inStock:descthen even within the group the top-3 items based on
inStockonly will be picked I think. But maybe I am wrong.
Kishore Nallan04:13 PM
Kishore Nallan04:13 PM
updates: that seemed working for me. I will play and see.
_text_matchworks but looks like we still cannot get the
inStockfirst in each group. After all,
sort_by=_text_match:desc,inStock:descworks after 3 entries are taken from each group. The 3 entries taken are not guaranteed to have favored
Indexed 2764 threads (79% resolved)
Document Weighting and Sorting Discussion
SamHendley asked how to weight a document based on age and offered a sorting method. Jason clarified the method and suggested an RC for use. SamHendley tested and confirmed the solution. User Kishore Nallan assisted when an error occurred with a new feature.
Configuring InstantSearch.js Parameters and Comparing Search Results
John is having difficulty configuring InstantSearch.js parameters. Jason suggested how to utilize `facet_by` and `filter_by` widgets and advised checking network for search parameters. They also asked John to open an issue on the unexpected need for manual `_text_match` addition.
Tuning Query Results Order with Query_by_Weights
Nathan is trying to tune the order of results using `query_by_weights`, but experiences a smaller impact than expected. Jason suggests trying `max_weight` and sharing a snippet to further investigate.
Solving Conflicts in Searching and Ordering Data with Typesense
SamHendley faced an issue with search result order in Typesense. Kishore Nallan explained two behaviors that affected the ranking and pledged to change these, while also considering an additional suggestion from SamHendley. These changes were implemented in version `0.24.0.rcn39`.
Issues With `text_match` Scoring for Search Queries in Typesense
Colin encountered issues with the `text_match` scoring on Typesense v0.23.1. Jason and Kishore Nallan identified a potential issue with numeric overflow in the text match score and applied an unverified patch. The final resolution is unclear.