|
Continuing the discussion from Lucene-558, LazyFields.tar.gz extends this patch (Lucene-545) with an additional optimization so that ParallelReader does not read fields from readers all of whose fields are NO_LOAD. No change to the FieldSelector interface was required to achieve this. Also, a useful new FieldSelector is provided, MapFieldSelector, and TestParallelReader is extended to test these things.
Bug fixes to ParallelReader from Lucene-561 are also included. Keeping everything involved factored and managing this with my other local changes has led to a slightly more complex file structure. The steps to use LazyFields.tar.gz are: Unpack it The target of all patch applications and copies is the Lucene trunk. When I applied fieldSelectorPatch.txt against the latest Lucene trunk, a couple hunks failed to apply, but they were not relevant. The version included here is the original version unchanged. Chuck,
I think the patch is missing your ListFieldSelector.java file. Can you please attach it? Thanks, Grant,
ListFieldSelector is not part of the update as MapFieldSelector subsumed its functionality. It appears there is a dangling import of ListFieldSelector in TestParallelReader. This line should just be deleted. I'd update the patch, but a) fieldSelectorPatch.txt does not apply cleanly against the current svn head, and b) my local copy has other modifications and so I can't reliably extract just this patch. Also, there is one minor fix/improvment to ParallelReader.document(). The iterator over the fields of a subreader should not be constructed if it won'd be used, i.e., move the construction inside the first if: boolean include = (fieldSelector==null); Sorry about these issues... FYI, I've been using the capability extensively and it is working well. Thanks for lazy fields! Chuck OK, I will take care of it, thanks!
Thanks, Chuck, for the assistance!
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
As always, let me know if I can help with anything.