Late here but let me add one more thing: IIRC the recommendation for JSON
is to never use data as a key in objects. One of the benefits of not using
data as a keys in JSON is easier validation using JSON schema. If one wants
to validate JSON query for Elasticsearch today it is necessary to implement
custom parser (and grammar first of course).

Lukas

On Sat, Apr 18, 2015 at 11:46 PM, Yonik Seeley <ysee...@gmail.com> wrote:

> Alther minor benefit to the flatter structure means that the "smart
> merging" of multiple JSON parameters works a little better in
> conjunction with facets.
>
> For example, if you already had a "top_genre" facet, you could insert
> a "top_author" facet more easily:
>
> json.facet.top_genre.facet.top_author={type:terms, field:author, limit:5}
>
> (For anyone who doesn't know what "smart merging" is,  see
> http://yonik.com/solr-json-request-api/ )
>
> -Yonik
>
>
> On Sat, Apr 18, 2015 at 11:36 AM, Yonik Seeley <ysee...@gmail.com> wrote:
> > Thank you everyone for the feedback!
> >
> > I've implemented and committed the flatter structure:
> > https://issues.apache.org/jira/browse/SOLR-7422
> > So either form can now be used (and I'll be switching to the flatter
> > method for examples when it actually reduces the levels).
> >
> > For those who want to try it out, I just made a 5.2-dev snapshot:
> > https://github.com/yonik/lucene-solr/releases
> >
> > -Yonik
>

Reply via email to