Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

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 Robert Milleradd56f5e668d
diff --git a/contrib/benchmark/CHANGES.txt b/contrib/benchmark/CHANGES.txt
index f7ab7510b07..9650fb4d68c 100644
--- a/contrib/benchmark/CHANGES.txt
+++ b/contrib/benchmark/CHANGES.txt
@@ -4,6 +4,11 @@ The Benchmark contrib package contains code for benchmarking Lucene in a variety
$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
diff --git a/contrib/benchmark/conf/sort-standard.alg b/contrib/benchmark/conf/sort-standard.alg
index 98e72ad3382..c7413fc594b 100644
--- a/contrib/benchmark/conf/sort-standard.alg
+++ b/contrib/benchmark/conf/sort-standard.alg
@@ -57,7 +57,7 @@ log.queries=true
{ "TestSortSpeed"
OpenReader
{ "LoadFieldCacheAndSearch" SearchWithSort(sort_field:int) > : 1
- { "SearchWithSort" SearchWithSort(sort_field) > : 5000
+ { "SearchWithSort" SearchWithSort(sort_field:int) > : 5000
CloseReader
}
diff --git a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
index 870d538f114..2433f86edd4 100644
--- a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
+++ b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
@@ -43,7 +43,7 @@ public class SearchWithSortTask extends ReadTask {
* 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 @@ public class SearchWithSortTask extends ReadTask {
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);