lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r407903 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/ConstantScoreQuery.java src/java/org/apache/lucene/search/MatchAllDocsQuery.java
Date Fri, 19 May 2006 20:29:10 GMT
Author: yonik
Date: Fri May 19 13:29:09 2006
New Revision: 407903

URL: http://svn.apache.org/viewvc?rev=407903&view=rev
Log:
add empty extractTerms(): LUCENE-556

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=407903&r1=407902&r2=407903&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Fri May 19 13:29:09 2006
@@ -65,6 +65,10 @@
     didn't know about the field yet, reader didn't keep track if it had deletions,
     and deleteDocument calls could circumvent synchronization on the subreaders.
     (Chuck Williams via Yonik Seeley)
+
+14. LUCENE-556: Added empty extractTerms() implementation to MatchAllDocsQuery and
+    ConstantScoreQuery in order to allow their use with a MultiSearcher.
+    (Yonik Seeley)
     
 1.9.1
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java?rev=407903&r1=407902&r2=407903&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java Fri May 19
13:29:09 2006
@@ -20,6 +20,7 @@
 
 import java.io.IOException;
 import java.util.BitSet;
+import java.util.Set;
 
 /**
  * A query that wraps a filter and simply returns a constant score equal to the
@@ -37,6 +38,11 @@
 
   public Query rewrite(IndexReader reader) throws IOException {
     return this;
+  }
+
+  public void extractTerms(Set terms) {
+    // OK to not add any terms when used for MultiSearcher,
+    // but may not be OK for highlighting
   }
 
   protected class ConstantWeight implements Weight {

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java?rev=407903&r1=407902&r2=407903&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java Fri May 19
13:29:09 2006
@@ -25,6 +25,8 @@
 import org.apache.lucene.search.Weight;
 import org.apache.lucene.util.ToStringUtils;
 
+import java.util.Set;
+
 /**
  * A query that matches all documents.
  * 
@@ -130,6 +132,9 @@
 
   protected Weight createWeight(Searcher searcher) {
     return new MatchAllDocsWeight(searcher);
+  }
+
+  public void extractTerms(Set terms) {
   }
 
   public String toString(String field) {



Mime
View raw message