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

Houston Putman commented on SOLR-8147:
--------------------------------------

I agree that the {{hasDocValues()}} check should be moved to 
{{AnalyticsRequestFactory.(makeFieldFacet|setFieldFacetParam)}}. It shouldn't 
add any complexity since those methods are where the {{SchemaField}} 
references, which {{FieldFacetAccumulator}} uses, originate. Other error 
checking could be done in a similar manner. For example {{result()}} calls in 
query and range facets could be validated after 
{{AnalyticsRequestFactory.parse()}} is finished, this would greatly reduce the 
complexity in the {{(BasicAccumulator|FacetingAccumulator).getResult()}}  and 
{{FacetingAccumulator.getQueryResult()}} methods. There are probably others, 
but that's the first that popped into my head.

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

Reply via email to