lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christine Poerschke (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SOLR-9800) FacetComponent - move construction of SimpleFacets to a protected method
Date Wed, 01 Feb 2017 12:17:51 GMT

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

Christine Poerschke reassigned SOLR-9800:
-----------------------------------------

    Assignee: Christine Poerschke

> FacetComponent - move construction of SimpleFacets to a protected method
> ------------------------------------------------------------------------
>
>                 Key: SOLR-9800
>                 URL: https://issues.apache.org/jira/browse/SOLR-9800
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Jonny Marks
>            Assignee: Christine Poerschke
>            Priority: Minor
>         Attachments: SOLR-9800.patch
>
>
> This patch moves the construction of SimpleFacets from inside process() to a new protected
method, allowing contrib modules to reuse FacetComponent with a different SimpleFacets implementation.
> For example:
> {code}
> class MyFacetComponent extends FacetComponent {
>   @Override
>   protected SimpleFacets newSimpleFacets(SolrQueryRequest req, DocSet docSet, SolrParams
params, ResponseBuilder rb) {
>     return new SimpleFacets(req, docSet, params, rb) {
>       @Override
>       protected BytesRefFilter newBytesRefFilter(String field, SolrParams params) {
>         ...
>         return new MyBytesRefFilter (...);
>       }    
>     };
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message