commit | decc67ed173db9c771383c99cf25e46f15f3b5db | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Fri Apr 29 19:16:06 2016 +0200 |
committer | Akron <nils@diewald-online.de> | Mon May 02 16:20:27 2016 +0200 |
tree | 5b0f3fa7c81f899fe0ecc092d195671a91d7b23b | |
parent | f796b8612a4e6ed123893d68f32d481667d85232 [diff] |
Fixed check for element spans payload Change-Id: Ia77e9b75fd6fdfec927837954ecae6c4931843fd
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java index 36102ee..a23240d 100644 --- a/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java +++ b/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
@@ -231,7 +231,7 @@ } // Remove span elements - else if (payload[0] == (byte) 64) { + else if ((payload[0] & (byte) 64) != 0) { continue; };
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java index ca01080..3b85685 100644 --- a/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java +++ b/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
@@ -123,10 +123,9 @@ // Remove element payloads for (byte[] payload : firstSpans.getPayload()) { - if (payload[0] == (byte) 64) { + if ((payload[0] & ((byte) 64)) != 0) { continue; }; - matchPayload.add(payload.clone()); };
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java index 2f668e2..297783d 100644 --- a/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java +++ b/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java
@@ -39,6 +39,7 @@ SpanNextQuery snq = new SpanNextQuery(stq, sfq); kr = ki.search(snq, (short) 20); + for (Match m : kr.getMatches()) { System.out.println(m.getStartPos() + " " + m.getEndPos()); }