lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Filtering question/advice
Date Thu, 17 Sep 2009 22:59:19 GMT

FWWI: a test case with multiple asserts is more useful if you clarify 
where it failes ... ie: show us the failure message, or put a comment on 
athe line of the assert that fails.

i didn't run your testcase, but skimming it a few things jumpt out at me 
that might explain whatever problem you are seeing...

:        Field uw1 = new Field("uw-refernce", "hello", Field.Store.NO,
: Field.Index.ANALYZED);
:        Field uw2 = new Field("uw-refernce", "bye", Field.Store.NO,
: Field.Index.ANALYZED);
		...
:        layerDocumentA = new Document();
:        layerDocumentA.add(uw1);
:        layerDocumentA.add(uw1);

...did you really mean to add uw1 twice? or did you mean to add uw2 as 
well (it's never used)...

:     public void testUWBCanSeeResultIfSearchTermMatchesOnSomethingElse()
: throws Exception {
		...
:         UnderwriterReferenceFilter filter = new
: UnderwriterReferenceFilter();

...you never set any properties on this Filter before you use it. reading 
it's implementation, that should cause an IllegalArgumentException.


-Hoss


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


Mime
View raw message