From 38c51c2f51aae6371f3ab8e279575ea12b664cd2 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Tue, 31 Mar 2015 19:02:53 +0000 Subject: [PATCH] LUCENE-6271: remove final nocommit git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene6271@1670429 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/search/vectorhighlight/FieldTermStack.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java b/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java index e1c4450b763..3955982e70e 100644 --- a/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java +++ b/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java @@ -86,7 +86,7 @@ public class FieldTermStack { } final Terms vector = vectors.terms(fieldName); - if (vector == null) { + if (vector == null || vector.hasPositions() == false) { // null snippet return; } @@ -104,13 +104,7 @@ public class FieldTermStack { if (!termSet.contains(term)) { continue; } - // nocommit: check dpEnum = termsEnum.postings(null, dpEnum, PostingsEnum.POSITIONS); - if (dpEnum == null) { - // null snippet - return; - } - dpEnum.nextDoc(); // For weight look here: http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/search/DefaultSimilarity.html