lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-2540) Document. add get(i) and addAll to make interacting with fieldables and documents easier/faster and more readable
Date Thu, 09 May 2013 23:06:05 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-2540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Uwe Schindler updated LUCENE-2540:
----------------------------------

    Fix Version/s:     (was: 4.3)
                   4.4
    
> Document. add get(i) and addAll to make interacting with fieldables and documents easier/faster
and more readable
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2540
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2540
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/other
>    Affects Versions: 3.0.2
>            Reporter: Woody Anderson
>             Fix For: 4.4
>
>         Attachments: LUCENE-2540.patch
>
>
> Working with Document Fieldables is often a pain.
> getting the ith involves chained method calls and is not very readable:
> {code}
> // nice
> doc.getFieldable(i);
> // not nice
> doc.getFields().get(i);
> {code}
> also, when combining documents, or otherwise aggregating multiple fields into a single
document,
> {code}
> // nice
> doc.addAll(fieldables);
> // note nice: less readable and more error prone
> List<Fieldable> fields = ...;
> for (Fieldable field : fields) {
>   result.add(field);
> }
> {code}

--
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: 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