lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3109) Rename FieldsConsumer to InvertedFieldsConsumer
Date Sun, 08 Apr 2012 13:40:19 GMT


Robert Muir commented on LUCENE-3109:

Thanks, when looking at naming of apis that users will interact with,
I think we should go with the simplest possible naming thats easiest to consume.

For example things like "Term", "Query", "Document", etc. I think this kind of
naming helps to keep the API consumable: as far as more expert stuff inside codec,
thats sort of a different story (though we shouldnt just name it whatever, i think
we don't have to be nearly as picky about names).

For the core APIs that hook into IndexReader and IndexWriter, and for things in 
the o.a.l.document package, and things like that, I think we should be shooting 
for these super-simplistic names that have worked for lucene all along.

To me, taking an IndexReader and enumerating Fields->FieldsEnum->Terms->TermsEnum...

is pretty clear and makes sense.

Fields and Terms being plural makes sense to me, but one improvement to think of is
removing the confusing plural ending of these enum classes (FieldEnum, TermEnum). 
It seems this only have existed to not conflict with the pre-flex API before 
(for backwards compatibility). I think that would be an easy improvement to
those enum classes..., for consistency maybe do the same with DocsEnum, or even
think of a new name for that one entirely, I'm not sure.

> Rename FieldsConsumer to InvertedFieldsConsumer
> -----------------------------------------------
>                 Key: LUCENE-3109
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: core/codecs
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>         Attachments: LUCENE-3109.patch, LUCENE-3109.patch, LUCENE-3109.patch, LUCENE-3109.patch,
LUCENE-3109.patch, LUCENE-3109.patch
> The name FieldsConsumer is missleading here it really is an InvertedFieldsConsumer and
since we are extending codecs to consume non-inverted Fields we should be clear here. Same
applies to as well as FieldsProducer.

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


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

View raw message