lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENE-3472) add back Document.getValues()
Date Tue, 27 Sep 2011 17:45:45 GMT

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

Michael McCandless resolved LUCENE-3472.
----------------------------------------

    Resolution: Fixed
    
> add back Document.getValues()
> -----------------------------
>
>                 Key: LUCENE-3472
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3472
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>             Fix For: 4.0
>
>
> I'm porting some code to trunk's new Doc/Field apis, and i keep running into this pattern:
> {noformat}
> String[] values = doc.getValues("field");
> {noformat}
> But with the new apis, this becomes a little too verbose:
> {noformat}
> IndexableField[] fields = doc.getFields("field");
> String[] values = new String[fields.length];
> for (int i = 0; i < values.length; i++) {
>   values[i] = fields[i].stringValue();
> }
> {noformat}
> I think we should probably add back the sugar api (with the same name) ?

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