diff --git a/lucene/contrib/CHANGES.txt b/lucene/contrib/CHANGES.txt index 53f06ac7871..f9474ffeb61 100644 --- a/lucene/contrib/CHANGES.txt +++ b/lucene/contrib/CHANGES.txt @@ -90,6 +90,8 @@ Bug Fixes * LUCENE-3417: DictionaryCompoundWordFilter did not properly add tokens from the end compound word. (Njal Karevoll via Robert Muir) + * LUCENE-3019: Fix unexpected color tags for FastVectorHighlighter. (Koji Sekiguchi) + ======================= Lucene 3.4.0 ================ New Features diff --git a/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java b/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java index a402d415fae..e329136647c 100644 --- a/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java +++ b/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java @@ -17,6 +17,7 @@ package org.apache.lucene.search.vectorhighlight; */ import java.io.IOException; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -59,7 +60,7 @@ public class FieldQuery { FieldQuery( Query query, IndexReader reader, boolean phraseHighlight, boolean fieldMatch ) throws IOException { this.fieldMatch = fieldMatch; - Set flatQueries = new HashSet(); + List flatQueries = new ArrayList(); flatten( query, reader, flatQueries ); saveTerms( flatQueries, reader ); Collection expandQueries = expand( flatQueries ); @@ -132,7 +133,7 @@ public class FieldQuery { * => expandQueries={a,"b c","c d","b c d"} */ Collection expand( Collection flatQueries ){ - Set expandQueries = new HashSet(); + List expandQueries = new ArrayList(); for( Iterator i = flatQueries.iterator(); i.hasNext(); ){ Query query = i.next(); i.remove();