lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r1062944 [4/4] - in /lucene/dev/branches/realtime_search: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/solr/contrib/uima/ dev-tools/maven/ dev-tools/maven/lucene/ dev-tools/maven/lucene/contrib/ dev-tools/maven/lucene/contrib/...
Date Mon, 24 Jan 2011 19:38:47 GMT
Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java Mon Jan 24 19:38:40 2011
@@ -35,12 +35,11 @@ import org.apache.lucene.document.Field;
 import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.SlowMultiReaderWrapper;
 import org.apache.lucene.index.Payload;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.search.payloads.PayloadHelper;
@@ -51,7 +50,7 @@ import org.apache.lucene.util.LuceneTest
 
 public class TestPayloadSpans extends LuceneTestCase {
   private IndexSearcher searcher;
-  private Similarity similarity = new DefaultSimilarity();
+  private SimilarityProvider similarity = new DefaultSimilarity();
   protected IndexReader indexReader;
   private IndexReader closeIndexReader;
   private Directory directory;
@@ -68,12 +67,12 @@ public class TestPayloadSpans extends Lu
     SpanTermQuery stq;
     Spans spans;
     stq = new SpanTermQuery(new Term(PayloadHelper.FIELD, "seventy"));
-    spans = stq.getSpans(indexReader);
+    spans = MultiSpansWrapper.wrap(indexReader.getTopReaderContext(), stq);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 100, 1, 1, 1);
 
     stq = new SpanTermQuery(new Term(PayloadHelper.NO_PAYLOAD_FIELD, "seventy"));  
-    spans = stq.getSpans(indexReader);
+    spans = MultiSpansWrapper.wrap(indexReader.getTopReaderContext(), stq);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 100, 0, 0, 0);
   }
@@ -84,7 +83,7 @@ public class TestPayloadSpans extends Lu
     SpanFirstQuery sfq;
     match = new SpanTermQuery(new Term(PayloadHelper.FIELD, "one"));
     sfq = new SpanFirstQuery(match, 2);
-    Spans spans = sfq.getSpans(indexReader);
+    Spans spans = MultiSpansWrapper.wrap(indexReader.getTopReaderContext(), sfq);
     checkSpans(spans, 109, 1, 1, 1);
     //Test more complicated subclause
     SpanQuery[] clauses = new SpanQuery[2];
@@ -92,11 +91,11 @@ public class TestPayloadSpans extends Lu
     clauses[1] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "hundred"));
     match = new SpanNearQuery(clauses, 0, true);
     sfq = new SpanFirstQuery(match, 2);
-    checkSpans(sfq.getSpans(indexReader), 100, 2, 1, 1);
+    checkSpans(MultiSpansWrapper.wrap(indexReader.getTopReaderContext(), sfq), 100, 2, 1, 1);
 
     match = new SpanNearQuery(clauses, 0, false);
     sfq = new SpanFirstQuery(match, 2);
-    checkSpans(sfq.getSpans(indexReader), 100, 2, 1, 1);
+    checkSpans(MultiSpansWrapper.wrap(indexReader.getTopReaderContext(), sfq), 100, 2, 1, 1);
     
   }
   
@@ -111,7 +110,7 @@ public class TestPayloadSpans extends Lu
 
     Directory directory = newDirectory();
     RandomIndexWriter writer = new RandomIndexWriter(random, directory,
-                                                     newIndexWriterConfig(TEST_VERSION_CURRENT, new PayloadAnalyzer()).setSimilarity(similarity));
+                                                     newIndexWriterConfig(TEST_VERSION_CURRENT, new PayloadAnalyzer()).setSimilarityProvider(similarity));
 
     Document doc = new Document();
     doc.add(newField(PayloadHelper.FIELD, "one two three one four three",
@@ -119,8 +118,9 @@ public class TestPayloadSpans extends Lu
     writer.addDocument(doc);
     IndexReader reader = writer.getReader();
     writer.close();
+    
 
-    checkSpans(snq.getSpans(new SlowMultiReaderWrapper(reader)), 1,new int[]{2});
+    checkSpans(MultiSpansWrapper.wrap(reader.getTopReaderContext(), snq), 1,new int[]{2});
     reader.close();
     directory.close();
   }
@@ -130,7 +130,7 @@ public class TestPayloadSpans extends Lu
     Spans spans;
     IndexSearcher searcher = getSearcher();
     stq = new SpanTermQuery(new Term(PayloadHelper.FIELD, "mark"));
-    spans = stq.getSpans(searcher.getIndexReader());
+    spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), stq);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 0, null);
 
@@ -141,7 +141,7 @@ public class TestPayloadSpans extends Lu
     clauses[2] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "xx"));
     SpanNearQuery spanNearQuery = new SpanNearQuery(clauses, 12, false);
 
-    spans = spanNearQuery.getSpans(searcher.getIndexReader());
+    spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), spanNearQuery);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 2, new int[]{3,3});
 
@@ -152,8 +152,8 @@ public class TestPayloadSpans extends Lu
 
     spanNearQuery = new SpanNearQuery(clauses, 6, true);
    
-    
-    spans = spanNearQuery.getSpans(searcher.getIndexReader());
+    spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), spanNearQuery);
+
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 1, new int[]{3});
      
@@ -175,7 +175,7 @@ public class TestPayloadSpans extends Lu
     
     // yy within 6 of xx within 6 of rr
 
-    spans = nestedSpanNearQuery.getSpans(searcher.getIndexReader());
+    spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), nestedSpanNearQuery);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 2, new int[]{3,3});
     closeIndexReader.close();
@@ -206,8 +206,8 @@ public class TestPayloadSpans extends Lu
     clauses3[1] = snq;
      
     SpanNearQuery nestedSpanNearQuery = new SpanNearQuery(clauses3, 6, false);
+    spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), nestedSpanNearQuery);
 
-    spans = nestedSpanNearQuery.getSpans(searcher.getIndexReader());
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 1, new int[]{3});
     closeIndexReader.close();
@@ -244,7 +244,7 @@ public class TestPayloadSpans extends Lu
      
     SpanNearQuery nestedSpanNearQuery = new SpanNearQuery(clauses3, 6, false);
 
-    spans = nestedSpanNearQuery.getSpans(searcher.getIndexReader());
+    spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), nestedSpanNearQuery);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 2, new int[]{8, 8});
     closeIndexReader.close();
@@ -261,7 +261,7 @@ public class TestPayloadSpans extends Lu
     doc.add(new Field("content", new StringReader("a b c d e f g h i j a k")));
     writer.addDocument(doc);
 
-    IndexReader reader = new SlowMultiReaderWrapper(writer.getReader());
+    IndexReader reader = writer.getReader();
     IndexSearcher is = new IndexSearcher(reader);
     writer.close();
 
@@ -269,7 +269,7 @@ public class TestPayloadSpans extends Lu
     SpanTermQuery stq2 = new SpanTermQuery(new Term("content", "k"));
     SpanQuery[] sqs = { stq1, stq2 };
     SpanNearQuery snq = new SpanNearQuery(sqs, 1, true);
