You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/03/28 10:04:27 UTC
svn commit: r1582641 - in /lucene/dev/trunk/lucene:
core/src/test/org/apache/lucene/index/TestNorms.java
queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java
Author: mikemccand
Date: Fri Mar 28 09:04:27 2014
New Revision: 1582641
URL: http://svn.apache.org/r1582641
Log:
don't try to index megaterms, take 2
Modified:
lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
lucene/dev/trunk/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java
Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java?rev=1582641&r1=1582640&r2=1582641&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java Fri Mar 28 09:04:27 2014
@@ -127,8 +127,10 @@ public class TestNorms extends LuceneTes
public void buildIndex(Directory dir) throws IOException {
Random random = random();
+ MockAnalyzer analyzer = new MockAnalyzer(random());
+ analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
IndexWriterConfig config = newIndexWriterConfig(TEST_VERSION_CURRENT,
- new MockAnalyzer(random()));
+ analyzer);
Similarity provider = new MySimProvider();
config.setSimilarity(provider);
RandomIndexWriter writer = new RandomIndexWriter(random, dir, config);
Modified: lucene/dev/trunk/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java?rev=1582641&r1=1582640&r2=1582641&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java (original)
+++ lucene/dev/trunk/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java Fri Mar 28 09:04:27 2014
@@ -60,7 +60,6 @@ public class CommonTermsQueryTest extend
public void testBasics() throws IOException {
Directory dir = newDirectory();
MockAnalyzer analyzer = new MockAnalyzer(random());
- analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
RandomIndexWriter w = new RandomIndexWriter(random(), dir, analyzer);
String[] docs = new String[] {"this is the end of the world right",
"is this it or maybe not",
@@ -191,7 +190,6 @@ public class CommonTermsQueryTest extend
public void testMinShouldMatch() throws IOException {
Directory dir = newDirectory();
MockAnalyzer analyzer = new MockAnalyzer(random());
- analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
RandomIndexWriter w = new RandomIndexWriter(random(), dir, analyzer);
String[] docs = new String[] {"this is the end of the world right",
"is this it or maybe not",
@@ -351,7 +349,6 @@ public class CommonTermsQueryTest extend
public void testExtend() throws IOException {
Directory dir = newDirectory();
MockAnalyzer analyzer = new MockAnalyzer(random());
- analyzer.setMaxTokenLength(TestUtil.nextInt(random(), 1, IndexWriter.MAX_TERM_LENGTH));
RandomIndexWriter w = new RandomIndexWriter(random(), dir, analyzer);
String[] docs = new String[] {"this is the end of the world right",
"is this it or maybe not",