lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r1100495 - in /lucene/dev/trunk: ./ lucene/ lucene/backwards/ lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java solr/
Date Sat, 07 May 2011 12:39:12 GMT
I agree. We should maybe factor out the createIndex method at all to a separate class that
also automatically ZIPs the index after creating it. createIndex method is not really a test,
it’s a utility to produce the indexes.

I just committed this to be able to process with merging here.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Robert Muir [mailto:rcmuir@gmail.com]
> Sent: Saturday, May 07, 2011 2:35 PM
> To: dev@lucene.apache.org
> Subject: Re: svn commit: r1100495 - in /lucene/dev/trunk: ./ lucene/
> lucene/backwards/
> lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
> solr/
> 
> Hi Uwe,
> 
> I think we should open an issue to clean some of this up (I know i am at fault
> for some of it)
> 
> Recently, i worked with this test some and also found these problems:
> * when creating the backwards test index, we should not lowercase. the test
> expects to be able to do term-queries on upper-case terms.
> * when creating the backwards test index, I don't think we should use any
> random parameters... it should be 'fixed'. So for trunk this means dont use
> mockanalyzer but mocktokenizer only.
> 
> On Sat, May 7, 2011 at 5:52 AM,  <uschindler@apache.org> wrote:
> > Author: uschindler
> > Date: Sat May  7 09:52:47 2011
> > New Revision: 1100495
> >
> > URL: http://svn.apache.org/viewvc?rev=1100495&view=rev
> > Log:
> > It was no longer possible to create the backwards test indexes, because
> they were automatically deleted directly after test and also their name was
> unreadable.
> > The method to create backwards indexes is never called for normal test
> > runs, only when you explicitly enable the commented-out code
> >
> > Modified:
> >    lucene/dev/trunk/   (props changed)
> >    lucene/dev/trunk/lucene/   (props changed)
> >    lucene/dev/trunk/lucene/backwards/   (props changed)
> >
> >
> lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwards
> > Compatibility.java
> >    lucene/dev/trunk/solr/   (props changed)
> >
> > Modified:
> >
> lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwards
> > Compatibility.java
> > URL:
> > http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apac
> >
> he/lucene/index/TestBackwardsCompatibility.java?rev=1100495&r1=110049
> 4
> > &r2=1100495&view=diff
> >
> ==========================================================
> ============
> > ========
> > ---
> >
> lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwards
> > Compatibility.java (original)
> > +++
> lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackw
> > +++ ardsCompatibility.java Sat May  7 09:52:47 2011
> > @@ -446,8 +446,8 @@ public class TestBackwardsCompatibility
> >   }
> >
> >   public File createIndex(Random random, String dirName, boolean
> > doCFS) throws IOException {
> > -
> > -    File indexDir = _TestUtil.getTempDir(dirName);
> > +    // we use a real directory name that is not cleaned up, because this
> method is only used to create backwards indexes:
> > +    File indexDir = new File(LuceneTestCase.TEMP_DIR, dirName);
> >     _TestUtil.rmDir(indexDir);
> >     Directory dir = newFSDirectory(indexDir);
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org



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


Mime
View raw message