lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r794109 - in /lucene/java/trunk/contrib/benchmark: CHANGES.txt conf/sort-standard.alg src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
Date Tue, 14 Jul 2009 22:52:58 GMT
Author: markrmiller
Date: Tue Jul 14 22:52:58 2009
New Revision: 794109

URL: http://svn.apache.org/viewvc?rev=794109&view=rev
Log:
LUCENE-1725: Fix the example Sort algorithm - auto is now deprecated and no longer works with
Benchmark. Benchmark will now throw an exception if you specify sort fields without a type.
The example sort algorithm is now typed. 

Modified:
    lucene/java/trunk/contrib/benchmark/CHANGES.txt
    lucene/java/trunk/contrib/benchmark/conf/sort-standard.alg
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java

Modified: lucene/java/trunk/contrib/benchmark/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/CHANGES.txt?rev=794109&r1=794108&r2=794109&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/CHANGES.txt (original)
+++ lucene/java/trunk/contrib/benchmark/CHANGES.txt Tue Jul 14 22:52:58 2009
@@ -4,6 +4,11 @@
 
 $Id:$
 
+7/14/2009
+  LUCENE-1725: Fix the example Sort algorithm - auto is now deprecated and no longer works
+  with Benchmark. Benchmark will now throw an exception if you specify sort fields without
+  a type. The example sort algorithm is now typed.  (Mark Miller)
+
 7/6/2009
   LUCENE-1730: Fix TrecContentSource to use ISO-8859-1 when reading the TREC files, 
   unless a different encoding is specified. Additionally, ContentSource now supports 

Modified: lucene/java/trunk/contrib/benchmark/conf/sort-standard.alg
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/conf/sort-standard.alg?rev=794109&r1=794108&r2=794109&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/conf/sort-standard.alg (original)
+++ lucene/java/trunk/contrib/benchmark/conf/sort-standard.alg Tue Jul 14 22:52:58 2009
@@ -57,7 +57,7 @@
       { "TestSortSpeed"
         OpenReader  
         { "LoadFieldCacheAndSearch" SearchWithSort(sort_field:int) > : 1 
-        { "SearchWithSort" SearchWithSort(sort_field) > : 5000
+        { "SearchWithSort" SearchWithSort(sort_field:int) > : 5000
         CloseReader 
       
       }

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java?rev=794109&r1=794108&r2=794109&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
Tue Jul 14 22:52:58 2009
@@ -43,7 +43,7 @@
    * If nomaxscore is present, then we turn off maxScore tracking
    * in {@link org.apache.lucene.search.TopFieldCollector}.
    * 
-   * name,byline:int,subject:auto
+   * name:string,page:int,subject:string
    * 
    */
   public void setParams(String sortField) {
@@ -70,8 +70,7 @@
           fieldName = field.substring(0, index);
           typeString = field.substring(1+index, field.length());
         } else {
-          typeString = "auto";
-          fieldName = field;
+          throw new RuntimeException("You must specify the sort type ie page:int,subject:string");
         }
         int type = getType(typeString);
         sortField0 = new SortField(fieldName, type);



Mime
View raw message