-    Spans spans = snq.getSpans(is.getIndexReader());
+    Spans spans = MultiSpansWrapper.wrap(is.getTopReaderContext(), snq);
 
     TopDocs topDocs = is.search(snq, 1);
     Set<String> payloadSet = new HashSet<String>();
@@ -298,7 +298,7 @@ public class TestPayloadSpans extends Lu
     Document doc = new Document();
     doc.add(new Field("content", new StringReader("a b a d k f a h i k a k")));
     writer.addDocument(doc);
-    IndexReader reader = new SlowMultiReaderWrapper(writer.getReader());
+    IndexReader reader = writer.getReader();
     IndexSearcher is = new IndexSearcher(reader);
     writer.close();
 
@@ -306,7 +306,7 @@ public class TestPayloadSpans extends Lu
     SpanTermQuery stq2 = new SpanTermQuery(new Term("content", "k"));
     SpanQuery[] sqs = { stq1, stq2 };
     SpanNearQuery snq = new SpanNearQuery(sqs, 0, true);
-    Spans spans = snq.getSpans(is.getIndexReader());
+    Spans spans =  MultiSpansWrapper.wrap(is.getTopReaderContext(), snq);
 
     TopDocs topDocs = is.search(snq, 1);
     Set<String> payloadSet = new HashSet<String>();
@@ -334,7 +334,7 @@ public class TestPayloadSpans extends Lu
     Document doc = new Document();
     doc.add(new Field("content", new StringReader("j k a l f k k p a t a k l k t a")));
     writer.addDocument(doc);
-    IndexReader reader = new SlowMultiReaderWrapper(writer.getReader());
+    IndexReader reader = writer.getReader();
     IndexSearcher is = new IndexSearcher(reader);
     writer.close();
 
@@ -342,7 +342,7 @@ public class TestPayloadSpans extends Lu
     SpanTermQuery stq2 = new SpanTermQuery(new Term("content", "k"));
     SpanQuery[] sqs = { stq1, stq2 };
     SpanNearQuery snq = new SpanNearQuery(sqs, 0, true);
-    Spans spans = snq.getSpans(is.getIndexReader());
+    Spans spans =  MultiSpansWrapper.wrap(is.getTopReaderContext(), snq);
 
     TopDocs topDocs = is.search(snq, 1);
     Set<String> payloadSet = new HashSet<String>();
@@ -370,17 +370,17 @@ public class TestPayloadSpans extends Lu
   public void testPayloadSpanUtil() throws Exception {
     Directory directory = newDirectory();
     RandomIndexWriter writer = new RandomIndexWriter(random, directory,
-                                                     newIndexWriterConfig(TEST_VERSION_CURRENT, new PayloadAnalyzer()).setSimilarity(similarity));
+                                                     newIndexWriterConfig(TEST_VERSION_CURRENT, new PayloadAnalyzer()).setSimilarityProvider(similarity));
 
     Document doc = new Document();
     doc.add(newField(PayloadHelper.FIELD,"xx rr yy mm  pp", Field.Store.YES, Field.Index.ANALYZED));
     writer.addDocument(doc);
   
-    IndexReader reader = new SlowMultiReaderWrapper(writer.getReader());
+    IndexReader reader = writer.getReader();
     writer.close();
     IndexSearcher searcher = new IndexSearcher(reader);
 
-    PayloadSpanUtil psu = new PayloadSpanUtil(searcher.getIndexReader());
+    PayloadSpanUtil psu = new PayloadSpanUtil(searcher.getTopReaderContext());
     
     Collection<byte[]> payloads = psu.getPayloadsForQuery(new TermQuery(new Term(PayloadHelper.FIELD, "rr")));
     if(VERBOSE)
@@ -430,7 +430,7 @@ public class TestPayloadSpans extends Lu
     directory = newDirectory();
     String[] docs = new String[]{"xx rr yy mm  pp","xx yy mm rr pp", "nopayload qq ss pp np", "one two three four five six seven eight nine ten eleven", "nine one two three four five six seven eight eleven ten"};
     RandomIndexWriter writer = new RandomIndexWriter(random, directory,
-                                                     newIndexWriterConfig(TEST_VERSION_CURRENT, new PayloadAnalyzer()).setSimilarity(similarity));
+                                                     newIndexWriterConfig(TEST_VERSION_CURRENT, new PayloadAnalyzer()).setSimilarityProvider(similarity));
 
     Document doc = null;
     for(int i = 0; i < docs.length; i++) {
@@ -440,7 +440,7 @@ public class TestPayloadSpans extends Lu
       writer.addDocument(doc);
     }
 
-    closeIndexReader = new SlowMultiReaderWrapper(writer.getReader());
+    closeIndexReader = writer.getReader();
     writer.close();
 
     IndexSearcher searcher = new IndexSearcher(closeIndexReader);

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java Mon Jan 24 19:38:40 2011
@@ -20,24 +20,26 @@ package org.apache.lucene.search.spans;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.CheckHits;
-import org.apache.lucene.search.Similarity;
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Weight.ScorerContext;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.analysis.MockAnalyzer;
+import org.apache.lucene.index.IndexReader.ReaderContext;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexReader.AtomicReaderContext;
-import org.apache.lucene.index.SlowMultiReaderWrapper;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.ReaderUtil;
+
 import java.io.IOException;
 
 public class TestSpans extends LuceneTestCase {
@@ -197,7 +199,7 @@ public class TestSpans extends LuceneTes
                                 makeSpanTermQuery("t3") },
                               slop,
                               ordered);
-    Spans spans = snq.getSpans(new SlowMultiReaderWrapper(searcher.getIndexReader()));
+    Spans spans = MultiSpansWrapper.wrap(searcher.getTopReaderContext(), snq);
 
     assertTrue("first range", spans.next());
     assertEquals("first doc", 11, spans.doc());
@@ -223,7 +225,7 @@ public class TestSpans extends LuceneTes
                                 makeSpanTermQuery("u2") },
                               0,
                               false);
-    Spans spans = snq.getSpans(new SlowMultiReaderWrapper(searcher.getIndexReader()));
+    Spans spans =  MultiSpansWrapper.wrap(searcher.getTopReaderContext(), snq);
     assertTrue("Does not have next and it should", spans.next());
     assertEquals("doc", 4, spans.doc());
     assertEquals("start", 1, spans.start());
@@ -259,7 +261,7 @@ public class TestSpans extends LuceneTes
                               },
                               1,
                               false);
-    spans = snq.getSpans(new SlowMultiReaderWrapper(searcher.getIndexReader()));
+    spans =  MultiSpansWrapper.wrap(searcher.getTopReaderContext(), snq);
     assertTrue("Does not have next and it should", spans.next());
     assertEquals("doc", 4, spans.doc());
     assertEquals("start", 0, spans.start());
@@ -317,7 +319,7 @@ public class TestSpans extends LuceneTes
     for (int i = 0; i < terms.length; i++) {
       sqa[i] = makeSpanTermQuery(terms[i]);
     }
