<@U01NZ4D0LDD> We have implemented analytics-based...
# community-help
a
@Jason Bosco We have implemented analytics-based ranking in search using
sort_by: num_is_out_of_stack:asc, ranking:desc, _text_match:desc
. However, newly added books typically have a ranking of 0, causing them to not appear on the first 1–2 pages even when they are relevant
h
Hi @Akash Kumar, This is because Typesense sorting uses the tie-breaking mechanism which means your books are sorted by
ranking
first and only books with equal ranking are then sorted by
_text_match
. To solve this you can use Text Match Score Bucketing:
Copy code
num_is_out_of_stack:asc,_text_match(buckets: 4):desc,ranking:desc
You can tweak the number of
buckets
(or
bucket_size
) based on your hits per page to make those newly added books appear on top. The smaller the
buckets
means more emphasis on the
ranking
sort field.