You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Munendra S N (Jira)" <ji...@apache.org> on 2020/03/15 14:03:00 UTC

[jira] [Assigned] (SOLR-10157) JSON Facets should give more helpful error msg when users attempt to an unknown aggregation

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

Munendra S N reassigned SOLR-10157:
-----------------------------------

    Assignee: Munendra S N

> JSON Facets should give more helpful error msg when users attempt to an unknown aggregation
> -------------------------------------------------------------------------------------------
>
>                 Key: SOLR-10157
>                 URL: https://issues.apache.org/jira/browse/SOLR-10157
>             Project: Solr
>          Issue Type: Improvement
>          Components: Facet Module
>            Reporter: Chris M. Hostetter
>            Assignee: Munendra S N
>            Priority: Major
>         Attachments: SOLR-10157.patch, SOLR-10157.patch
>
>
> Sample question from a confused solr-user email...
> {noformat}
> > I'm getting this error when I tried to do a division in JSON Facet.
> >
> >   "error":{
> >     "msg":"org.apache.solr.search.SyntaxError: Unknown aggregation agg_div in ('div(4,2)', pos=4)",
> >     "code":400}}
> >
> >
> > Is this division function supported in JSON Facet?
> {noformat}
> And the subsequent followup from the same user...
> bq. I found that we can't put div(4,2) directly, as it wouldn't work.
> bq. It will work if I put something like max(div(4,2)).
> ----
> It seems like a better error handline code path for {{FunctionQParser.parseAgg}} (once we've confirmed no such aggregation exists) would be:
> * attempt to parse the original string as a regular (non-Agg)ValueSource) function
> ** if that succeeds, give the user an error indicating that this ValueSource must be wrapped in an aggregation
> ** if it fails, continue to throw the original error
> * either way, any error thrown should refer to the _original_ {{id}} before 
> For example: 
> * {{div(price,popularity)}} should throw an error with a msg along the lines of: {{'div' is a per-document function, not a multi-document aggregation function, input: div(price,popularity)}}
> *  {{HOSS(price,popularity)}} on the other hand should throw an error such as: {{Unknown aggregation HOSS in ('HOSS(price,populaity)' ...}}
> ** note the message cites {{HOSS}} not {{agg_HOSS}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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