lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/LUCENE-3109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249549#comment-13249549
] 

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: https://issues.apache.org/jira/browse/LUCENE-3109
>             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 Fields.java as well as FieldsProducer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message