You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ko...@apache.org on 2012/01/30 03:19:41 UTC
svn commit: r1237531 - in /lucene/dev/branches/branch_3x: ./ lucene/
lucene/contrib/CHANGES.txt lucene/contrib/analyzers/kuromoji/
lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java
solr/ solr/core/
Author: koji
Date: Mon Jan 30 02:19:41 2012
New Revision: 1237531
URL: http://svn.apache.org/viewvc?rev=1237531&view=rev
Log:
LUCENE-3719:FVH: slow performance on very large queries
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
lucene/dev/branches/branch_3x/lucene/contrib/analyzers/kuromoji/ (props changed)
lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java
lucene/dev/branches/branch_3x/solr/ (props changed)
lucene/dev/branches/branch_3x/solr/core/ (props changed)
Modified: lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt?rev=1237531&r1=1237530&r2=1237531&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt Mon Jan 30 02:19:41 2012
@@ -102,6 +102,9 @@ Bug Fixes
getRefCount() no longer checks if the taxonomy reader is already closed.
(Doron Cohen, Shai Erera)
+ * LUCENE-3719: FVH: slow performance on very large queries.
+ (Igor Motov via Koji Sekiguchi)
+
Documentation
* LUCENE-3599: Javadocs for DistanceUtils.haversine() were incorrectly
Modified: lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java?rev=1237531&r1=1237530&r2=1237531&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java Mon Jan 30 02:19:41 2012
@@ -17,11 +17,11 @@ package org.apache.lucene.search.vectorh
*/
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -65,7 +65,7 @@ public class FieldQuery {
FieldQuery( Query query, IndexReader reader, boolean phraseHighlight, boolean fieldMatch ) throws IOException {
this.fieldMatch = fieldMatch;
- List<Query> flatQueries = new ArrayList<Query>();
+ Set<Query> flatQueries = new LinkedHashSet<Query>();
flatten( query, reader, flatQueries );
saveTerms( flatQueries, reader );
Collection<Query> expandQueries = expand( flatQueries );
@@ -138,7 +138,7 @@ public class FieldQuery {
* => expandQueries={a,"b c","c d","b c d"}
*/
Collection<Query> expand( Collection<Query> flatQueries ){
- List<Query> expandQueries = new ArrayList<Query>();
+ Set<Query> expandQueries = new LinkedHashSet<Query>();
for( Iterator<Query> i = flatQueries.iterator(); i.hasNext(); ){
Query query = i.next();
i.remove();