Skip to content

Conversation

@sergio-bobillier
Copy link
Collaborator

Changes the QueryBuilder#sort method to accept sort options as a hash in addition to the existing string format. This allows the user to pass advanced sort options like missing, mode, unmapped_type, etc.

The main driver behind this change is the multiple-index search feature that was added with JAY-676 (#35). When searching across multiple indexes, it's important to handle cases where a field might be missing in some indexes. By allowing sort options, users can now specify how to handle this scenario.

Without this possibility queries will just fail if a field is missing in one of the indexes.

Changes the QueryBuilder#sort method to accept sort options as a hash in
addition to the existing string format. This allows the user to pass
advanced sort options like 'missing', 'mode', 'unmapped_type', etc.

The main driver behind this change is the multiple-index search feature
that was added with JAY-676 (957a473). When searching across multiple
indexes, it's important to handle cases where a field might be missing
in some indexes. By allowing sort options, users can now specify how to
handle this scenario.

Without this possibility queries will just fail if a field is missing in
one of the indexes.
@sergio-bobillier sergio-bobillier force-pushed the sb-JAY-678-allow-sort-options branch from 42e70e4 to aa81edc Compare October 16, 2025 13:56
@sergio-bobillier sergio-bobillier merged commit d09b16f into master Oct 20, 2025
2 checks passed
@sergio-bobillier sergio-bobillier deleted the sb-JAY-678-allow-sort-options branch October 20, 2025 08:41
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.

3 participants