Uncaught exception when searching includes "
JabRef version
5.8 (latest release)
Operating system
GNU / Linux
Details on version and operating system
Ubuntu 21.04
Checked with the latest development build
- [X] 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
Enter a search term including: "soziale Arbeit"
--> the problem does not occur in every situation. It could be caused by the space between the two words.

Appendix
...
Log File
Index path for /home/felix/Dokumente/UniDaten/backup/Jena.bib is /home/felix/.local/share/JabRef/lucene94
Could not parse query: '"bi'!
Cannot parse '"bi': Lexical error at line 1, column 4. Encountered: <EOF> after : "\"bi"
Index path for /home/felix/Dokumente/UniDaten/backup/Jena.bib is /home/felix/.local/share/JabRef/lucene94
Could not parse query: '"b'!
Cannot parse '"b': Lexical error at line 1, column 3. Encountered: <EOF> after : "\"b"
Index path for /home/felix/Dokumente/UniDaten/backup/Jena.bib is /home/felix/.local/share/JabRef/lucene94
Index path for /home/felix/Dokumente/UniDaten/backup/Jena.bib is /home/felix/.local/share/JabRef/lucene94
Could not parse query: 'biermann"'!
Cannot parse 'biermann"': Lexical error at line 1, column 10. Encountered: <EOF> after : ""
Uncaught exception occurred in Thread[JavaFX Application Thread,5,main]
java.lang.IllegalStateException: field "path" was indexed without position data; cannot run PhraseQuery (phrase=path:"sozial arbeit")
at [email protected]/org.apache.lucene.search.PhraseQuery$1.getPhraseMatcher(Unknown Source)
at [email protected]/org.apache.lucene.search.PhraseWeight.scorer(Unknown Source)
at [email protected]/org.apache.lucene.search.Weight.scorerSupplier(Unknown Source)
at [email protected]/org.apache.lucene.search.BooleanWeight.scorerSupplier(Unknown Source)
at [email protected]/org.apache.lucene.search.BooleanWeight.scorer(Unknown Source)
at [email protected]/org.apache.lucene.search.Weight.bulkScorer(Unknown Source)
at [email protected]/org.apache.lucene.search.BooleanWeight.bulkScorer(Unknown Source)
at [email protected]/org.apache.lucene.search.IndexSearcher.search(Unknown Source)
at [email protected]/org.apache.lucene.search.IndexSearcher.search(Unknown Source)
at [email protected]/org.apache.lucene.search.IndexSearcher.search(Unknown Source)
at [email protected]/org.apache.lucene.search.IndexSearcher.searchAfter(Unknown Source)
at [email protected]/org.apache.lucene.search.IndexSearcher.search(Unknown Source)
at [email protected]/org.jabref.logic.pdf.search.retrieval.PdfSearcher.search(Unknown Source)
at [email protected]/org.jabref.model.search.rules.GrammarBasedSearchRule.init(Unknown Source)
at [email protected]/org.jabref.model.search.rules.GrammarBasedSearchRule.validateSearchStrings(Unknown Source)
at [email protected]/org.jabref.model.search.rules.SearchRules.getSearchRuleByQuery(Unknown Source)
at [email protected]/org.jabref.logic.search.SearchQuery.<init>(Unknown Source)
at [email protected]/org.jabref.gui.search.GlobalSearchBar.performSearch(Unknown Source)
at [email protected]/org.reactfx.util.FxTimer.lambda$restart$0(Unknown Source)
at [email protected]/com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(Unknown Source)
at [email protected]/com.sun.scenario.animation.shared.TimelineClipCore.playTo(Unknown Source)
at [email protected]/javafx.animation.Timeline.doPlayTo(Unknown Source)
at [email protected]/javafx.animation.AnimationAccessorImpl.playTo(Unknown Source)
at [email protected]/com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(Unknown Source)
at [email protected]/javafx.animation.Animation.doTimePulse(Unknown Source)
at [email protected]/javafx.animation.Animation$1.lambda$timePulse$0(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at [email protected]/javafx.animation.Animation$1.timePulse(Unknown Source)
at [email protected]/com.sun.scenario.animation.AbstractPrimaryTimer.timePulseImpl(Unknown Source)
at [email protected]/com.sun.scenario.animation.AbstractPrimaryTimer$MainLoop.run(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(Unknown Source)
at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at [email protected]/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Hi! Thanks for reporting this. Unfortunately I am unable to reproduce the behavior you are seeing. Would you be so kind to share logs regarding this error message? (should be visible in 'Details anzeigen' in the error notification).
Some more things that you can try:
- Do the same search while disabling fulltext search (the file icon with the eye in the right of the search bar)
- Rebuild the index (Tools -> Rebuild fulltext search index)
Let me know if the issue still persists after that.
Hi! I added the log file.
Just found a simliar issue from @ThiloteE #8287 where I posted this link https://northcoder.com/post/lucene-fields-and-term-vectors/
Hm, I think the log you posted and the image do not fit well together, as they are different errors.
- For the image, sounds like something is wrong with the index. It complains about the path field not having positional data, but it is stored as a StringField. StringFields should not require positional data as they are not tokenized but the whole string is stored as-is. Maybe we do something wrong when trying to display it afterwards? Will have a look. In that case, the issue would not really be the quotation marks.
- For the log, this could be hard to solve. I think whats happening is that JabRef starts searching while you type and therefore at some point has a search string that includes a single quotation mark so it cannot find the closing quotation mark. You can see in the log that the search string was
"bi. What we would need here would be additional query validation for lucene. Easy fix would be to just add closing quotation marks whenever an uneven number of quotation marks is found in the search string? Nice solution would be query validation and giving the user feedback if the closing quotation mark is missing and refusing search until syntax errors are fixed (which is on my list for things to implement for the full lucene search backend).
Thank you for the exploration. The error only occured with fulltext search activated and was accompanied by a lag while typing. So in my case it was probably caused by the second error. Another reason to deactivate fulltext search on default (https://github.com/JabRef/jabref/issues/9491).
Is this still reproducible in JabRef-alpha3?
/assign-me
Thank you for your continued work in JabRef. At this point, you probably already know the basics and the important links. If not, our contributing guidelines is the place you should go to.
At this point in time, you raised 2 pull request(s) of which 0% (0/2) have been merged.
is this bug still valid since it s a very old bug from 2022
⏰ Assignment Reminder
Hi @madhav758, this is a friendly reminder about your assignment to this issue.
[!WARNING] This issue will be automatically unassigned in 7 days if there's no activity.
Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.
How to keep your assignment
If you are working on it, you can prevent automatic unassignment by:
- Submitting a draft pull request with your progress within 7 days
- Asking for the 📌 Pinned label if you need more time
We appreciate your contribution and are here to help if needed!
/unassign-me
@madhav758 has been unassigned from this issue.
/assign-me
👋 Hey @RexshanSam, thank you for your interest in this issue! 🎉
We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.
For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.
In case you encounter failing tests during development, please check our developer FAQs!
Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.
Happy coding! 🚀
We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.
For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/17001.