Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix inconsistent search results for date-related queries fixes#12296 #12724
base: main
Are you sure you want to change the base?
Fix inconsistent search results for date-related queries fixes#12296 #12724
Changes from 10 commits
3fd5293
de93588
7246a2f
5a70056
5a06093
e3b5368
7b77db9
034b28f
c179874
ad0fb77
bde5a22
59f9173
078a96f
5a7b093
0487fec
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The code uses assert and orElse("") for Optional handling instead of proper Optional methods. Should use ifPresent() for better Optional handling.
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.
You can use
resolvedFieldLatexFree.ifPresent(content -> ...)
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 understand the point about using ifPresent() for better Optional handling. However, I deliberately retained the assertion because the comment emphasizes detecting potential flaws.

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.
Do both.
Consistency with other code.
We cannot change current tooling easily.
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.
You can also use get() and ignore the bot comment. Seems to be best (seeing these two lines only)
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.
ON CONFLICT
is not clear to me. Add Java comentThere 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.
This handles situations where the user inserts conflicting data, such as date=2025-03-17 and year=2026. In this case, it will overwrite the previously calculated year. Should I ignore this conflict instead?
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 add Java 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.
Why empty line removed?
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 don't know why this part of the code is touched. I totally forgot about the use of the split fields. I asked @LoayGhreeb for support at documentaiotn
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 the Split Table handles multi-valued fields like keywords or groups. I did not remove it, but the entryId is calculated above.
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.
Could you add a Java comment to
org.jabref.model.search.PostgreConstants#getSplitTableSchemaReference
please?