Query by ID: setByteArrayRepresentation resulting in ArrayIndexOutOfBoundsException

Skip to first unread message

Soham Singh

Nov 22, 2019, 9:16:49 AM11/22/19
to lire-dev

I have been able to successfully use the runParallelIndexer gradle task to create an index of my image data. I am having some issues with querying by ID though. I would really appreciate some assistance.

When getBytesRef() is called in handleIdSearch():

Picture 1.png

The bdv.advance2147483647 and docId = 10, resulting in the BytesRef.EMPTY_BYTES being returned.


This obviously results in:

= 0, bvBytesRef.length = 0 and bvBytesRef.bytes is empty.

When the query field is cl_ha, this then results in a "java.lang.ArrayIndexOutOfBoundsException: 0" error when the following line is executed:

Picture 2.png

When the query field is eh_ha, or ph_ha, the ByteArrayRepresentation is identical before and after the setByteArrayRepresentation(), but does not throw an ArrayIndexOutOfBoundsException. It instead produces the same set of results irrespective of the query image ID. I am assuming this is because it is always the same ByteArrayRepresentation (i.e. all i in bytes[i] = -128)

I would greatly appreciate any assistance in this regard, as I am very confused as to what could be the issue.

Thank you,
Message has been deleted

Soham Singh

Jan 4, 2020, 6:20:26 AM1/4/20
to lire-dev
I would really appreciate any assistance with this matter. I have attempted to debug this numerous times and I am still unsure as to why this is happening.

Thank you.
Reply all
Reply to author
0 new messages