You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Ganesan, VinothKumar" <Vi...@nordstrom.com> on 2019/07/02 17:58:45 UTC

Grouping facet count is not working with JSON Faceting

Hi,

I am trying to use JSON faceting in SOLR 7.3 along with grouping documents and noticed that group.facet=true is not working with json.facet but it works with flat faceting.

Query Format I used: http://localhost:8983/solr/Collection/select?q=*:*&facet=true&facet.mincount=2&json.facet={sc_uf_facetfield:{type:terms,limit:-1,sort:{index:asc},field:facetfield}}&group=false&group.ngroups=false&group.format=grouped&group.limit=1&group.field=groupid&group.facet=true<http://localhost:8983/solr/Collection/select?q=*:*&facet=true&facet.mincount=2&json.facet=%7bsc_uf_facetfield:%7btype:terms,limit:-1,sort:%7bindex:asc%7d,field:facetfield%7d%7d&group=false&group.ngroups=false&group.format=grouped&group.limit=1&group.field=groupid&group.facet=true>

I have 2 documents in my index and both have the same value for facetfield. I tried this with clustered and single SOLR node.

Expected

Actual

"sc_uf_facetfield": {
    "buckets": [
        {
            "val": "facet value",
           "count": 1
        }
    ]
}

"sc_uf_facetfield": {
    "buckets": [
        {
            "val": "facet value",
            "count": 2
        }
    ]
}


Can you please let me know whether this is a known SOLR bug or my SOLR query is wrong?


Thanks,
Vinoth