Re: json faceting - Terms faceting and EnumField

2020-05-21 Thread Ponnuswamy, Poornima (GE Healthcare)
Can anyone provide some light on the issue I am having?. Thanks!

On 5/20/20, 4:55 PM, "Ponnuswamy, Poornima (GE Healthcare)" 
 wrote:

Hello,

We have solr 6.6 version.
Below is the field and field type that is defined in solr schema.



Below is the configuration for the enum
   

  servicerequestcorrective
  servicerequestplanned
  servicerequestinstallationandupgrade
  servicerequestrecall
  servicerequestother
  servicerequestinquiry
  servicerequestproactive
  servicerequestsystemupdate
  servicerequesticenteradmin
  servicerequestonwatch
  servicerequestfmi
  servicerequestapplication
   

When I try to invoke using the below call, I am getting error

http://localhost:8983/solr/activity01us/select?={ServiceRequestTypeCode:{type:terms<http://localhost:8983/solr/activity01us/select?=%7bServiceRequestTypeCode:%7btype:terms>,
 field:ServiceRequestTypeCode, limit:10}}=on=on=json=*
"Expected numeric field type 
:ServiceRequestTypeCode{type=ServiceRequestTypeCode,properties=indexed,stored,omitNorms,omitTermFreqAndPositions}"

But when I try to do as below it works fine.


http://localhost:8983/solr/activity01us/select?facet.field=ServiceRequestTypeCode=on=on=*:*=json

I would like to use json facet as it would help me in subfaceting.

Any help would be appreciated


Thanks,
Poornima





json faceting - Terms faceting and EnumField

2020-05-20 Thread Ponnuswamy, Poornima (GE Healthcare)
Hello,

We have solr 6.6 version.
Below is the field and field type that is defined in solr schema.



Below is the configuration for the enum
   

  servicerequestcorrective
  servicerequestplanned
  servicerequestinstallationandupgrade
  servicerequestrecall
  servicerequestother
  servicerequestinquiry
  servicerequestproactive
  servicerequestsystemupdate
  servicerequesticenteradmin
  servicerequestonwatch
  servicerequestfmi
  servicerequestapplication
   

When I try to invoke using the below call, I am getting error
http://localhost:8983/solr/activity01us/select?={ServiceRequestTypeCode:{type:terms,
 field:ServiceRequestTypeCode, limit:10}}=on=on=json=*
"Expected numeric field type 
:ServiceRequestTypeCode{type=ServiceRequestTypeCode,properties=indexed,stored,omitNorms,omitTermFreqAndPositions}"

But when I try to do as below it works fine.

http://localhost:8983/solr/activity01us/select?facet.field=ServiceRequestTypeCode=on=on=*:*=json

I would like to use json facet as it would help me in subfaceting.

Any help would be appreciated


Thanks,
Poornima



Re: Solr Subfaceting

2017-07-17 Thread Ponnuswamy, Poornima (GE Healthcare)
Thanks for your response. I have tried with SolrParams and it works for me.

Any feedback on question 1 & 2. 

Thanks,
Poornima

On 7/17/17, 12:38 PM, "Amrit Sarkar" <sarkaramr...@gmail.com> wrote:

Poornima,

Regarding 3;
You can do something like:

CloudSolrClient client = new CloudSolrClient("localhost:9983");

SolrParams params = new ModifiableSolrParams().add("q","*:*")
.add("json.facet","{.}");

QueryResponse response = client.query(params);

Setting key and value via SolrParams is available.


Amrit Sarkar
Search Engineer
Lucidworks, Inc.
415-589-9269
www.lucidworks.com
Twitter http://twitter.com/lucidworks
LinkedIn: https://www.linkedin.com/in/sarkaramrit2

    On Mon, Jul 17, 2017 at 8:48 PM, Ponnuswamy, Poornima (GE Healthcare) <
poornima.ponnusw...@ge.com> wrote:

> Hello,
>
> We have Solr version 6.4.2  and we have been using Solr Subfaceting –
> Terms Facet as per the document https://cwiki.apache.org/
> confluence/display/solr/Faceted+Search in our project.
>
> In our project which is going to go in production soon, we use it for
> getting the facet/subfacet counts, sort etc. We make a direct rest call to
> solr and the counts matches perfectly. I have few questions and
> clarification on this approach and appreciate your response on this.
>
>
>
>   1.  In confluence - https://cwiki.apache.org/confluence/display/solr/
> Faceted+Search it page says its experimental and may change
> significantly. Is it safe for us to use the Terms faceting or will it
> change in future releases?. When will this be official?.
>   2.  As Term faceting has few advantages over Pivot facet as per
> http://yonik.com/solr-subfacets/ we went on with it. Is it safe to use it
> or do we use Pivot faceting instead?
>   3.  Currently we make a rest call to Solr API to get results. Now we are
> planning to move to Solr Cloud and use Solrj library to integrate with
> Solr. I don’t see any support for Terms faceting (json.facet) in Solrj
> library. Am I overlooking it or will it be supported in future releases?
>
> Appreciate your response.
>
> Thanks,
> Poornima
>
>




Solr Subfaceting

2017-07-17 Thread Ponnuswamy, Poornima (GE Healthcare)
Hello,

We have Solr version 6.4.2  and we have been using Solr Subfaceting – Terms 
Facet as per the document 
https://cwiki.apache.org/confluence/display/solr/Faceted+Search in our project.

In our project which is going to go in production soon, we use it for getting 
the facet/subfacet counts, sort etc. We make a direct rest call to solr and the 
counts matches perfectly. I have few questions and clarification on this 
approach and appreciate your response on this.



  1.  In confluence - 
https://cwiki.apache.org/confluence/display/solr/Faceted+Search it page says 
its experimental and may change significantly. Is it safe for us to use the 
Terms faceting or will it change in future releases?. When will this be 
official?.
  2.  As Term faceting has few advantages over Pivot facet as per 
http://yonik.com/solr-subfacets/ we went on with it. Is it safe to use it or do 
we use Pivot faceting instead?
  3.  Currently we make a rest call to Solr API to get results. Now we are 
planning to move to Solr Cloud and use Solrj library to integrate with Solr. I 
don’t see any support for Terms faceting (json.facet) in Solrj library. Am I 
overlooking it or will it be supported in future releases?

Appreciate your response.

Thanks,
Poornima