Jan Høydahl created SOLR-18503:
----------------------------------
Summary: JSON Facet API: seven parser-accepted keys are missing
from the reference guide
Key: SOLR-18503
URL: https://issues.apache.org/jira/browse/SOLR-18503
Project: Solr
Issue Type: Improvement
Components: JSON Request API
Affects Versions: 10.0
Reporter: Jan Høydahl
Deriving a machine-readable description of the JSON Facet API from
{{FacetParser}} and checking every key against the reference guide turned up
seven keys the parser accepts (all verified against a running 10.0.0) that the
guide never mentions:
# {{processEmpty}} on a facet block ({{FacetParser.parseSubs}}) — computes
sibling facets for buckets whose domain is empty. No hits anywhere in the guide.
# {{cacheDf}} on a terms facet ({{FacetFieldParser}}) — the {{enum}}-method DF
threshold for {{filterCache}} use; {{-1}} disables. No hits.
# {{perSeg}} on a terms facet ({{FacetFieldParser}}) — the source comment says
_"experimental … currently for testing purposes only"_. No hits.
# {{f}} as an alias for {{field}} ({{FacetParser.getField}}) — works for terms
and heatmap facets but *not* range facets, which read {{field}} directly. The
guide's {{f}} references are all the field query parser's.
# {{excludeTags}} directly on a facet, outside {{domain}}
({{parseCommonParams}}) — only the {{domain.excludeTags}} form is documented.
# {{count}} as a stat function ({{agg_count}}; {{count()}} works) — the _Stat
Facet Functions_ table lists {{countvals}} but not {{count}}.
# {{query}} as an alias for {{q}} in a {{type: query}} facet
({{FacetQueryParser}}).
Not all want the same treatment. Suggested split, for discussion:
* *Document*: {{processEmpty}}, {{cacheDf}}, {{count}}, and the facet-level
{{excludeTags}} form (one sentence each; drafts can be supplied).
* *Decide*: the {{f}} and {{query}} aliases — either document them and make
{{f}} work on range facets too, or deprecate both. The current asymmetry ({{f}}
works on two of three facet types) is the worst of the options.
* *Probably reject outside tests*: {{perSeg}}, given its own comment.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]