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 Shivam Jha <iv...@gmail.com> on 2020/10/27 07:50:02 UTC

SolrJ NestableJsonFacet ordering of query facet

Hi folks,

Doing some faceted queries using 'facet.json' param and SolrJ, the results
of which I am processing using SolrJ NestableJsonFacet class.
basically as   *queryResponse.getJsonFacetingResponse() -> returns
*NestableJsonFacet
object.

But I have noticed it does not maintain the facet-query order in which it
was given in *facet.json.*
*Direct queries to solr do maintain that order, but not after it comes to
Java layer in SolrJ.*

Is there a way to make it maintain that order ?
Hopefully the question makes sense, if not please let me know I can clarify
further.

Thanks,
Shivam

Re: SolrJ NestableJsonFacet ordering of query facet

Posted by Jason Gerlowski <ge...@gmail.com>.
Hi Shivram,

I think the short answer is "no".  At least, not without sub-classing
some of the JSON-Facet classes in SolrJ.

But it's hard for me to understand your particular concern without
seeing a concrete example.  If you provide an example (maybe in the
form of a JUnit test snippet showing the actual and expected values),
I may be able to provide more help.

Best,

Jason

On Fri, Oct 30, 2020 at 1:54 AM Shivam Jha <iv...@gmail.com> wrote:
>
> Hi folks,
>
> Does anyone have any advice on this issue?
>
> Thanks,
> Shivam
>
> On Tue, Oct 27, 2020 at 1:20 PM Shivam Jha <iv...@gmail.com> wrote:
>
> > Hi folks,
> >
> > Doing some faceted queries using 'facet.json' param and SolrJ, the results
> > of which I am processing using SolrJ NestableJsonFacet class.
> > basically as   *queryResponse.getJsonFacetingResponse() -> returns *NestableJsonFacet
> > object.
> >
> > But I have noticed it does not maintain the facet-query order in which it
> > was given in *facet.json.*
> > *Direct queries to solr do maintain that order, but not after it comes to
> > Java layer in SolrJ.*
> >
> > Is there a way to make it maintain that order ?
> > Hopefully the question makes sense, if not please let me know I can
> > clarify further.
> >
> > Thanks,
> > Shivam
> >
>
>
> --
> shivamJha

Re: SolrJ NestableJsonFacet ordering of query facet

Posted by Shivam Jha <iv...@gmail.com>.
Hi folks,

Does anyone have any advice on this issue?

Thanks,
Shivam

On Tue, Oct 27, 2020 at 1:20 PM Shivam Jha <iv...@gmail.com> wrote:

> Hi folks,
>
> Doing some faceted queries using 'facet.json' param and SolrJ, the results
> of which I am processing using SolrJ NestableJsonFacet class.
> basically as   *queryResponse.getJsonFacetingResponse() -> returns *NestableJsonFacet
> object.
>
> But I have noticed it does not maintain the facet-query order in which it
> was given in *facet.json.*
> *Direct queries to solr do maintain that order, but not after it comes to
> Java layer in SolrJ.*
>
> Is there a way to make it maintain that order ?
> Hopefully the question makes sense, if not please let me know I can
> clarify further.
>
> Thanks,
> Shivam
>


-- 
shivamJha