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

Problem with the retrieving results, when some of the results contain empty full text field #200

Closed
beatrycze-volk opened this issue Aug 16, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@beatrycze-volk
Copy link

Hallo,

we have encountered problem with the retrieving results, when some of the results contain empty full text field. Some of our search queries contain OR condition. It is used for querying of documents with certain phrase in full text or their parent documents which have empty strings as content of full text field.

Log from SOLR server:

java.lang.RuntimeException: Could not determine OCR format for sample ''
	at de.digitalcollections.solrocr.lucene.OcrHighlighter.lambda$getFormat$6(OcrHighlighter.java:503)
	at java.util.Optional.orElseThrow(Optional.java:290)
	at de.digitalcollections.solrocr.lucene.OcrHighlighter.getFormat(OcrHighlighter.java:501)
	at de.digitalcollections.solrocr.lucene.OcrHighlighter.highlightOcrFields(OcrHighlighter.java:346)
	at de.digitalcollections.solrocr.solr.SolrOcrHighlighter.doHighlighting(SolrOcrHighlighter.java:73)
	at de.digitalcollections.solrocr.solr.OcrHighlightComponent.process(OcrHighlightComponent.java:121)

Is there a possibility for error handling when full text contains empty string? Maybe only warning message instead of throwing the error which makes unable to parse the documents which actually contain the full text?

Best regards!

@jbaiter jbaiter added the bug Something isn't working label Aug 16, 2021
@jbaiter jbaiter self-assigned this Aug 16, 2021
@albig
Copy link

albig commented Aug 17, 2021

@jbaiter, your patch solves our issue in kitodo/kitodo-presentation#587. Thank you!

@beatrycze-volk, what do you think?

@beatrycze-volk
Copy link
Author

@albig @jbaiter First, thanks for such a fast reaction!

I will compile it today with those changes and test it to make sure that everything works for us.

@bitzl bitzl closed this as completed in e5c0a69 Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants