JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.63k stars 2.59k forks source link

Uncaught exception when searching includes " #9482

Open teertinker opened 1 year ago

teertinker commented 1 year ago

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

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. image

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: 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: 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: 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 org.apache.lucene.core@9.4.2/org.apache.lucene.search.PhraseQuery$1.getPhraseMatcher(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.PhraseWeight.scorer(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.Weight.scorerSupplier(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.BooleanWeight.scorerSupplier(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.BooleanWeight.scorer(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.Weight.bulkScorer(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.BooleanWeight.bulkScorer(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.IndexSearcher.searchAfter(Unknown Source) at org.apache.lucene.core@9.4.2/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.jabref@5.8.60000/org.jabref.logic.pdf.search.retrieval.PdfSearcher.search(Unknown Source) at org.jabref@5.8.60000/org.jabref.model.search.rules.GrammarBasedSearchRule.init(Unknown Source) at org.jabref@5.8.60000/org.jabref.model.search.rules.GrammarBasedSearchRule.validateSearchStrings(Unknown Source) at org.jabref@5.8.60000/org.jabref.model.search.rules.SearchRules.getSearchRuleByQuery(Unknown Source) at org.jabref@5.8.60000/org.jabref.logic.search.SearchQuery.(Unknown Source) at org.jabref@5.8.60000/org.jabref.gui.search.GlobalSearchBar.performSearch(Unknown Source) at org.jabref.merged.module@5.8.60000/org.reactfx.util.FxTimer.lambda$restart$0(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.scenario.animation.shared.TimelineClipCore.playTo(Unknown Source) at org.jabref.merged.module@5.8.60000/javafx.animation.Timeline.doPlayTo(Unknown Source) at org.jabref.merged.module@5.8.60000/javafx.animation.AnimationAccessorImpl.playTo(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(Unknown Source) at org.jabref.merged.module@5.8.60000/javafx.animation.Animation.doTimePulse(Unknown Source) at org.jabref.merged.module@5.8.60000/javafx.animation.Animation$1.lambda$timePulse$0(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.jabref.merged.module@5.8.60000/javafx.animation.Animation$1.timePulse(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.scenario.animation.AbstractPrimaryTimer.timePulseImpl(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.scenario.animation.AbstractPrimaryTimer$MainLoop.run(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at org.jabref.merged.module@5.8.60000/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at org.jabref.merged.module@5.8.60000/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ```
btut commented 1 year ago

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:

Let me know if the issue still persists after that.

teertinker commented 1 year ago

Hi! I added the log file.

Siedlerchr commented 1 year ago

Just found a simliar issue from @ThiloteE #8287 where I posted this link https://northcoder.com/post/lucene-fields-and-term-vectors/

btut commented 1 year ago

Hm, I think the log you posted and the image do not fit well together, as they are different errors.

teertinker commented 1 year ago

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).