lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: TestGrouping.Java seems to combine multiple tests into one huge test
Date Fri, 21 Jun 2013 10:19:41 GMT
On Thu, Jun 20, 2013 at 7:09 PM, Tom Burton-West <> wrote:
> Sine my objective is to undersdand BlockGroupingCollector, I thought I
> would extract a test for BlockGroupingCollector, maybe in another file as
> Robert suggested.

I think that makes sense!

> I was looking at testRandom because that is where BlockGroupingCollector is
> tested, but it looks to me like some trickery is involved creating the
> block join type index  near the comment where it says" // Build 2nd index,
> where docs are added in blocks by group, so we can use single pass
> collector "
> In testBasic, I can see the call to indexWriter.addDocuments(), but I don't
> see that happening anywhere in testRandom.

It's in the confusingly named getDocBlocksReader method.  That method
takes the GroupDoc array and uses IW.addDocuments to add each group as
a block of documents.

> Should I just be looking at testBasic for a simple/understandable way to
> create a block-join index for later testing of the BlockGroupingCollector?

Hmm but testBasic seems not to test BlockGroupingCollector.  Maybe the
first step is to write testBasic in your new TestBlockGrouping...

> Also I'm a bit confused by the use of Doc Values.  Is that necessary to use
> the BlockGroupingCollector, or are they in there in order to test some
> feature related to Doc Values and the Collectors?

Not necessary; doc values are mixed into that test because we can do
non-block grouping by doc values.

Mike McCandless

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message