You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2007/05/20 23:21:05 UTC

svn commit: r539943 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/search/SolrIndexSearcher.java src/test/org/apache/solr/ConvertedLegacyTest.java

Author: yonik
Date: Sun May 20 14:21:04 2007
New Revision: 539943

URL: http://svn.apache.org/viewvc?view=rev&rev=539943
Log:
update to lucene 2007-05-20

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java
    lucene/solr/trunk/src/test/org/apache/solr/ConvertedLegacyTest.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?view=diff&rev=539943&r1=539942&r2=539943
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Sun May 20 14:21:04 2007
@@ -47,6 +47,9 @@
 to get the old behavior, or add it as a default to the request handler
 in solrconfig.xml
 
+The Lucene based Solr query syntax is slightly more strict.
+A ':' in a field value must be escaped or the whole value must be quoted.
+
 
 Detailed Change List
 --------------------
@@ -321,6 +324,8 @@
 
 Other Changes
  1. Updated to Lucene 2.1
+
+ 2. Updated to Lucene 2007-05-20_00-04-53
 
 ================== Release 1.1.0, 20061222 ==================
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java?view=diff&rev=539943&r1=539942&r2=539943
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java Sun May 20 14:21:04 2007
@@ -21,6 +21,7 @@
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermDocs;
+import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.search.*;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.PriorityQueue;
@@ -334,8 +335,17 @@
    * Retrieve the {@link Document} instance corresponding to the document id.
    */
   public Document doc(int i) throws IOException {
-    return doc(i, null);
+    return doc(i, (Set<String>)null);
   }
+
+  /** Retrieve a {@link Document} using a {@link org.apache.lucene.document.FieldSelector}
+   * This method does not currently use the Solr document cache.
+   * 
+   * @see Searchable#document(int, FieldSelector) */
+  public Document doc(int n, FieldSelector fieldSelector) throws IOException {
+    return searcher.getIndexReader().document(n, fieldSelector);
+  }
+
   /**
    * Retrieve the {@link Document} instance corresponding to the document id.
    *

Modified: lucene/solr/trunk/src/test/org/apache/solr/ConvertedLegacyTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/ConvertedLegacyTest.java?view=diff&rev=539943&r1=539942&r2=539943
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/ConvertedLegacyTest.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/ConvertedLegacyTest.java Sun May 20 14:21:04 2007
@@ -1035,7 +1035,7 @@
     assertQ(req("id:42 AND subword:www.yahoo.com")
             ,"*[count(//doc)=1]"
             );
-    assertQ(req("id:42 AND subword:http://www.yahoo.com")
+    assertQ(req("id:42 AND subword:http\\://www.yahoo.com")
             ,"*[count(//doc)=1]"
             );