There is an Index out of bounds bug in case of multiple distances (The example query by @bansp was "({1:Sonne []* Erde} | {2: Erde []* Sonne})" in Poliqarp+). The stack trace is:
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:400)
at java.util.ArrayList.get(ArrayList.java:413)
at de.ids_mannheim.korap.query.spans.TokenDistanceSpans.cost(TokenDistanceSpans.java:128)
at de.ids_mannheim.korap.query.spans.ClassSpans.cost(ClassSpans.java:186)
at org.apache.lucene.search.spans.SpanOrQuery$1.initSpanQueue(SpanOrQuery.java:181)
at org.apache.lucene.search.spans.SpanOrQuery$1.next(SpanOrQuery.java:193)
at de.ids_mannheim.korap.KrillIndex.search(KrillIndex.java:1325)
at de.ids_mannheim.korap.Krill.apply(Krill.java:310)
at de.ids_mannheim.korap.Krill.apply(Krill.java:279)
at de.ids_mannheim.korap.search.TestKrill.searchJSONtokenDistanceSpanBug(TestKrill.java:824)
There is an Index out of bounds bug in case of multiple distances (The example query by @bansp was "({1:Sonne []* Erde} | {2: Erde []* Sonne})" in Poliqarp+). The stack trace is:
There is a failing test case in the tokendistancespan-bug branch committed as https://github.com/KorAP/Krill/commit/acf46c9865401022a287f733931c256bae0b4471 .