You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (Resolved) (JIRA)" <ji...@apache.org> on 2011/09/27 19:45:45 UTC
[jira] [Resolved] (LUCENE-3472) add back Document.getValues()
[ 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