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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to