how to use solr json.facet with aggregations in solrj -


i new solr. want use json.facet buckets , aggregation sum or avg using solrj. implemented in solrj?. not able find document or example of using json.facet in solrj.

it nice have example of solrj implementation of this:

curl http://localhost:8983/solr/query -d 'q=*:*&rows=0& json.facet={      categories:{         type : terms,         field : cat,         sort : { x : desc},         facet:{             x : "avg(price)",             y : "sum(price)"         }      }   } ' 

even if solrj not have custom methods

public solrquery setfacet(boolean b) 

etc json facets, can still use them this:

solrquery.add("json.facet", "...");  solrquery.setparam("json.facet", "...");  

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -