lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woody Anderson (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-2540) Document. add get(i) and addAll to make interacting with fieldables and documents easier/faster and more readable
Date Fri, 16 Jul 2010 04:24:49 GMT
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 - Java
          Issue Type: Improvement
          Components: Other
    Affects Versions: 3.0.2
            Reporter: Woody Anderson
             Fix For: 3.0.3, 3.1, 4.0, 3.0.2


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.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message