Grokbase Groups Lucene dev July 2011
FAQ
+1 Uwe, I can add the option to MockAnalyzer so it doesnt randomly add
payloads... we really want this for several tests that don't want a
payload (and make their own analyzer around MockTokenizer just for
this), as well as possible future Test2BXXXX tests also :)
On Sat, Jul 9, 2011 at 7:44 AM, wrote:
Author: uschindler
Date: Sat Jul  9 11:44:46 2011
New Revision: 1144658

URL: http://svn.apache.org/viewvc?rev=1144658&view=rev
Log:
Make creation of backwards indexes working again (unfortunately in trunk it still has some randomness in MockAnalyzer, added TODO)

Modified:
lucene/dev/trunk/   (props changed)
lucene/dev/trunk/dev-tools/idea/lucene/contrib/   (props changed)
lucene/dev/trunk/lucene/   (props changed)
lucene/dev/trunk/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestSpanRegexQuery.java   (props changed)
lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/builders/TestNumericRangeFilterBuilder.java   (props changed)
lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
lucene/dev/trunk/solr/   (props changed)
lucene/dev/trunk/solr/CHANGES.txt   (props changed)
lucene/dev/trunk/solr/LICENSE.txt   (props changed)
lucene/dev/trunk/solr/NOTICE.txt   (props changed)
lucene/dev/trunk/solr/README.txt   (props changed)
lucene/dev/trunk/solr/build.xml   (props changed)
lucene/dev/trunk/solr/client/   (props changed)
lucene/dev/trunk/solr/common-build.xml   (props changed)
lucene/dev/trunk/solr/contrib/   (props changed)
lucene/dev/trunk/solr/example/   (props changed)
lucene/dev/trunk/solr/lib/   (props changed)
lucene/dev/trunk/solr/site/   (props changed)
lucene/dev/trunk/solr/src/   (props changed)
lucene/dev/trunk/solr/testlogging.properties   (props changed)

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1144658&r1=1144657&r2=1144658&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Sat Jul  9 11:44:46 2011
@@ -455,9 +455,12 @@ public class TestBackwardsCompatibility
File indexDir = new File(LuceneTestCase.TEMP_DIR, dirName);
_TestUtil.rmDir(indexDir);
Directory dir = newFSDirectory(indexDir);
-
-    IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(10);
-    ((LogMergePolicy) conf.getMergePolicy()).setUseCompoundFile(doCFS);
+    LogByteSizeMergePolicy mp = new LogByteSizeMergePolicy();
+    mp.setUseCompoundFile(doCFS);
+    mp.setNoCFSRatio(1.0);
+    // TODO: remove randomness
+    IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
+      .setMaxBufferedDocs(10).setMergePolicy(mp);
IndexWriter writer = new IndexWriter(dir, conf);

for(int i=0;i<35;i++) {
@@ -471,8 +474,12 @@ public class TestBackwardsCompatibility

if (!optimized) {
// open fresh writer so we get no prx file in the added segment
-      conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(10);
-      ((LogMergePolicy) conf.getMergePolicy()).setUseCompoundFile(doCFS);
+      mp = new LogByteSizeMergePolicy();
+      mp.setUseCompoundFile(doCFS);
+      mp.setNoCFSRatio(1.0);
+      // TODO: remove randomness
+      conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
+        .setMaxBufferedDocs(10).setMergePolicy(mp);
writer = new IndexWriter(dir, conf);
addNoProxDoc(writer);
writer.close();



--
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieslucene
postedJul 9, '11 at 12:08p
activeJul 9, '11 at 12:08p
posts1
users1
websitelucene.apache.org

1 user in discussion

Robert Muir: 1 post

People

Translate

site design / logo © 2021 Grokbase