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 Yangrui Guo <gu...@gmail.com> on 2016/04/24 22:13:08 UTC

how to retrieve json facet using solrj

Hello

I use json facet api to get facets. The response returned with facets and
counts However, when I called the getFacetFields method in SolrJ client, I
got null results. How can I get the facet results from solrj? I set my
query as query.setParam("json.facet", "{entities : {type: terms,field:
class2} }" Am I missing something? Thanks.

Yangrui

Re: how to retrieve json facet using solrj

Posted by Georg Sorst <g....@findologic.com>.
Hi Yangrui,

from what I've gathered the JSON Facets are not supported in SolrJ yet, so
you need to manually work with the response, ie.:
response.getResponse().get("facets")

Best,
Georg

Yangrui Guo <gu...@gmail.com> schrieb am So., 24. Apr. 2016 um
22:13 Uhr:

> Hello
>
> I use json facet api to get facets. The response returned with facets and
> counts However, when I called the getFacetFields method in SolrJ client, I
> got null results. How can I get the facet results from solrj? I set my
> query as query.setParam("json.facet", "{entities : {type: terms,field:
> class2} }" Am I missing something? Thanks.
>
> Yangrui
>
-- 
*Georg M. Sorst I CTO*
FINDOLOGIC GmbH



Jakob-Haringer-Str. 5a | 5020 Salzburg I T.: +43 662 456708
E.: g.sorst@findologic.com
www.findologic.com Folgen Sie uns auf: XING
<https://www.xing.com/profile/Georg_Sorst>facebook
<https://www.facebook.com/Findologic> Twitter
<https://twitter.com/findologic>

Wir sehen uns auf dem *Shopware Community Day in Ahaus am 20.05.2016!* Hier
<beratung@findologic.com?subject=Terminvereinbarung%20SCD> Termin
vereinbaren!
Wir sehen uns auf der* dmexco in Köln am 14.09. und 15.09.2016!* Hier
<beratung@findologic.com?subject=Terminvereinbarung%20dmexco> Termin
vereinbaren!