-
Notifications
You must be signed in to change notification settings - Fork 489
JAMES-4166 JMAP search: drop scroll search, use from/size pagination and collapse by messageId #2928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
JAMES-4166 JMAP search: drop scroll search, use from/size pagination and collapse by messageId #2928
Conversation
…and collapse by messageId
…et onto the search engine
|
|
||
| import com.google.common.base.Preconditions; | ||
|
|
||
| public record SearchOptions(long offset, long limit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ze have a strong type for Limit, I believe we should use it.
A strong typee for offset would also be nice, it likely exist.
| int offset = Math.toIntExact(searchOptions.offset()); | ||
| int limit = Math.toIntExact(searchOptions.limit()); | ||
|
|
||
| return searcher.searchCollapsedByMessageId(mailboxIds, searchQuery, offset, limit, MESSAGE_ID_FIELD, !SEARCH_HIGHLIGHT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pass Search Options to the parameter of the searcher stuff
| limit) | ||
| SearchOptions.limit(limit)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent looks weird
chibenwa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicks along the way but IMO it really goes into the right direction
Also, modify the search API with SearchOptions and push the offset onto the search engine.