You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Woody Anderson (JIRA)" <ji...@apache.org> on 2010/07/16 06:24:49 UTC

[jira] Created: (LUCENE-2540) Document. add get(i) and addAll to make interacting with fieldables and documents easier/faster and more readable

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


[jira] Updated: (LUCENE-2540) Document. add get(i) and addAll to make interacting with fieldables and documents easier/faster and more readable

Posted by "Woody Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woody Anderson updated LUCENE-2540:
-----------------------------------

    Attachment: LUCENE-2540.patch

added the methods, test cases and updated ParallelReader

> 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.2, 3.0.3, 3.1, 4.0
>
>         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.
-
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


[jira] Updated: (LUCENE-2540) Document. add get(i) and addAll to make interacting with fieldables and documents easier/faster and more readable

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ 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: 3.0.2)
                       (was: 3.1)
                       (was: 3.0.3)

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