Skip to content
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

Unexpected behaviour of the new search feature #11823

Open
2 tasks done
ytzemih opened this issue Sep 24, 2024 · 5 comments
Open
2 tasks done

Unexpected behaviour of the new search feature #11823

ytzemih opened this issue Sep 24, 2024 · 5 comments
Labels
Milestone

Comments

@ytzemih
Copy link

ytzemih commented Sep 24, 2024

JabRef version

JabRef 5.16--2024-09-20--5ac788c

Operating system

GNU / Linux

Details on version and operating system

Linux Mint/Debian

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Open database with an entry A containing the string "xyz-abc" (choose as appropriate)
  2. Search for xyz AND abc
  3. Entry A does not appear in the results although it should (it did before the search feature update).
  4. Entry A will appear in the search results when using xyz abc (which in Lucene implies an OR used).

Hope anybody can reproduce this issue. I found the issue when looking for strings in the "comments" field but I tested that the issue should occur with the title field and perhaps other fields as well. The issue does not occur when using "xyz abc", so it seems the new search now expects strings to occur as substrings in separate words. I'm using search groups a lot and found that behavior today only because some entries where missing after the search-group migration.

Update: It also seems that the new search does not recognise string occurrences in the keywords anymore.

Appendix

...

Log File
Paste an excerpt of your log file here
@ytzemih
Copy link
Author

ytzemih commented Sep 24, 2024

This is perhaps a matter of taste, but the new search feature exposing Lucene syntax directly to the user feels surprisingly counterintuitive. I'm more familiar with regular expression syntax. But I'm sure I'll adapt. Is there a corresponding update of the JR help website?

@ytzemih
Copy link
Author

ytzemih commented Sep 25, 2024

Regarding the keywords, it seems to work, if the search string is part of the first keyword. But if there are more keywords and the string is only occurring in one of the keywords later in the list, search does not find it anymore. I wonder whether there is something strange happening when combining the keywords for Lucene's search?

My current workaround is to copy keywords into the comments and then it seems to work fine.

@koppor
Copy link
Member

koppor commented Sep 25, 2024

We will revert the syntax to the old one in #11803. The build of that PR does not cover all features yet. We are in the middle of migrating.

We are also working in bringing back the old search test cases

I think, we can add your description as test case. Maybe you could even post a modified test to cover your case. 😅

@koppor koppor added this to the 6.0-alpha milestone Sep 25, 2024
@koppor koppor mentioned this issue Sep 25, 2024
6 tasks
@koppor
Copy link
Member

koppor commented Sep 25, 2024

Side question: Did you migrate your search groups? Would it be OK for you to migrate them back to the v5.x syntax manually - or should we work on a converter? ^^

@ytzemih
Copy link
Author

ytzemih commented Sep 25, 2024

Thanks for clarifying the development roadmap. I see, well, it was hopefully worth a try.

No worries, it is just over a handful of groups. I can migrate them back manually by removing the "any:" and the slashes and perhaps replacing AND and OR, AFAIS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants