You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christine Poerschke (JIRA)" <ji...@apache.org> on 2015/10/23 23:22:27 UTC

[jira] [Commented] (SOLR-8147) FieldFacetAccumulator constructor throws too many exceptions

    [ https://issues.apache.org/jira/browse/SOLR-8147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14971869#comment-14971869 ] 

Christine Poerschke commented on SOLR-8147:
-------------------------------------------

Interesting find. Looking at class usage, currently {{FacetingAccumulator}} contains/constructs {{FieldFacetAccumulator}} and both classes' constructors are {{throws IOException}} - so not sure re: changing only the latter over to {{throws SolrException}} then since SolrException is not an IOException (i think).

Considering the overall class usage and calling chains, might the {{hasDocValues()}} check be relocated to somewhere higher up? From a cursory look {{AnalyticsContentHandler.endElement}} and {{AnalyticsRequestFactory.(parse|makeFieldFacet|setFieldFacetParam)}} construct {{FieldFacetRequest}} objects and perhaps the hasDocValues check could happen there i.e. catch the invalid input/bad request when considering request parameters and then within the lower level accumulator object the hasDocValues check goes away and no SolrException need be thrown by the {{FieldFacetAccumulator}}.


> FieldFacetAccumulator constructor throws too many exceptions
> ------------------------------------------------------------
>
>                 Key: SOLR-8147
>                 URL: https://issues.apache.org/jira/browse/SOLR-8147
>             Project: Solr
>          Issue Type: Improvement
>          Components: SearchComponents - other
>    Affects Versions: 5.0, Trunk
>            Reporter: Scott Stults
>            Priority: Trivial
>             Fix For: 5.0, Trunk
>
>         Attachments: SOLR-8147.patch
>
>
> The constructor and static create method in FieldFacetAccumulator don't need to throw IOException, just SolrException. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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