Michael McCandless wrote:
On Mon, Aug 3, 2009 at 10:29 PM, Yonik Seeley<yo...@lucidimagination.com> wrote:
Why is "reversed" passed into SortField.getComparator(), and what does it mean?
Should it always be passed as sortField.getReversed() (and if so, why
does the param exist at all)?

reversed may be passed on to some comparators (currently only
StringOrdVal and CUSTOM) so that they can possibly optimize when that
field is the primary sort.  EG StringOrdVal uses this to bound the
binary search when remapping the ord (looking up the ord by String
value) in its convert method.

Also, FieldComparator has no javadoc for most of it's methods.  For example:
   public void setNextReader(IndexReader reader, int docBase,  int
numSlotsFull) throws IOException;

I'll spruce up these javadocs.  I think after 2.9 feature freeze we
should do lots of javadoc'ing... eg I want to add javadoc to the
CharStream/Reader/Filter classes too.

I should add them when I attached the patch. Sorry about that, Mike.
If I have time when finishing work for fast vector highlighter,
I'd like to contribute...

Koji



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

Reply via email to