JabRef / jabref

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

Full-text search: java.lang.IllegalStateException: field "path" was indexed without position data #8287

Closed ThiloteE closed 1 year ago

ThiloteE commented 2 years ago

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

JabRef 5.4--2021-11-29--217f902 Windows 10 10.0 amd64 Java 16.0.2 JavaFX 17.0.1+1

Checked with the latest development build

Steps to reproduce the behaviour

How to reproduce:

  1. Use full-text search
  2. Type in: "virtues of nondemocratic government"

image

Question:

Am i doing something wrong? According to Jabref documentation (https://docs.jabref.org/finding-sorting-and-cleaning-entries/search), searching for strings with double quotation marks (") groups words into phrases for exact matches. Why the error?

(I tried == as well, but i think that one only works only in combination with fields like author == XXX and i don't really understand how it is supposed to work with multiple words in a row.)

Troubleshooting:

Ultimately, I found the sentence in the pdf-file that i had linked to my entry. So:

Therefore:

Problem lies with either

Appendix

...

Log File ``` java.lang.IllegalStateException: field "path" was indexed without position data; cannot run PhraseQuery (phrase=path:"virtu ? non democrat govern") at org.jabref.merged.module@5.4.524/org.apache.lucene.search.PhraseQuery$1.getPhraseMatcher(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.PhraseWeight.scorer(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.Weight.scorerSupplier(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.BooleanWeight.scorerSupplier(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.BooleanWeight.scorer(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.Weight.bulkScorer(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.BooleanWeight.bulkScorer(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.IndexSearcher.searchAfter(Unknown Source) at org.jabref.merged.module@5.4.524/org.apache.lucene.search.IndexSearcher.search(Unknown Source) at org.jabref@5.4.524/org.jabref.logic.pdf.search.retrieval.PdfSearcher.search(Unknown Source) at org.jabref@5.4.524/org.jabref.model.search.rules.GrammarBasedSearchRule.init(Unknown Source) at org.jabref@5.4.524/org.jabref.model.search.rules.GrammarBasedSearchRule.validateSearchStrings(Unknown Source) at org.jabref@5.4.524/org.jabref.model.search.rules.SearchRules.getSearchRuleByQuery(Unknown Source) at org.jabref@5.4.524/org.jabref.logic.search.SearchQuery.(Unknown Source) at org.jabref@5.4.524/org.jabref.gui.search.GlobalSearchBar.performSearch(Unknown Source) at org.jabref.merged.module@5.4.524/org.reactfx.util.FxTimer.lambda$restart$0(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.scenario.animation.shared.TimelineClipCore.playTo(Unknown Source) at org.jabref.merged.module@5.4.524/javafx.animation.Timeline.doPlayTo(Unknown Source) at org.jabref.merged.module@5.4.524/javafx.animation.AnimationAccessorImpl.playTo(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(Unknown Source) at org.jabref.merged.module@5.4.524/javafx.animation.Animation.doTimePulse(Unknown Source) at org.jabref.merged.module@5.4.524/javafx.animation.Animation$1.lambda$timePulse$0(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.jabref.merged.module@5.4.524/javafx.animation.Animation$1.timePulse(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.scenario.animation.AbstractPrimaryTimer.timePulseImpl(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.scenario.animation.AbstractPrimaryTimer$MainLoop.run(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at org.jabref.merged.module@5.4.524/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at org.jabref.merged.module@5.4.524/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ```
Siedlerchr commented 2 years ago

Some hints on what this exception means https://northcoder.com/post/lucene-fields-and-term-vectors/ Seems like we don't store the position data

koppor commented 1 year ago

Duplicate of https://github.com/JabRef/jabref/issues/9482