lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4355) improve AtomicReader sugar apis
Date Wed, 05 Sep 2012 10:35:07 GMT


Michael McCandless commented on LUCENE-4355:

I'm OK with keeping the sugar too.  I agree the boilerplate code is sizable.

I think only taking Term, not taking Bits, keeps the docs/positions enum simple.

Should we sugar for all stats?  (eg IR.getSumTotalTermFreq(String field)).
> improve AtomicReader sugar apis
> -------------------------------
>                 Key: LUCENE-4355
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
> I thought about this after looking @ LUCENE-4353:
> AtomicReader has some sugar APIs that are over top of the flex apis (Fields, Terms, ...).
But these might be a little trappy/confusing compared to 3.x.
> # I dont think we need AtomicReader.termDocsEnum(Bits, ...) and .termPositionsEnum(Bits,
...). I also don't think we need variants that take flags here. We should simplify these to
be less trappy. I think we only need (String, BytesRef) here.
> # This means you need to use the flex apis for more expert usage: but we make this a
bit too hard since we only let you get a Terms (which you must null check, then call .iterator()
on, then seekExact, ...). I think it could help if we balanced this out by adding some sugar
like AtomicReader.termsEnum? 3.x had a method that let you get a 'positioned termsenum'.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

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

View raw message