luceneutil
luceneutil copied to clipboard
Example test per README not working on trunk
Generated index successfully, and then this - Exception in thread "main" java.lang.IllegalArgumentException: facetDim Date was not indexed
Search:
iter 0
my_modified_version:
log: /Users/michael/workspace/logs/trunk_vs_patch.my_modified_version.0 + stdout
run: java -server -Xms2g -Xmx2g -XX:-TieredCompilation -XX:+HeapDumpOnOutOfMemoryError -Xbatch -classpath /Users/michael/workspace/lucene-solr-mbraun/lucene/build/core/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/core/classes/test:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/sandbox/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/misc/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/facet/classes/java:/home/mike/src/lucene-c-boost/dist/luceneCBoost-SNAPSHOT.jar:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/analysis/common/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/analysis/icu/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/queryparser/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/grouping/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/suggest/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/highlighter/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/codecs/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/build/queries/classes/java:/Users/michael/workspace/lucene-solr-mbraun/lucene/facet/lib/hppc-0.7.3.jar:/Users/michael/workspace/luceneutil/lib/HdrHistogram.jar:/Users/michael/workspace/luceneutil/build perf.SearchPerfTest -dirImpl MMapDirectory -indexPath /Users/michael/workspace/indices/wikimedium10k.lucene-solr-mbraun2.Lucene50.Memory.nd0.01M -analyzer StandardAnalyzer -taskSource /Users/michael/workspace/luceneutil/20346.tasks -searchThreadCount 2 -taskRepeatCount 20 -field body -tasksPerCat 1 -staticSeed -3048916 -seed -4311098 -similarity BM25Similarity -commit multi -hiliteImpl FastVectorHighlighter -log /Users/michael/workspace/logs/trunk_vs_patch.my_modified_version.0 -topN 10 -pk
SearchPerfTest FAILED:
========================================
Statistics Started at Sun Feb 11 18:11:10 EST 2018
Operative System: Mac OS X 10.13.3 x86_64
JVM : Oracle Corporation Java HotSpot(TM) 64-Bit Server VM runtime 25.162-b12 1.8.0_162-b12
Processors: 4
System Memory: 60.940506% used of 8.0 GiB
Used Heap Size: 10.63401 MiB
Max Heap Size: 1963.0 MiB
Young Generation Heap Size: 597.5 MiB
- - - - - - - - - - - - - - - - - - - -
Using dir impl org.apache.lucene.store.MMapDirectory
Analyzer StandardAnalyzer
Similarity BM25Similarity
Search thread count 2
topN 10
JVM is 64bit
Pointer is 4 bytes
Opening searcher on commit=multi
found commit=multi
maxDoc=10000 numDocs=10000 %tg deletes=100.0
473 msec to init searcher/NRT
Searcher: numDocs=10000 maxDoc=10000: IndexSearcher(StandardDirectoryReader(segments_2:1236 _1y(8.0.0):C1152 _3x(8.0.0):C1152 _5w(8.0.0):C1152 _7v(8.0.0):C1152 _9u(8.0.0):C1152 _bt(8.0.0):C1152 _ds(8.0.0):C1152 _fr(8.0.0):C1152 _gw(8.0.0):C666 _gx(8.0.0):C18 _gy(8.0.0):C18 _gz(8.0.0):C18 _h0(8.0.0):C18 _h1(8.0.0):C18 _h2(8.0.0):C18 _h3(8.0.0):C10); executor=null)
- - - - - - - - - - - - - - - - - - - -
Statistics Ended at Sun Feb 11 18:11:14 EST 2018
Elapsed time: 4606 ms
Time in JIT compilation: 2840 ms
Time in Young Generation GC: 0 ms (0 collections)
Time in Old Generation GC: 0 ms (0 collections)
Garbage Generated in Young Generation: 0.0 MiB
Garbage Generated in Survivor Generation: 0.0 MiB
Garbage Generated in Old Generation: 0.0 MiB
Average CPU Load: 98.01696/400
----------------------------------------
Exception in thread "main" java.lang.IllegalArgumentException: facetDim Date was not indexed
at perf.TaskParser.parseOneTask(TaskParser.java:143)
at perf.LocalTaskSource.loadTasks(LocalTaskSource.java:149)
at perf.LocalTaskSource.<init>(LocalTaskSource.java:46)
at perf.SearchPerfTest._main(SearchPerfTest.java:525)
at perf.SearchPerfTest.main(SearchPerfTest.java:128)
Traceback (most recent call last):
File "src/python/localrun.py", line 39, in <module>
comp.benchmark("trunk_vs_patch")
File "/Users/michael/workspace/luceneutil/src/python/competition.py", line 379, in benchmark
verifyScores = self.verifyScores, taskPatterns = (self.onlyTaskPatterns, self.notTaskPatterns), randomSeed = self.randomSeed)
File "/Users/michael/workspace/luceneutil/src/python/searchBench.py", line 176, in run
filter=None, taskPatterns=taskPatterns)
File "/Users/michael/workspace/luceneutil/src/python/benchUtil.py", line 1067, in runSimpleSearchBench
raise RuntimeError('SearchPerfTest failed; see log %s.stdout' % logFile)
RuntimeError: SearchPerfTest failed; see log /Users/michael/workspace/logs/trunk_vs_patch.my_modified_version.0.stdout
Just hit this one myself - for the record, you can get round it by removing the lines containing 'facet' from the tasks file.
Here is a fix https://github.com/yangxi/luceneutilmain/commit/047c8340cbfd8e15d89ca4cc54a5cc1b17fa385e
Author: Xi Yang <[email protected]>
Date: Tue May 29 11:21:09 2018 +1000
Fix problems of 'python src/python/localrun.py -source wikimedium10'
* Change the ID_FILED_POSTINGS_FORMAT_DEFAULT to Lucene50.
* Indexing the faces.
diff --git a/src/python/constants.py b/src/python/constants.py
index 9ddc5c3..22805f8 100644
--- a/src/python/constants.py
+++ b/src/python/constants.py
@@ -91,7 +91,7 @@ if 'ANALYZER' in locals():
#DEFAULTS
POSTINGS_FORMAT_DEFAULT='Lucene50'
-ID_FIELD_POSTINGS_FORMAT_DEFAULT='Memory'
+ID_FIELD_POSTINGS_FORMAT_DEFAULT='Lucene50'
FACET_FIELD_DV_FORMAT_DEFAULT='Lucene70'
ANALYZER_DEFAULT='StandardAnalyzer'
SIMILARITY_DEFAULT='BM25Similarity'
diff --git a/src/python/example.py b/src/python/example.py
index 3a73451..46402d5 100755
--- a/src/python/example.py
+++ b/src/python/example.py
@@ -23,7 +23,12 @@ if __name__ == '__main__':
sourceData = competition.sourceData()
comp = competition.Competition()
- index = comp.newIndex('trunk', sourceData)
+ index = comp.newIndex('trunk', sourceData,
+ facets = (('taxonomy:Date', 'Date'),
+ ('taxonomy:Month', 'Month'),
+ ('taxonomy:DayOfYear', 'DayOfYear'),
+ ('sortedset:Month', 'Month'),
+ ('sortedset:DayOfYear', 'DayOfYear')))
# create a competitor named baseline with sources in the ../trunk folder
comp.competitor('baseline', 'trunk',
index = index)