You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2013/01/21 12:02:14 UTC

[jira] [Updated] (LUCENE-4697) FacetResultNode should be a simple bin, not interface

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

Shai Erera updated LUCENE-4697:
-------------------------------

    Attachment: LUCENE-4697.patch

Patch makes FacetResultNode concrete class with public members. Also removes MutableFacetResultNode.

Tests pass, I think this is ready to commit.
                
> FacetResultNode should be a simple bin, not interface
> -----------------------------------------------------
>
>                 Key: LUCENE-4697
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4697
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>         Attachments: LUCENE-4697.patch
>
>
> FacetResultNode is an interface with a bunch of getter methods. The purpose, I believe, was to return an object that does not allow you modify it. But that's overly defensive I think. I.e., we return to users ScoredDoc and they can happily modify 'doc' and 'score'. If users modify the members' values, they can only affect themselves, as this object is returned after the search has completed.
> Anyway, today it doesn't even defend itself right, because you can call getSubResults and remove/add elements from the list ...
> I want to make it a simple bin, w/ public members and get rid of MutableFacetResultNode. Will keep the class not final, since it might be useful for someone to extend it and add additional members, for his/her FacetsCollector purposes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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