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

search for key does not always work #11798

Closed ilippert closed 2 weeks ago

ilippert commented 1 month ago

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 5.16--2024-09-17--ed0e90e Linux 6.10.10-200.fc40.x86_64 amd64 Java 21.0.2 JavaFX 23+29

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

Steps to reproduce the behaviour

Given a library that contains inter alia entries with the keys Law:2009The and acker1990hierarchies

I am puzzled:

  1. search for Law:2009The
  2. does not deliver results

However

  1. search for acker1990hierarchies
  2. does deliver results

why is that?

Appendix

No response

ryan-carpenter commented 1 month ago

Try escaping the colon using Law\:2009The

ilippert commented 1 month ago

Try escaping the colon using Law\:2009The

yes, thanks, that works.

But I think still that a user should be able to copy and paste a key into the search field and find the result.

ryan-carpenter commented 1 month ago

But I think still that a user should be able to copy and paste a key into the search field and find the result.

I feel the pain. Most of my group names are structured like Clojure keywords with the form :group/subgroup. Colons and slashes are both special characters in Lucene syntax, so I need to search for \:group\/subgroup.

~Also note that according to the documentation, Lucene searches using regular expressions must match the whole field.~

LoayGhreeb commented 1 month ago

But I think still that a user should be able to copy and paste a key into the search field and find the result.

The search syntax has been updated to use Lucene syntax.

Searching for Law:2009The is interpreted as searching in the law field for the value 2009The. With the new syntax, : is used instead of =.

To search for the value Law:2009The, you can use either "Law:2009The" or escape the colon with Law\:2009The.