lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r804700 - in /lucene/solr/trunk: ./ lib/ src/java/org/apache/solr/search/function/
Date Sun, 16 Aug 2009 14:45:10 GMT
Author: yonik
Date: Sun Aug 16 14:45:10 2009
New Revision: 804700

URL: http://svn.apache.org/viewvc?rev=804700&view=rev
Log:
upgrade to lucene 2.9-dev r804692

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/lib/lucene-analyzers-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-core-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-highlighter-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-memory-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-misc-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-queries-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-snowball-2.9-dev.jar
    lucene/solr/trunk/lib/lucene-spellchecker-2.9-dev.jar
    lucene/solr/trunk/src/java/org/apache/solr/search/function/BoostedQuery.java
    lucene/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java
    lucene/solr/trunk/src/java/org/apache/solr/search/function/QueryValueSource.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Sun Aug 16 14:45:10 2009
@@ -42,6 +42,11 @@
 for your request handlers in solrconfig.xml, see the example solrconfig.xml for
 sample syntax.) 
 
+Versions of Major Components
+----------------------------
+Apache Lucene 2.9-dev r804692
+Apache Tika 0.4
+
 Detailed Change List
 ----------------------
 
@@ -587,6 +592,7 @@
 
 45. SOLR1276: Added StatsComponentTest (Rafał Kuć, gsingers)
 
+
 Build
 ----------------------
  1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)

Modified: lucene/solr/trunk/lib/lucene-analyzers-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-analyzers-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-core-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-core-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-highlighter-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-highlighter-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-memory-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-memory-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-misc-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-misc-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-queries-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-queries-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-snowball-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-snowball-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/lib/lucene-spellchecker-2.9-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/lib/lucene-spellchecker-2.9-dev.jar?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/function/BoostedQuery.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/function/BoostedQuery.java?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/function/BoostedQuery.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/function/BoostedQuery.java Sun Aug 16
14:45:10 2009
@@ -56,7 +56,7 @@
     return new BoostedQuery.BoostedWeight(searcher);
   }
 
-  private class BoostedWeight implements Weight {
+  private class BoostedWeight extends Weight {
     Searcher searcher;
     Weight qWeight;
 
@@ -84,19 +84,19 @@
       qWeight.normalize(norm);
     }
 
-    public Scorer scorer(IndexReader reader) throws IOException {
-      Scorer subQueryScorer = qWeight.scorer(reader);
-      return new BoostedQuery.CustomScorer(getSimilarity(searcher), reader, this, subQueryScorer,
boostVal);
+    public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
throws IOException {
+      Scorer subQueryScorer = qWeight.scorer(reader, true, false);
+      return new BoostedQuery.CustomScorer(getSimilarity(searcher), searcher, reader, this,
subQueryScorer, boostVal);
     }
 
-    public Explanation explain(IndexReader reader, int doc) throws IOException {
+    public Explanation explain(Searcher searcher, IndexReader reader, int doc) throws IOException
{
       SolrIndexReader topReader = (SolrIndexReader)reader;
       SolrIndexReader[] subReaders = topReader.getLeafReaders();
       int[] offsets = topReader.getLeafOffsets();
       int readerPos = SolrIndexReader.readerIndex(doc, offsets);
       int readerBase = offsets[readerPos];
 
-      Explanation subQueryExpl = qWeight.explain(reader,doc);
+      Explanation subQueryExpl = qWeight.explain(searcher,reader,doc);
       if (!subQueryExpl.isMatch()) {
         return subQueryExpl;
       }
@@ -118,14 +118,16 @@
     private final Scorer scorer;
     private final DocValues vals;
     private final IndexReader reader;
+    private final Searcher searcher;
 
-    private CustomScorer(Similarity similarity, IndexReader reader, BoostedQuery.BoostedWeight
w,
+    private CustomScorer(Similarity similarity, Searcher searcher, IndexReader reader, BoostedQuery.BoostedWeight
w,
         Scorer scorer, ValueSource vs) throws IOException {
       super(similarity);
       this.weight = w;
       this.qWeight = w.getValue();
       this.scorer = scorer;
       this.reader = reader;
+      this.searcher = searcher; // for explain
       this.vals = vs.getValues(reader);
     }
 
@@ -155,7 +157,7 @@
     }
 
     public Explanation explain(int doc) throws IOException {
-      Explanation subQueryExpl = weight.qWeight.explain(reader,doc);
+      Explanation subQueryExpl = weight.qWeight.explain(searcher,reader,doc);
       if (!subQueryExpl.isMatch()) {
         return subQueryExpl;
       }

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java Sun Aug
16 14:45:10 2009
@@ -54,7 +54,7 @@
 
   public void extractTerms(Set terms) {}
 
-  protected class FunctionWeight implements Weight {
+  protected class FunctionWeight extends Weight {
     protected Searcher searcher;
     protected float queryNorm;
     protected float queryWeight;
@@ -63,6 +63,7 @@
       this.searcher = searcher;
     }
 
+
     public Query getQuery() {
       return FunctionQuery.this;
     }
@@ -81,17 +82,17 @@
       queryWeight *= this.queryNorm;
     }
 
-    public Scorer scorer(IndexReader reader) throws IOException {
+    public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
throws IOException {
       return new AllScorer(getSimilarity(searcher), reader, this);
     }
 
-    public Explanation explain(IndexReader reader, int doc) throws IOException {
+    public Explanation explain(Searcher searcher, IndexReader reader, int doc) throws IOException
{
       SolrIndexReader topReader = (SolrIndexReader)reader;
       SolrIndexReader[] subReaders = topReader.getLeafReaders();
       int[] offsets = topReader.getLeafOffsets();
       int readerPos = SolrIndexReader.readerIndex(doc, offsets);
       int readerBase = offsets[readerPos];
-      return scorer(subReaders[readerPos]).explain(doc-readerBase);
+      return scorer(subReaders[readerPos], true, true).explain(doc-readerBase);
     }
   }
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/function/QueryValueSource.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/function/QueryValueSource.java?rev=804700&r1=804699&r2=804700&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/function/QueryValueSource.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/function/QueryValueSource.java Sun Aug
16 14:45:10 2009
@@ -87,7 +87,7 @@
     try {
       if (doc < lastDocRequested) {
         // out-of-order access.... reset scorer.
-        scorer = weight.scorer(reader);
+        scorer = weight.scorer(reader, true, false);
         scorerDoc = scorer.nextDoc();
       }
       lastDocRequested = doc;



Mime
View raw message