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

Error while SOLR indexing of document without OCR #167

Closed
beatrycze-volk opened this issue May 18, 2021 · 2 comments
Closed

Error while SOLR indexing of document without OCR #167

beatrycze-volk opened this issue May 18, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@beatrycze-volk
Copy link

We have installed new version (0.6.0) and tried to index documents without OCR field or with empty OCR field. In both cases we are getting error:

Caused by: java.lang.NegativeArraySizeException at de.digitalcollections.solrocr.reader.PeekingReader.<init>(PeekingReader.java:45) at de.digitalcollections.solrocr.lucene.filters.OcrCharFilterFactory.create(OcrCharFilterFactory.java:37) at org.apache.solr.analysis.TokenizerChain.initReader(TokenizerChain.java:97)

Is there a possibility to index documents which are not containing OCR field or is there maybe some kind of placeholder which we could use for this problem?

@beatrycze-volk beatrycze-volk changed the title SOLR error Error while SOLR indexing of document without OCR May 18, 2021
@jbaiter
Copy link
Member

jbaiter commented Jun 8, 2021

Can confirm, this happens when the field value is an empty string. Just not including the field in the document does not cause any problems and works as expected.
I'm working on a fix, in the meantime try if you can find a way to tell your client library to simply skip a field if there's no value supplied for it.

@jbaiter jbaiter added the bug Something isn't working label Jun 8, 2021
@bitzl bitzl closed this as completed in b93fec6 Jun 11, 2021
@beatrycze-volk
Copy link
Author

Thanks a lot!

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

2 participants