-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 lucene query #12100
Fix lucene query #12100
Conversation
Field names shouldn't contain any special characters; otherwise, the parser will throw an exception.
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
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.
Looks good.
Since this is kind of hotfix, I just go ahead with merge.
public static Query searchToLucene(SearchQuery searchQuery) { | ||
public static String searchToLucene(SearchQuery searchQuery) { |
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.
We loos strong typing, but I think, the conversion is easier now.
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.
Yes, because using the Analyzer here removes words like "a" and "the", which can lead to empty queries with null
. This also made testing a bit confusing. For example, if the search term was image
, I had to know its stem (imag
) for the tests to pass.
public String getUniqueName() { | ||
if (getDatabasePath().isPresent()) { | ||
Path databasePath = getDatabasePath().get(); | ||
return BackupFileUtil.getUniqueFilePrefix(databasePath) + "--" + databasePath.getFileName(); | ||
} | ||
return "unsaved" + NUMBER_OF_UNSAVED_LIBRARIES++; | ||
} | ||
|
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.
That this is removed explains a lot - I missed "my" numbers at untitled - but it is OK IMHO.
The other unique path feature still works:
Refs https://github.com/JabRef/jabref-issue-melting-pot/issues/614
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.
No, this method was used only for the Postgres table name, so it is another issue.
Follow-up to #11803
Closes https://github.com/JabRef/jabref-issue-melting-pot/issues/652
Closes https://github.com/JabRef/jabref-issue-melting-pot/issues/655
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)