Skip to content

[fix] extend sort by to include bucket_size#71

Closed
dot2dotseurat wants to merge 1 commit intoigrek8:mainfrom
duneanalytics:fix/buildsortby-extend-to-bucket-size
Closed

[fix] extend sort by to include bucket_size#71
dot2dotseurat wants to merge 1 commit intoigrek8:mainfrom
duneanalytics:fix/buildsortby-extend-to-bucket-size

Conversation

@dot2dotseurat
Copy link

Hi, Dune uses typesense-utils and we'd like to start using bucket_size in our sorting.

The new parameter, bucket_size, was introduced in v28

Changes

  • Added support for $bucket_size parameter in SortByTextMatch interface
  • Added new test case to verify $bucket_size functionality
  • Extended the next function to handle $bucket_size parameter in sort expressions

Testing

  • Added test case that verifies correct generation of sort expression with bucket_size:3
  • Test ensures proper integration with existing sort parameters like $order

@dot2dotseurat dot2dotseurat requested a review from igrek8 as a code owner March 26, 2025 18:19
@dot2dotseurat
Copy link
Author

@igrek8 do you have some time to review this or is there someone else I should request a review from

@igrek8
Copy link
Owner

igrek8 commented Apr 9, 2025

Hello @dot2dotseurat, version npm i typesense-utils@1.1.0 has been released with bucket_size param support. Closing this PR. https://github.com/igrek8/typesense-utils/blob/main/src/buildSortBy.test.ts#L32

@igrek8 igrek8 closed this Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants