commit | cb15d2df47cd2683c04dc70988ae0d22c16cdeba | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Fri Apr 29 19:16:06 2016 +0200 |
committer | Akron <nils@diewald-online.de> | Fri Apr 29 19:16:06 2016 +0200 |
tree | a398015cd594219ed7fb2b97419bce6eadeaaf22 | |
parent | 329349a081b885c6960441910c2737ddfba75663 [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()); }