LPS-48617 Search fails with ArrayIndexOutOfBoundsException

Hello Ray,

can you please check this pull request?

Thanks in advance!

Best regards,
István