-    return (new SpanOrQuery(sqa)).getSpans(new SlowMultiReaderWrapper(searcher.getIndexReader()));
+    return  MultiSpansWrapper.wrap(searcher.getTopReaderContext(), new SpanOrQuery(sqa));
   }
 
   private void tstNextSpans(Spans spans, int doc, int start, int end)
@@ -402,34 +404,43 @@ public class TestSpans extends LuceneTes
   public void testSpanScorerZeroSloppyFreq() throws Exception {
     boolean ordered = true;
     int slop = 1;
-
-    final Similarity sim = new DefaultSimilarity() {
-      @Override
-      public float sloppyFreq(int distance) {
-        return 0.0f;
+    ReaderContext topReaderContext = searcher.getTopReaderContext();
+    AtomicReaderContext[] leaves = ReaderUtil.leaves(topReaderContext);
+    int subIndex = ReaderUtil.subIndex(11, leaves);
+    for (int i = 0; i < leaves.length; i++) {
+      
+     
+      final SimilarityProvider sim = new DefaultSimilarity() {
+        @Override
+        public float sloppyFreq(int distance) {
+          return 0.0f;
+        }
+      };
+  
+      final SimilarityProvider oldSim = searcher.getSimilarityProvider();
+      Scorer spanScorer;
+      try {
+        searcher.setSimilarityProvider(sim);
+        SpanNearQuery snq = new SpanNearQuery(
+                                new SpanQuery[] {
+                                  makeSpanTermQuery("t1"),
+                                  makeSpanTermQuery("t2") },
+                                slop,
+                                ordered);
+  
+        spanScorer = snq.weight(searcher).scorer(leaves[i], ScorerContext.def());
+      } finally {
+        searcher.setSimilarityProvider(oldSim);
+      }
+      if (i == subIndex) {
+        assertTrue("first doc", spanScorer.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
+        assertEquals("first doc number", spanScorer.docID() + leaves[i].docBase, 11);
+        float score = spanScorer.score();
+        assertTrue("first doc score should be zero, " + score, score == 0.0f);
+      }  else {
+        assertTrue("no second doc", spanScorer.nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
       }
-    };
-
-    final Similarity oldSim = searcher.getSimilarity();
-    Scorer spanScorer;
-    try {
-      searcher.setSimilarity(sim);
-      SpanNearQuery snq = new SpanNearQuery(
-                              new SpanQuery[] {
-                                makeSpanTermQuery("t1"),
-                                makeSpanTermQuery("t2") },
-                              slop,
-                              ordered);
-
-      spanScorer = snq.weight(searcher).scorer(new AtomicReaderContext(new SlowMultiReaderWrapper(searcher.getIndexReader())), ScorerContext.def());
-    } finally {
-      searcher.setSimilarity(oldSim);
     }
-    assertTrue("first doc", spanScorer.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
-    assertEquals("first doc number", spanScorer.docID(), 11);
-    float score = spanScorer.score();
-    assertTrue("first doc score should be zero, " + score, score == 0.0f);
-    assertTrue("no second doc", spanScorer.nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
   }
 
   // LUCENE-1404

Modified: lucene/dev/branches/realtime_search/modules/analysis/common/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/analysis/common/build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/analysis/common/build.xml (original)
+++ lucene/dev/branches/realtime_search/modules/analysis/common/build.xml Mon Jan 24 19:38:40 2011
@@ -25,7 +25,6 @@
 	
   <property name="build.dir" location="../build/common" />
   <property name="dist.dir" location="../dist/common" />
-  <property name="maven.dist.dir" location="../dist/maven" />
 
   <import file="../../../lucene/contrib/contrib-build.xml"/>
 	

Modified: lucene/dev/branches/realtime_search/modules/analysis/smartcn/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/analysis/smartcn/build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/analysis/smartcn/build.xml (original)
+++ lucene/dev/branches/realtime_search/modules/analysis/smartcn/build.xml Mon Jan 24 19:38:40 2011
@@ -25,7 +25,6 @@
 	
   <property name="build.dir" location="../build/smartcn" />
   <property name="dist.dir" location="../dist/smartcn" />
-  <property name="maven.dist.dir" location="../dist/maven" />
 
   <import file="../../../lucene/contrib/contrib-build.xml"/>
 

Modified: lucene/dev/branches/realtime_search/modules/analysis/stempel/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/analysis/stempel/build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/analysis/stempel/build.xml (original)
+++ lucene/dev/branches/realtime_search/modules/analysis/stempel/build.xml Mon Jan 24 19:38:40 2011
@@ -25,7 +25,6 @@
 	
   <property name="build.dir" location="../build/stempel" />
   <property name="dist.dir" location="../dist/stempel" />
-  <property name="maven.dist.dir" location="../dist/maven" />
 
   <import file="../../../lucene/contrib/contrib-build.xml"/>
 

Modified: lucene/dev/branches/realtime_search/modules/benchmark/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/benchmark/CHANGES.txt?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/benchmark/CHANGES.txt (original)
+++ lucene/dev/branches/realtime_search/modules/benchmark/CHANGES.txt Mon Jan 24 19:38:40 2011
@@ -2,6 +2,10 @@ Lucene Benchmark Contrib Change Log
 
 The Benchmark contrib package contains code for benchmarking Lucene in a variety of ways.
 
+01/24/2011
+  LUCENE-2885: Add WaitForMerges task (calls IndexWriter.waitForMerges()).
+  (Mike McCandless)
+
 10/10/2010
   The locally built patched version of the Xerces-J jar introduced
   as part of LUCENE-1591 is no longer required, because Xerces

Modified: lucene/dev/branches/realtime_search/modules/benchmark/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/benchmark/build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/benchmark/build.xml (original)
+++ lucene/dev/branches/realtime_search/modules/benchmark/build.xml Mon Jan 24 19:38:40 2011
@@ -7,7 +7,7 @@
 
     <property name="build.dir" location="build/" />
     <property name="dist.dir" location="dist/" />
-    <property name="maven.dist.dir" location="dist/maven" />
+    <property name="maven.dist.dir" location="../dist/maven" />
 
     <import file="../../lucene/contrib/contrib-build.xml"/>
     <property name="working.dir" location="work"/>

Modified: lucene/dev/branches/realtime_search/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java (original)
+++ lucene/dev/branches/realtime_search/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java Mon Jan 24 19:38:40 2011
@@ -514,6 +514,7 @@ public class TestPerfTasksLogic extends 
         "{ [ AddDoc]: 4} : * ",
         "ResetInputs ",
         "{ [ AddDoc]: 4} : * ",
+        "WaitForMerges",
         "CloseIndex",
     };
     
@@ -549,6 +550,7 @@ public class TestPerfTasksLogic extends 
         "  ResetSystemErase",
         "  CreateIndex",
         "  { \"AddDocs\"  AddDoc > : * ",
+        "  WaitForMerges",
         "  CloseIndex",
         "} : 2",
     };

Modified: lucene/dev/branches/realtime_search/modules/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/modules/build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/modules/build.xml (original)
+++ lucene/dev/branches/realtime_search/modules/build.xml Mon Jan 24 19:38:40 2011
@@ -56,8 +56,7 @@
 
   <target name="generate-maven-artifacts" description="Generate Maven Artifacts for Modules">
     <sequential>
-	  <ant target="get-maven-poms" inheritAll="false" dir=".."/>
-
+      <ant target="get-maven-poms" inheritAll="false" dir=".."/>
       <subant target="dist-maven" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
         <fileset dir="benchmark" includes="build.xml" />
@@ -67,6 +66,7 @@
 
   <target name="clean" description="Clean all modules">
     <sequential>
+      <delete dir="dist"/>
       <subant target="clean" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
         <fileset dir="benchmark" includes="build.xml" />

Modified: lucene/dev/branches/realtime_search/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/CHANGES.txt?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/CHANGES.txt (original)
+++ lucene/dev/branches/realtime_search/solr/CHANGES.txt Mon Jan 24 19:38:40 2011
@@ -158,6 +158,8 @@ Bug Fixes
   dealing with SolrDocumentList objects -- ie: sharded queries.
   (Antonio Verni via hossman)
   
+* SOLR-2127: Fixed serialization of default core and indentation of solr.xml when serializing.
+  (Ephraim Ofir, Mark Miller)
 
 Other Changes
 ----------------------
@@ -409,6 +411,9 @@ New Features
 * SOLR-2188: Added "maxTokenLength" argument to the factories for ClassicTokenizer,
   StandardTokenizer, and UAX29URLEmailTokenizer. (Steven Rowe)
 
+* SOLR-2129: Added a Solr module for dynamic metadata extraction/indexing with Apache UIMA.
+  See contrib/uima/README.txt for more information.  (Tommaso Teofili via rmuir)
+
 Optimizations
 ----------------------
 
@@ -605,8 +610,6 @@ Bug Fixes
 
 * SOLR-2173: Suggester should always rebuild Lookup data if Lookup.load fails. (ab)
 
-* SOLR-2190: change xpath from RSS 0.9 to 1.0 in slashdot sample. (koji)
-
 * SOLR-2057: DataImportHandler never calls UpdateRequestProcessor.finish()
   (Drew Farris via koji)
 

Modified: lucene/dev/branches/realtime_search/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/build.xml (original)
+++ lucene/dev/branches/realtime_search/solr/build.xml Mon Jan 24 19:38:40 2011
@@ -56,7 +56,7 @@
     <echo message="Use 'ant compile' to compile the source code." />
     <echo message="Use 'ant dist' to build the project WAR and JAR files." />
     <echo message="Use 'ant generate-maven-artifacts' to generate maven artifacts." />
-    <echo message="Use 'ant package' to generate zip, tgz, and maven artifacts for distribution." />
+    <echo message="Use 'ant package' to generate zip, tgz for distribution." />
     <echo message="Use 'ant luke' to start luke.  see: http://luke.googlecode.com" />
     <echo message="Use 'ant test' to run unit tests." />
   </target>
@@ -218,6 +218,7 @@
           <packageset dir="contrib/dataimporthandler/src/main/java" />
           <packageset dir="contrib/clustering/src/main/java" />
           <packageset dir="contrib/extraction/src/main/java" />
+          <packageset dir="contrib/uima/src/main/java" />
           <packageset dir="contrib/analysis-extras/src/java" />
           <group title="Core" packages="org.apache.*" />
           <group title="Common" packages="org.apache.solr.common.*" />
@@ -225,6 +226,7 @@
           <group title="contrib: DataImportHandler" packages="org.apache.solr.handler.dataimport*" />
           <group title="contrib: Clustering" packages="org.apache.solr.handler.clustering*" />
           <group title="contrib: Solr Cell" packages="org.apache.solr.handler.extraction*" />
+          <group title="contrib: Solr UIMA" packages="org.apache.solr.uima*" />
         </sources>
       </invoke-javadoc>
     </sequential>
@@ -514,6 +516,7 @@
       <fileset dir="contrib/dataimporthandler/src/main/java" />
       <fileset dir="contrib/clustering/src/main/java" />
       <fileset dir="contrib/extraction/src/main/java" />
+      <fileset dir="contrib/uima/src/main/java" />
       <fileset dir="contrib/analysis-extras/src/java" />
     </clover-setup>
   </target>
@@ -617,6 +620,10 @@
               basedir="contrib/clustering/src" />
     <solr-jar destfile="${dist}/apache-solr-analysis-extras-src-${version}.jar"
               basedir="contrib/analysis-extras/src" />
+    <solr-jar destfile="${dist}/apache-solr-uima-src-${version}.jar"
+              basedir="contrib/uima/src/main/java" >
+       <fileset dir="contrib/uima/src/main/resources" />
+    </solr-jar>
   </target>
 
   <target name="dist-javadoc" description="Creates the Solr javadoc distribution files"
@@ -635,6 +642,8 @@
               basedir="${build.javadoc}/contrib-solr-cell" />
     <solr-jar destfile="${dist}/apache-solr-analysis-extras-docs-${version}.jar"
               basedir="${build.javadoc}/contrib-solr-analysis-extras" />
+    <solr-jar destfile="${dist}/apache-solr-uima-docs-${version}.jar"
+              basedir="${build.javadoc}/contrib-solr-uima" />
   </target>
 
   <!-- Creates the solr jar. -->
@@ -714,7 +723,7 @@
   </target>
   
   <!-- make a distribution -->
-  <target name="package" depends="generate-maven-artifacts"/>
+  <target name="package" depends="create-package"/>
 
   <target name="create-package"
           description="Packages the Solr Distribution files and Documentation."
@@ -731,7 +740,7 @@
       <tarfileset dir="."
         prefix="${fullnamever}"
         includes="LICENSE.txt NOTICE.txt *.txt *.xml lucene-libs/** lib/** src/** example/** client/** contrib/"
-        excludes="lib/README.committers.txt **/data/ **/logs/* **/classes/ **/*.sh **/bin/ src/scripts/ src/site/build/ **/target/ client/ruby/flare/ client/python contrib/**/build/ **/*.iml **/*.ipr **/*.iws contrib/clustering/example/lib/** contrib/clustering/lib/downloads/** contrib/analysis-extras/lib/**" />
+        excludes="lib/README.committers.txt **/data/ **/logs/* **/classes/ **/*.sh **/bin/ src/scripts/ src/site/build/ **/target/ client/ruby/flare/ client/python contrib/**/build/ **/*.iml **/*.ipr **/*.iws contrib/clustering/example/lib/** contrib/clustering/lib/downloads/** contrib/analysis-extras/lib/** contrib/uima/lib/**" />
       <tarfileset dir="."
         prefix="${fullnamever}"
         includes="src/test-files/solr/lib/classes/empty-file-main-lib.txt" />
@@ -903,6 +912,14 @@
         </artifact-attachments>
       </m2-deploy>
 
+      <m2-deploy pom.xml="contrib/extraction/solr-uima-pom.xml.template"
+                 jar.file="${dist}/apache-solr-uima-${version}.jar">
+        <artifact-attachments>
+          <attach file="${dist}/apache-solr-uima-src-${version}.jar" classifier="sources"/>
+          <attach file="${dist}/apache-solr-uima-docs-${version}.jar" classifier="javadoc"/>
+        </artifact-attachments>
+      </m2-deploy>
+
       <m2-deploy pom.xml="src/pom.xml"
                  jar.file="${dist}/apache-solr-core-${version}.jar">
         <artifact-attachments>
@@ -924,11 +941,6 @@
     </sequential>
   </target>
 
-  <target name="nightly"
-          depends="set-fsdir, test, create-package">
-     <!-- no description, don't advertise -->
-  </target>
-  
   <target name="set-fsdir">
      <property name="use.fsdir" value="true"/>
   </target>
@@ -957,6 +969,8 @@
       <fileset dir="contrib/extraction/src/test/java"/>
       <fileset dir="contrib/analysis-extras/src/test"/>
       <fileset dir="contrib/analysis-extras/src/test"/>
+      <fileset dir="contrib/uima/src/main/java"/>
+      <fileset dir="contrib/uima/src/test/java"/>
     </rat:report>
   </target>
 

Modified: lucene/dev/branches/realtime_search/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/common-build.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/common-build.xml (original)
+++ lucene/dev/branches/realtime_search/solr/common-build.xml Mon Jan 24 19:38:40 2011
@@ -138,8 +138,8 @@
   <property name="junit.output.dir" location="${common-solr.dir}/${dest}/test-results"/>
   <property name="junit.reports" location="${common-solr.dir}/${dest}/test-results/reports"/>
   <property name="junit.formatter" value="plain"/>
-  <condition property="junit.details.formatter"
-      value="org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"
+  <condition property="junit.details.formatter" 
+      value="org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"
       else="org.apache.lucene.util.LuceneJUnitResultFormatter">
     <isset property="tests.sequential"/>
   </condition>

Modified: lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/CHANGES.txt?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/CHANGES.txt (original)
+++ lucene/dev/branches/realtime_search/solr/contrib/dataimporthandler/CHANGES.txt Mon Jan 24 19:38:40 2011
@@ -78,6 +78,8 @@ Bug Fixes
 * SOLR-2252: When a child entity in nested entities is rootEntity="true", delta-import doesn't work.
   (koji)
 
+* SOLR-2330: solrconfig.xml files in example-DIH are broken. (Matt Parker, koji)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/db/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/db/conf/solrconfig.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/db/conf/solrconfig.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/db/conf/solrconfig.xml Mon Jan 24 19:38:40 2011
@@ -17,18 +17,17 @@
 -->
 
 <config>
+  
+  <!--
+    Controls what version of Lucene various components of Solr adhere to. Generally, you want
+    to use the latest version to get all bug fixes and improvements. It is highly recommended 
+    that you fully re-index after changing this setting as it can affect both how text is indexed
+    and queried.
+  -->
+  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
 
   <jmx />
 
-  <!-- Set this to 'false' if you want solr to continue working after it has 
-       encountered an severe configuration error.  In a production environment, 
-       you may want solr to keep working even if one handler is mis-configured.
-
-       You may also set this to false using by setting the system property:
-         -Dsolr.abortOnConfigurationError=false
-     -->
-  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
-
   <indexDefaults>
    <!-- Values here affect all index writers and act as a default unless overridden. -->
     <useCompoundFile>false</useCompoundFile>
@@ -350,112 +349,6 @@
      </lst>
   </requestHandler>
 
-
-  <!-- DisMaxRequestHandler allows easy searching across multiple fields
-       for simple user-entered phrases. 
-       see http://wiki.apache.org/solr/DisMaxRequestHandler
-   -->
-  <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
-    <lst name="defaults">
-     <str name="echoParams">explicit</str>
-     <float name="tie">0.01</float>
-     <str name="qf">
-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-     </str>
-     <str name="pf">
-        text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
-     </str>
-     <str name="bf">
-        ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
-     </str>
-     <str name="fl">
-        id,name,price,score
-     </str>
-     <str name="mm">
-        2&lt;-1 5&lt;-2 6&lt;90%
-     </str>
-     <int name="ps">100</int>
-     <str name="q.alt">*:*</str>
-     <!-- example highlighter config, enable per-query with hl=true -->     
-     <str name="hl.fl">text features name</str>
-     <!-- for this field, we want no fragmenting, just highlighting -->
-     <str name="f.name.hl.fragsize">0</str>
-     <!-- instructs Solr to return the field itself if no query terms are
-          found -->
-     <str name="f.name.hl.alternateField">name</str>
-     <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
-    </lst>
-  </requestHandler>
-
-  <!-- Note how you can register the same handler multiple times with
-       different names (and different init parameters)
-    -->
-  <requestHandler name="partitioned" class="solr.DisMaxRequestHandler" >
-    <lst name="defaults">
-     <str name="echoParams">explicit</str>
-     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
-     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
-     <!-- This is an example of using Date Math to specify a constantly
-          moving date range in a config...
-       -->
-     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
-    </lst>
-    <!-- In addition to defaults, "appends" params can be specified
-         to identify values which should be appended to the list of
-         multi-val params from the query (or the existing "defaults").
-
-         In this example, the param "fq=instock:true" will be appended to
-         any query time fq params the user may specify, as a mechanism for
-         partitioning the index, independent of any user selected filtering
-         that may also be desired (perhaps as a result of faceted searching).
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "appends" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <lst name="appends">
-      <str name="fq">inStock:true</str>
-    </lst>
-    <!-- "invariants" are a way of letting the Solr maintainer lock down
-         the options available to Solr clients.  Any params values
-         specified here are used regardless of what values may be specified
-         in either the query, the "defaults", or the "appends" params.
-
-         In this example, the facet.field and facet.query params are fixed,
-         limiting the facets clients can use.  Faceting is not turned on by
-         default - but if the client does specify facet=true in the request,
-         these are the only facets they will be able to see counts for;
-         regardless of what other facet.field or facet.query params they
-         may specify.
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "invariants" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <lst name="invariants">
-      <str name="facet.field">cat</str>
-      <str name="facet.field">manu_exact</str>
-      <str name="facet.query">price:[* TO 500]</str>
-      <str name="facet.query">price:[500 TO *]</str>
-    </lst>
-  </requestHandler>
-  
-  <requestHandler name="instock" class="solr.DisMaxRequestHandler" >
-    <!-- for legacy reasons, DisMaxRequestHandler will assume all init
-         params are "defaults" if you don't explicitly specify any defaults.
-      -->
-     <str name="fq">
-        inStock:true
-     </str>
-     <str name="qf">
-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-     </str>
-     <str name="mm">
-        2&lt;-1 5&lt;-2 6&lt;90%
-     </str>
-  </requestHandler>
-
-
   <!-- SpellCheckerRequestHandler takes in a word (or several words) as the
        value of the "q" parameter and returns a list of alternative spelling
        suggestions.  If invoked with a ...&cmd=rebuild, it will rebuild the
@@ -575,16 +468,6 @@
     -->
   </requestHandler>
 
-  <!--
-   Analysis request handler.  Since Solr 1.3.  Use to returnhow a document is analyzed.  Useful
-   for debugging and as a token server for other types of applications
-   -->
-  <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" >
-    <!--
-    <str name="update.processor.class">org.apache.solr.handler.UpdateRequestProcessor</str>
-    -->
-  </requestHandler>
-
   <!-- CSV update handler, loaded on demand -->
   <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
 

Modified: lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/mail/conf/solrconfig.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/mail/conf/solrconfig.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/mail/conf/solrconfig.xml Mon Jan 24 19:38:40 2011
@@ -17,14 +17,14 @@
 -->
 
 <config>
-  <!-- Set this to 'false' if you want solr to continue working after it has
-       encountered an severe configuration error.  In a production environment,
-       you may want solr to keep working even if one handler is mis-configured.
-
-       You may also set this to false using by setting the system property:
-         -Dsolr.abortOnConfigurationError=false
-     -->
-  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
+  
+  <!--
+    Controls what version of Lucene various components of Solr adhere to. Generally, you want
+    to use the latest version to get all bug fixes and improvements. It is highly recommended 
+    that you fully re-index after changing this setting as it can affect both how text is indexed
+    and queried.
+  -->
+  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
 
   <lib dir="../../../../contrib/dataimporthandler/lib/" regex=".*jar$" />
   <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras-\d.*\.jar" />
@@ -655,12 +655,6 @@
 
   <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
 
-  <!--
-   Analysis request handler.  Since Solr 1.3.  Use to returnhow a document is analyzed.  Useful
-   for debugging and as a token server for other types of applications
-   -->
-  <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
-
 
   <!-- CSV update handler, loaded on demand -->
   <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
@@ -721,7 +715,7 @@
       <!-- allow 50% slop on fragment sizes -->
       <float name="hl.regex.slop">0.5</float>
       <!-- a basic sentence pattern -->
-      <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
+      <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
     </lst>
    </fragmenter>
 

Modified: lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/rss-data-config.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/rss-data-config.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/rss-data-config.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/rss-data-config.xml Mon Jan 24 19:38:40 2011
@@ -5,17 +5,22 @@
                 pk="link"
                 url="http://rss.slashdot.org/Slashdot/slashdot"
                 processor="XPathEntityProcessor"
-                forEach="/rss/channel/item"
+                forEach="/RDF/channel | /RDF/item"
                 transformer="DateFormatTransformer">
+				
+            <field column="source" xpath="/RDF/channel/title" commonField="true" />
+            <field column="source-link" xpath="/RDF/channel/link" commonField="true" />
+            <field column="subject" xpath="/RDF/channel/subject" commonField="true" />
 			
-            <field column="title" xpath="/rss/channel/item/title" />
-            <field column="link" xpath="/rss/channel/item/link" />
-            <field column="description" xpath="/rss/channel/item/description" />
-            <field column="creator" xpath="/rss/channel/item/creator" />
-            <field column="item-subject" xpath="/rss/channel/item/subject" />
-            <field column="date" xpath="/rss/channel/item/date" dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss" />
-            <field column="slash-department" xpath="/rss/channel/item/department" />
-            <field column="slash-section" xpath="/rss/channel/item/section" />
+            <field column="title" xpath="/RDF/item/title" />
+            <field column="link" xpath="/RDF/item/link" />
+            <field column="description" xpath="/RDF/item/description" />
+            <field column="creator" xpath="/RDF/item/creator" />
+            <field column="item-subject" xpath="/RDF/item/subject" />
+            <field column="date" xpath="/RDF/item/date" dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss" />
+            <field column="slash-department" xpath="/RDF/item/department" />
+            <field column="slash-section" xpath="/RDF/item/section" />
+            <field column="slash-comments" xpath="/RDF/item/comments" />
         </entity>
     </document>
 </dataConfig>

Modified: lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/schema.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/schema.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/schema.xml Mon Jan 24 19:38:40 2011
@@ -294,10 +294,11 @@
 	<field name="link" type="string" indexed="true" stored="true" />
 	<field name="description" type="html" indexed="true" stored="true" />
 	<field name="creator" type="string" indexed="false" stored="true" />
-	<field name="item-subject" type="string" indexed="true" stored="true" />
-	<field name="date" type="date" indexed="true" stored="true" />
-	<field name="slash-department" type="string" indexed="true" stored="true" />
-	<field name="slash-section" type="string" indexed="true" stored="true" />
+	<field name="item-subject" type="string" indexed="true" stored="false" />
+	<field name="date" type="date" indexed="true" stored="false" />
+	<field name="slash-department" type="string" indexed="true" stored="false" />
+	<field name="slash-section" type="string" indexed="true" stored="false" />
+	<field name="slash-comments" type="sint" indexed="true" stored="true" />
 	
 	<field name="all_text" type="text" indexed="true" stored="false" multiValued="true" />
 	<copyField source="source" dest="all_text" />

Modified: lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/solrconfig.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/solrconfig.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/rss/conf/solrconfig.xml Mon Jan 24 19:38:40 2011
@@ -17,18 +17,17 @@
 -->
 
 <config>
+  
+  <!--
+    Controls what version of Lucene various components of Solr adhere to. Generally, you want
+    to use the latest version to get all bug fixes and improvements. It is highly recommended 
+    that you fully re-index after changing this setting as it can affect both how text is indexed
+    and queried.
+  -->
+  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
 
   <jmx />
 
-  <!-- Set this to 'false' if you want solr to continue working after it has 
-       encountered an severe configuration error.  In a production environment, 
-       you may want solr to keep working even if one handler is mis-configured.
-
-       You may also set this to false using by setting the system property:
-         -Dsolr.abortOnConfigurationError=false
-     -->
-  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
-
   <indexDefaults>
    <!-- Values here affect all index writers and act as a default unless overridden. -->
     <useCompoundFile>false</useCompoundFile>
@@ -350,112 +349,6 @@
      </lst>
   </requestHandler>
 
-
-  <!-- DisMaxRequestHandler allows easy searching across multiple fields
-       for simple user-entered phrases. 
-       see http://wiki.apache.org/solr/DisMaxRequestHandler
-   -->
-  <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
-    <lst name="defaults">
-     <str name="echoParams">explicit</str>
-     <float name="tie">0.01</float>
-     <str name="qf">
-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-     </str>
-     <str name="pf">
-        text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
-     </str>
-     <str name="bf">
-        ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
-     </str>
-     <str name="fl">
-        id,name,price,score
-     </str>
-     <str name="mm">
-        2&lt;-1 5&lt;-2 6&lt;90%
-     </str>
-     <int name="ps">100</int>
-     <str name="q.alt">*:*</str>
-     <!-- example highlighter config, enable per-query with hl=true -->     
-     <str name="hl.fl">text features name</str>
-     <!-- for this field, we want no fragmenting, just highlighting -->
-     <str name="f.name.hl.fragsize">0</str>
-     <!-- instructs Solr to return the field itself if no query terms are
-          found -->
-     <str name="f.name.hl.alternateField">name</str>
-     <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
-    </lst>
-  </requestHandler>
-
-  <!-- Note how you can register the same handler multiple times with
-       different names (and different init parameters)
-    -->
-  <requestHandler name="partitioned" class="solr.DisMaxRequestHandler" >
-    <lst name="defaults">
-     <str name="echoParams">explicit</str>
-     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
-     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
-     <!-- This is an example of using Date Math to specify a constantly
-          moving date range in a config...
-       -->
-     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
-    </lst>
-    <!-- In addition to defaults, "appends" params can be specified
-         to identify values which should be appended to the list of
-         multi-val params from the query (or the existing "defaults").
-
-         In this example, the param "fq=instock:true" will be appended to
-         any query time fq params the user may specify, as a mechanism for
-         partitioning the index, independent of any user selected filtering
-         that may also be desired (perhaps as a result of faceted searching).
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "appends" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <lst name="appends">
-      <str name="fq">inStock:true</str>
-    </lst>
-    <!-- "invariants" are a way of letting the Solr maintainer lock down
-         the options available to Solr clients.  Any params values
-         specified here are used regardless of what values may be specified
-         in either the query, the "defaults", or the "appends" params.
-
-         In this example, the facet.field and facet.query params are fixed,
-         limiting the facets clients can use.  Faceting is not turned on by
-         default - but if the client does specify facet=true in the request,
-         these are the only facets they will be able to see counts for;
-         regardless of what other facet.field or facet.query params they
-         may specify.
-
-         NOTE: there is *absolutely* nothing a client can do to prevent these
-         "invariants" values from being used, so don't use this mechanism
-         unless you are sure you always want it.
-      -->
-    <lst name="invariants">
-      <str name="facet.field">cat</str>
-      <str name="facet.field">manu_exact</str>
-      <str name="facet.query">price:[* TO 500]</str>
-      <str name="facet.query">price:[500 TO *]</str>
-    </lst>
-  </requestHandler>
-  
-  <requestHandler name="instock" class="solr.DisMaxRequestHandler" >
-    <!-- for legacy reasons, DisMaxRequestHandler will assume all init
-         params are "defaults" if you don't explicitly specify any defaults.
-      -->
-     <str name="fq">
-        inStock:true
-     </str>
-     <str name="qf">
-        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-     </str>
-     <str name="mm">
-        2&lt;-1 5&lt;-2 6&lt;90%
-     </str>
-  </requestHandler>
-
-
   <!-- SpellCheckerRequestHandler takes in a word (or several words) as the
        value of the "q" parameter and returns a list of alternative spelling
        suggestions.  If invoked with a ...&cmd=rebuild, it will rebuild the
@@ -489,7 +382,7 @@
      </lst>
    </requestHandler>
 
-<requestHandler name="/dataimport"
+   <requestHandler name="/dataimport"
    	class="org.apache.solr.handler.dataimport.DataImportHandler">
    	<lst name="defaults">
    		<str name="config">rss-data-config.xml</str>
@@ -574,16 +467,6 @@
     -->
   </requestHandler>
 
-  <!--
-   Analysis request handler.  Since Solr 1.3.  Use to returnhow a document is analyzed.  Useful
-   for debugging and as a token server for other types of applications
-   -->
-  <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" >
-    <!--
-    <str name="update.processor.class">org.apache.solr.handler.UpdateRequestProcessor</str>
-    -->
-  </requestHandler>
-
   <!-- CSV update handler, loaded on demand -->
   <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
 
@@ -643,7 +526,7 @@
       <!-- allow 50% slop on fragment sizes -->
       <float name="hl.regex.slop">0.5</float> 
       <!-- a basic sentence pattern -->
-      <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
+      <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
     </lst>
    </fragmenter>
    

Modified: lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/tika/conf/solrconfig.xml?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/tika/conf/solrconfig.xml (original)
+++ lucene/dev/branches/realtime_search/solr/example/example-DIH/solr/tika/conf/solrconfig.xml Mon Jan 24 19:38:40 2011
@@ -17,14 +17,14 @@
 -->
 
 <config>
-  <!-- Set this to 'false' if you want solr to continue working after it has 
-       encountered an severe configuration error.  In a production environment, 
-       you may want solr to keep working even if one handler is mis-configured.
-
-       You may also set this to false using by setting the system property:
-         -Dsolr.abortOnConfigurationError=false
-     -->
-  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
+  
+  <!--
+    Controls what version of Lucene various components of Solr adhere to. Generally, you want
+    to use the latest version to get all bug fixes and improvements. It is highly recommended 
+    that you fully re-index after changing this setting as it can affect both how text is indexed
+    and queried.
+  -->
+  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
 
   <lib dir="../../../../contrib/extraction/lib" />
   <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras-\d.*\.jar" />

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java Mon Jan 24 19:38:40 2011
@@ -879,7 +879,7 @@ public class CoreContainer 
   
   /** Write the cores configuration through a writer.*/
   void persist(Writer w) throws IOException {
-    w.write("<?xml version='1.0' encoding='UTF-8'?>");
+    w.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
     w.write("<solr");
     if (this.libDir != null) {
       writeAttribute(w,"sharedLib",libDir);
@@ -888,9 +888,9 @@ public class CoreContainer 
     w.write(">\n");
 
     if (containerProperties != null && !containerProperties.isEmpty())  {
-      writeProperties(w, containerProperties);
+      writeProperties(w, containerProperties, "  ");
     }
-    w.write("<cores");
+    w.write("  <cores");
     writeAttribute(w, "adminPath",adminPath);
     if(adminHandler != null) writeAttribute(w, "adminHandler",adminHandler);
     if(shareSchema) writeAttribute(w, "shareSchema","true");
@@ -903,7 +903,7 @@ public class CoreContainer 
       }
     }
 
-    w.write("</cores>\n");
+    w.write("  </cores>\n");
     w.write("</solr>\n");
   }
 
@@ -918,8 +918,8 @@ public class CoreContainer 
   
   /** Writes the cores configuration node for a given core. */
   void persist(Writer w, CoreDescriptor dcore) throws IOException {
-    w.write("  <core");
-    writeAttribute(w,"name",dcore.name);
+    w.write("    <core");
+    writeAttribute(w,"name",dcore.name.equals("") ? defaultCoreName : dcore.name);
     writeAttribute(w,"instanceDir",dcore.getInstanceDir());
     //write config (if not default)
     String opt = dcore.getConfigName();
@@ -953,14 +953,14 @@ public class CoreContainer 
       w.write("/>\n"); // core
     else  {
       w.write(">\n");
-      writeProperties(w, dcore.getCoreProperties());
-      w.write("</core>");
+      writeProperties(w, dcore.getCoreProperties(), "      ");
+      w.write("    </core>\n");
     }
   }
 
-  private void writeProperties(Writer w, Properties props) throws IOException {
+  private void writeProperties(Writer w, Properties props, String indent) throws IOException {
     for (Map.Entry<Object, Object> entry : props.entrySet()) {
-      w.write("<property");
+      w.write(indent + "<property");
       writeAttribute(w,"name",entry.getKey());
       writeAttribute(w,"value",entry.getValue());
       w.write("/>\n");

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/IndexSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/IndexSchema.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/IndexSchema.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/IndexSchema.java Mon Jan 24 19:38:40 2011
@@ -20,7 +20,8 @@ package org.apache.solr.schema;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.document.Fieldable;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.queryParser.QueryParser;
 import org.apache.lucene.util.Version;
 import org.apache.solr.common.ResourceLoader;
@@ -192,7 +193,7 @@ public final class IndexSchema {
   /**
    * Returns the Similarity used for this index
    */
-  public Similarity getSimilarity() { return similarityFactory.getSimilarity(); }
+  public SimilarityProvider getSimilarityProvider() { return similarityFactory.getSimilarityProvider(); }
 
   /**
    * Returns the SimilarityFactory used for this index
@@ -496,8 +497,8 @@ public final class IndexSchema {
     Node node = (Node) xpath.evaluate("/schema/similarity", document, XPathConstants.NODE);
     if (node==null) {
       similarityFactory = new SimilarityFactory() {
-        public Similarity getSimilarity() {
-          return Similarity.getDefault();
+        public SimilarityProvider getSimilarityProvider() {
+          return IndexSearcher.getDefaultSimilarityProvider();
         }
       };
       log.debug("using default similarity");
@@ -509,10 +510,10 @@ public final class IndexSchema {
         similarityFactory = (SimilarityFactory)obj;
         similarityFactory.init(params);
       } else {
-        // just like always, assume it's a Similarlity and get a ClassCastException - reasonable error handling
+        // just like always, assume it's a SimilarityProvider and get a ClassCastException - reasonable error handling
         similarityFactory = new SimilarityFactory() {
-          public Similarity getSimilarity() {
-            return (Similarity) obj;
+          public SimilarityProvider getSimilarityProvider() {
+            return (SimilarityProvider) obj;
           }
         };
       }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/SimilarityFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/SimilarityFactory.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/SimilarityFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/schema/SimilarityFactory.java Mon Jan 24 19:38:40 2011
@@ -16,7 +16,7 @@ package org.apache.solr.schema;
  * limitations under the License.
  */
 
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.solr.common.params.SolrParams;
 
 public abstract class SimilarityFactory {
@@ -25,5 +25,5 @@ public abstract class SimilarityFactory 
   public void init(SolrParams params) { this.params = params; }
   public SolrParams getParams() { return params; }
 
-  public abstract Similarity getSimilarity();
+  public abstract SimilarityProvider getSimilarityProvider();
 }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrConstantScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrConstantScoreQuery.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrConstantScoreQuery.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrConstantScoreQuery.java Mon Jan 24 19:38:40 2011
@@ -55,13 +55,11 @@ public class SolrConstantScoreQuery exte
   }
 
   protected class ConstantWeight extends Weight {
-    private Similarity similarity;
     private float queryNorm;
     private float queryWeight;
     private Map context;
 
     public ConstantWeight(IndexSearcher searcher) throws IOException {
-      this.similarity = searcher.getSimilarity();
       this.context = ValueSource.newContext(searcher);
       if (filter instanceof SolrFilter)
         ((SolrFilter)filter).createWeight(context, searcher);

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java Mon Jan 24 19:38:40 2011
@@ -132,7 +132,7 @@ public class SolrIndexSearcher extends I
     }
 
     this.closeReader = closeReader;
-    setSimilarity(schema.getSimilarity());
+    setSimilarityProvider(schema.getSimilarityProvider());
 
     SolrConfig solrConfig = core.getSolrConfig();
     queryResultWindowSize = solrConfig.queryResultWindowSize;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/IDFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/IDFValueSource.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/IDFValueSource.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/IDFValueSource.java Mon Jan 24 19:38:40 2011
@@ -41,7 +41,7 @@ public class IDFValueSource extends DocF
   @Override
   public DocValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
     IndexSearcher searcher = (IndexSearcher)context.get("searcher");
-    Similarity sim = searcher.getSimilarity();
+    Similarity sim = searcher.getSimilarityProvider().get(field);
     // todo: we need docFreq that takes a BytesRef
     String strVal = ByteUtils.UTF8toUTF16(indexedBytes);
     int docfreq = searcher.docFreq(new Term(indexedField, strVal));

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/NormValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/NormValueSource.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/NormValueSource.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/NormValueSource.java Mon Jan 24 19:38:40 2011
@@ -46,7 +46,7 @@ public class NormValueSource extends Val
   @Override
   public DocValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
     IndexSearcher searcher = (IndexSearcher)context.get("searcher");
-    final Similarity similarity = searcher.getSimilarity();
+    final Similarity similarity = searcher.getSimilarityProvider().get(field);
     final byte[] norms = readerContext.reader.norms(field);
     if (norms == null) {
       return new ConstDoubleDocValues(0.0, this);

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/TFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/TFValueSource.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/TFValueSource.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/search/function/TFValueSource.java Mon Jan 24 19:38:40 2011
@@ -25,7 +25,7 @@ public class TFValueSource extends TermF
   public DocValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
     Fields fields = readerContext.reader.fields();
     final Terms terms = fields.terms(field);
-    final Similarity similarity = ((IndexSearcher)context.get("searcher")).getSimilarity();
+    final Similarity similarity = ((IndexSearcher)context.get("searcher")).getSimilarityProvider().get(field);
 
     return new FloatDocValues(this) {
       DocsEnum docs ;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/update/SolrIndexConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/update/SolrIndexConfig.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/update/SolrIndexConfig.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/update/SolrIndexConfig.java Mon Jan 24 19:38:40 2011
@@ -153,7 +153,7 @@ public class SolrIndexConfig {
     if (writeLockTimeout != -1)
       iwc.setWriteLockTimeout(writeLockTimeout);
 
-    iwc.setSimilarity(schema.getSimilarity());
+    iwc.setSimilarityProvider(schema.getSimilarityProvider());
     iwc.setMergePolicy(buildMergePolicy(schema));
     iwc.setMergeScheduler(buildMergeScheduler(schema));
 

Modified: lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/CustomSimilarityFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/CustomSimilarityFactory.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/CustomSimilarityFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/CustomSimilarityFactory.java Mon Jan 24 19:38:40 2011
@@ -16,10 +16,10 @@
  */
 package org.apache.solr.schema;
 
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 
 public class CustomSimilarityFactory extends SimilarityFactory {
-  public Similarity getSimilarity() {
+  public SimilarityProvider getSimilarityProvider() {
     return new MockConfigurableSimilarity(params.get("echo"));
   }
 }

Modified: lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java?rev=1062944&r1=1062943&r2=1062944&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java Mon Jan 24 19:38:40 2011
@@ -27,7 +27,7 @@ import org.apache.solr.common.params.Map
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequest;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -83,7 +83,7 @@ public class IndexSchemaTest extends Sol
   @Test
   public void testSimilarityFactory() {
     SolrCore core = h.getCore();
-    Similarity similarity = core.getSchema().getSimilarity();
+    SimilarityProvider similarity = core.getSchema().getSimilarityProvider();
     assertTrue("wrong class", similarity instanceof MockConfigurableSimilarity);
     assertEquals("is there an echo?", ((MockConfigurableSimilarity)similarity).getPassthrough());
   }



Mime
View raw message