Search code examples
solrcassandraaggregationdatastax-enterprise

Solr Data Stacks Enterprise Search Group by column?


I'm struggling to find the correct syntax when I submit queries such as 'sum total income for males group by cat' I'm using DSE v 4.8.

I have the datasource setup and I'm able to query it successfully from following the tutorial

I have tried the following from here

curl http://localhost:8983/solr/nhanes_ks.nhanes/select -d 'q=gender:Male&wt=json&json.facet=    
{
    categories: {
        type: terms,
        field: cat,
        facet: {
            quality: "sum(monthly_income_total)"
        }
    }
}'

And the following from here

curl http://localhost:8983/solr/nhanes_ks.nhanes/select -d 'q=gender:Male&wt=json&json.facet= 
{
    categories: {
        terms:{
            field: cat,
            facet: {
                quality: "sum(monthly_income_total)"
            }
        }
    }
}'

Solr reports as version 4.1 is this a feature only supported by Solr 5x? If not will DSE be upgrading Solr to support this feature in DSE 5x?


Solution

  • As you rightly found out these are Solr 5.x specific features and DSE 4.8 comes with Solr 4.10.x. You will be able to use these new Solr 5.x features when DSE gets updated.