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

Entering an Id at the Web Search should search for the id - and not throw an Exception #7575

Closed
WolfgangFahl opened this issue Mar 27, 2021 · 13 comments · Fixed by #10063
Closed
Assignees

Comments

@WolfgangFahl
Copy link

WolfgangFahl commented Mar 27, 2021

JabRef version 5.3 on Mac OS X 10.15.7 Catalina

Steps to reproduce the behavior:

  1. select DBLP for search
  2. paste DOI 10.1007/s11192-020-03391-y into the web search field
  3. click search
org.jabref.logic.importer.FetcherException: An error occurred when parsing the query
	at org.jabref@5.3.218/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
	at org.jabref@5.3.218/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$1(Unknown Source)
	at org.jabref@5.3.218/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
	at org.jabref@5.3.218/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
	at org.jabref.merged.module@5.3.218/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
@Siedlerchr
Copy link
Member

Thanks for your report, can reproduce this. Please note that using the WebSearch for Identifier is not the right way. If you have an Identifier like a DOI or ISBN the right workflow is to use Library -> New Entry.

However, if you have a DOI, you can also directly paste it on the maintable

grafik

Refs #7411

@WolfgangFahl
Copy link
Author

I think the useability would much increase if the web search would automatically detect certain identifiers like ISBN and DOI

@koppor
Copy link
Member

koppor commented Jun 9, 2021

@WolfgangFahl We will use Lucene Syntax in our next release. You can have a sneak look at https://builds.jabref.org/pull/7809/merge/.

In your concrete case, the query should be doi:"10.1007/s11192-020-03391-y", because fields and content are separated by :. Moreover, - is a Boolean not in Lucence, thus we need to put quotes around. I know, this is not that good, maybe, we should add some pre-processing step to convert "intuitive" queries to syntactically correct ones. An "intuitive query" might be <FIELDNAME> <FIELDCONTENT>. @DominikVoigt

@koppor koppor changed the title Exception on search Entering an Id at the Web Search should search for the id - an not throw an Exception Jun 27, 2021
@koppor koppor changed the title Entering an Id at the Web Search should search for the id - an not throw an Exception Entering an Id at the Web Search should search for the id - and not throw an Exception Jun 27, 2021
@koppor
Copy link
Member

koppor commented Jun 27, 2021

This report is relates to #550 in the way that #550 asks for the "new entry" dialog and here the feature is asked for the web search.

@koppor koppor added the ui label Jun 27, 2021
@WolfgangFahl
Copy link
Author

WolfgangFahl commented Jun 28, 2021

My own tool Proceedings Title Parser tries to analyze the input of the query and "guess" what the search looks for. I didn't implement a DOI mode yet but intend to do so. When I am at it i hope to share the ideas and code for the solution.

@koppor
Copy link
Member

koppor commented Aug 29, 2021

I think, a "relaxed" parser should be put before the actual Lucene parser. One could try to parse the input string as DOI, ISBN, ... If there is not a match, it is "just" a plain title. This doi:"10.1007/s11192-020-03391-y" instead of doi:10.1007/s11192-020-03391-y or 10.1007/s11192-020-03391-y is Lucene-technically correct, but a very bad user experience. @DominikVoigt Maybe you could work on that?

(Adn I see, I reiterate my statement from #7575 (comment))

@Siedlerchr
Copy link
Member

Refs also #7666

@DominikVoigt DominikVoigt self-assigned this Sep 3, 2021
@koppor koppor moved this to Normal priority in Prioritization Nov 10, 2022
@WolfgangFahl
Copy link
Author

http://sotsog.bitplan.com/ has the DOI mode now.

since i am using python now mostly it would be good to have RESTFul integration with JabRef but as far as i understand JabRef is not web based at this point.

@koppor
Copy link
Member

koppor commented Apr 27, 2023

since i am using python now mostly it would be good to have RESTFul integration with JabRef but as far as i understand JabRef is not web based at this point.

@WolfgangFahl Side comment: We have to active development streams ongoing:

The most important historical attempt for an online version is surely CloudRef with a concept of a) sharing PDF annotations among others and b) enablement of reviewing of new entries (to enable quality assurance).

@koppor
Copy link
Member

koppor commented Apr 30, 2023

There can be a "pre-processor" / pre-fetch using org.jabref.logic.importer.CompositeIdFetcher. This fetcher both tries to parse the Id. If the id is found, the fetcher is used.

If this is done as first step before the current parsing, it should "just" work.

@koppor
Copy link
Member

koppor commented May 4, 2023

The code is not in CompositeIdFetcher, but at /src/main/java/org/jabref/gui/importer/fetcher/WebSearchPaneViewModel.java#L81. Tests are in org.jabref.gui.importer.fetcher.WebSearchPaneViewModelTest.

@aqurilla
Copy link
Contributor

aqurilla commented Jul 3, 2023

Is this issue up for grabs?

@ThiloteE ThiloteE assigned aqurilla and unassigned DominikVoigt Jul 3, 2023
@aqurilla
Copy link
Contributor

aqurilla commented Jul 3, 2023

Thankyou! @ThiloteE

@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment