lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject svn commit: r1136783 [3/3] - in /lucene/dev/branches/solr2452: ./ dev-tools/idea/lucene/contrib/ dev-tools/maven/ lucene/ lucene/contrib/ lucene/contrib/misc/src/test/org/apache/lucene/index/ lucene/contrib/queries/src/java/org/apache/lucene/search/ lu...
Date Fri, 17 Jun 2011 06:10:09 GMT
Modified: lucene/dev/branches/solr2452/solr/contrib/uima/src/test-files/solr-uima/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/contrib/uima/src/test-files/solr-uima/conf/solrconfig.xml?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/contrib/uima/src/test-files/solr-uima/conf/solrconfig.xml
(original)
+++ lucene/dev/branches/solr2452/solr/contrib/uima/src/test-files/solr-uima/conf/solrconfig.xml
Fri Jun 17 06:10:05 2011
@@ -24,9 +24,7 @@
     https://issues.apache.org/jira/browse/SOLR-1167
   -->
 <config xmlns:xi="http://www.w3.org/2001/XInclude">
-
-  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
-
+  <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
   <!--
     lib directives can be used to instruct Solr to load an Jars
     identified and use them to resolve any "plugins" specified in your
@@ -1064,6 +1062,8 @@
         </lst>
         <str name="analysisEngine">/TestExceptionAE.xml</str>
         <bool name="ignoreErrors">true</bool>
+        <!-- This is optional. It is used for logging when text processing fails. Usually,
set uniqueKey field name -->
+        <str name="logField">id</str>
         <lst name="analyzeFields">
           <bool name="merge">false</bool>
           <arr name="fields">

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
Fri Jun 17 06:10:05 2011
@@ -476,8 +476,8 @@ class ElevationComparatorSource extends 
   }
 
   @Override
