Apache Solr open-source search software
update to lucene 2007-05-20
Yonik Seeley1722c8a48565
diff --git a/CHANGES.txt b/CHANGES.txtindex ba8edc3b19d..f9a3d6b461b 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -47,6 +47,9 @@ clients to retain sorted order. Use json.nl=map explicitly in clientsto get the old behavior, or add it as a default to the request handlerin 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--------------------@@ -322,6 +325,8 @@ Bug FixesOther Changes1. Updated to Lucene 2.1+ 2. Updated to Lucene 2007-05-20_00-04-53+================== Release 1.1.0, 20061222 ==================Statusdiff --git a/src/java/org/apache/solr/search/SolrIndexSearcher.java b/src/java/org/apache/solr/search/SolrIndexSearcher.javaindex 4943bc84c4f..1157fe0d4cb 100644--- a/src/java/org/apache/solr/search/SolrIndexSearcher.java+++ b/src/java/org/apache/solr/search/SolrIndexSearcher.java@@ -21,6 +21,7 @@ import org.apache.lucene.document.*;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 @@ public class SolrIndexSearcher extends Searcher implements SolrInfoMBean {* 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.*diff --git a/src/test/org/apache/solr/ConvertedLegacyTest.java b/src/test/org/apache/solr/ConvertedLegacyTest.javaindex 75015f9c1e1..eb436e72a00 100644--- a/src/test/org/apache/solr/ConvertedLegacyTest.java+++ b/src/test/org/apache/solr/ConvertedLegacyTest.java@@ -1035,7 +1035,7 @@ public class ConvertedLegacyTest extends AbstractSolrTestCase {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]");