LPS-48617 Search fails with ArrayIndexOutOfBoundsException

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