-  public FieldComparator newComparator(final String fieldname, final int numHits, int sortPos,
boolean reversed) throws IOException {
-    return new FieldComparator() {
+  public FieldComparator<Integer> newComparator(final String fieldname, final int numHits,
int sortPos, boolean reversed) throws IOException {
+    return new FieldComparator<Integer>() {
       
       FieldCache.DocTermsIndex idIndex;
       private final int[] values = new int[numHits];
@@ -517,7 +517,7 @@ class ElevationComparatorSource extends 
       }
 
       @Override
-      public Comparable value(int slot) {
+      public Integer value(int slot) {
         return values[slot];
       }
     };

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
Fri Jun 17 06:10:05 2011
@@ -59,12 +59,17 @@ public class ValueSourceAugmenter extend
 
   @Override
   public void setContext( TransformContext context ) {
-    IndexReader reader = qparser.getReq().getSearcher().getIndexReader();
-    readerContexts = reader.getTopReaderContext().leaves();
-    docValuesArr = new DocValues[readerContexts.length];
-
-    searcher = qparser.getReq().getSearcher();
-    this.fcontext = ValueSource.newContext(searcher);
+    try {
+      IndexReader reader = qparser.getReq().getSearcher().getIndexReader();
+      readerContexts = reader.getTopReaderContext().leaves();
+      docValuesArr = new DocValues[readerContexts.length];
+
+      searcher = qparser.getReq().getSearcher();
+      fcontext = ValueSource.newContext(searcher);
+      this.valueSource.createWeight(fcontext, searcher);
+    } catch (IOException e) {
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+    }
   }
 
 

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/schema/RandomSortField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/schema/RandomSortField.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/schema/RandomSortField.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/schema/RandomSortField.java
Fri Jun 17 06:10:05 2011
@@ -102,8 +102,8 @@ public class RandomSortField extends Fie
 
   private static FieldComparatorSource randomComparatorSource = new FieldComparatorSource()
{
     @Override
-    public FieldComparator newComparator(final String fieldname, final int numHits, int sortPos,
boolean reversed) throws IOException {
-      return new FieldComparator() {
+    public FieldComparator<Integer> newComparator(final String fieldname, final int
numHits, int sortPos, boolean reversed) throws IOException {
+      return new FieldComparator<Integer>() {
         int seed;
         private final int[] values = new int[numHits];
         int bottomVal;
@@ -135,7 +135,7 @@ public class RandomSortField extends Fie
         }
 
         @Override
-        public Comparable value(int slot) {
+        public Integer value(int slot) {
           return values[slot];
         }
       };

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java
Fri Jun 17 06:10:05 2011
@@ -56,7 +56,7 @@ public class MissingStringLastComparator
 
 // Copied from Lucene's TermOrdValComparator and modified since the Lucene version couldn't
 // be extended.
-class TermOrdValComparator_SML extends FieldComparator {
+class TermOrdValComparator_SML extends FieldComparator<BytesRef> {
   private static final int NULL_ORD = Integer.MAX_VALUE;
 
   private final int[] ords;
@@ -98,7 +98,7 @@ class TermOrdValComparator_SML extends F
   }
 
   @Override
-  public Comparable<?> value(int slot) {
+  public BytesRef value(int slot) {
     throw new UnsupportedOperationException();
   }
 
@@ -111,7 +111,7 @@ class TermOrdValComparator_SML extends F
   // ords) per-segment comparator.  NOTE: this is messy;
   // we do this only because hotspot can't reliably inline
   // the underlying array access when looking up doc->ord
-  private static abstract class PerSegmentComparator extends FieldComparator {
+  private static abstract class PerSegmentComparator extends FieldComparator<BytesRef>
{
     protected TermOrdValComparator_SML parent;
     protected final int[] ords;
     protected final BytesRef[] values;
@@ -199,7 +199,7 @@ class TermOrdValComparator_SML extends F
     }
 
     @Override
-    public Comparable<?> value(int slot) {
+    public BytesRef value(int slot) {
       return values==null ? parent.NULL_VAL : values[slot];
     }
   }

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/BoostedQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/BoostedQuery.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/BoostedQuery.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/BoostedQuery.java
Fri Jun 17 06:10:05 2011
@@ -67,7 +67,7 @@ public class BoostedQuery extends Query 
 
     public BoostedWeight(IndexSearcher searcher) throws IOException {
       this.searcher = searcher;
-      this.qWeight = q.weight(searcher);
+      this.qWeight = q.createWeight(searcher);
       this.fcontext = boostVal.newContext(searcher);
       boostVal.createWeight(fcontext,searcher);
     }

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/QueryValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/QueryValueSource.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/QueryValueSource.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/QueryValueSource.java
Fri Jun 17 06:10:05 2011
@@ -68,7 +68,7 @@ public class QueryValueSource extends Va
 
   @Override
   public void createWeight(Map context, IndexSearcher searcher) throws IOException {
-    Weight w = q.weight(searcher);
+    Weight w = searcher.createNormalizedWeight(q);
     context.put(this, w);
   }
 }
@@ -98,7 +98,7 @@ class QueryDocValues extends FloatDocVal
     this.q = vs.q;
     this.fcontext = fcontext;
 
-    Weight w = fcontext==null ? null : (Weight)fcontext.get(q);
+    Weight w = fcontext==null ? null : (Weight)fcontext.get(vs);
     if (w == null) {
       IndexSearcher weightSearcher;
       if(fcontext == null) {
@@ -109,7 +109,8 @@ class QueryDocValues extends FloatDocVal
           weightSearcher = new IndexSearcher(ReaderUtil.getTopLevelContext(readerContext));
         }
       }
-      w = q.weight(weightSearcher);
+      vs.createWeight(fcontext, weightSearcher);
+      w = (Weight)fcontext.get(vs);
     }
     weight = w;
   }

Modified: lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/ValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/ValueSource.java?rev=1136783&r1=1136782&r2=1136783&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/ValueSource.java
(original)
+++ lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/ValueSource.java
Fri Jun 17 06:10:05 2011
@@ -141,7 +141,7 @@ public abstract class ValueSource implem
    * off of the {@link org.apache.solr.search.function.DocValues} for a ValueSource
    * instead of the normal Lucene FieldComparator that works off of a FieldCache.
    */
-  class ValueSourceComparator extends FieldComparator {
+  class ValueSourceComparator extends FieldComparator<Double> {
     private final double[] values;
     private DocValues docVals;
     private double bottom;
@@ -195,7 +195,7 @@ public abstract class ValueSource implem
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Double value(int slot) {
       return values[slot];
     }
   }



Mime
View raw message