Hi Solr Team,

I am trying to check how I can formulate facet queries using JSON format. I
can successfully formulate query, range, term queries, as well as nested
term queries. How can I formulate a nested facet query involving "query" as
well as "range" formulations? The following does not work:


GET http://localhost:5555/solr/db/query HTTP/1.1
content-type: application/json

{
    "query"  : "*:*",
    "limit"  : 0,
    "facet": {
        "a1": { "query":  "cfname2:1" },
        "a2": { "query":  "cfname2:2" },
        "a3": { "field":  "cfname2", "type":"terms", "prefix":"3" },
        "a4": { "query":  "cfname2:4" },
        "a5": { "query":  "cfname2:5" },
        "a6": { "query":  "cfname2:6" },

        "tt": {
            "t_buckets": {
                "type":  "range",
                "field": "t",
                "sort": { "t": "asc" },
                "start": "2018-05-02T17:00:00.000Z",
                "end":   "2020-11-16T21:00:00.000Z",
                "gap":   "+1HOUR"
            }
        }
    }
}

Single (not nested facets separately on individual queries as well as for
range) work in flying colors.

Cheers,
Arturas

Reply via email to