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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -