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 Siamak Rowshan <si...@softmart.com> on 2015/05/12 15:43:16 UTC

Retrieving list of synonyms and facet field values

Hi all, I'm new to Solr and would appreciate any help with this question. Is there a way, to retrieve the list of synonyms via the API? I also need to retrieve the values of each facet field via API. For example the list of "Cat" facet includes: "fiction", "non-fiction", etc.

Thanks,
Siamak  

RE: Retrieving list of synonyms and facet field values

Posted by Siamak Rowshan <si...@softmart.com>.
Thanks Alessandro, managed resources was exactly what I needed.

-----Original Message-----
From: Alessandro Benedetti [mailto:benedetti.alex85@gmail.com] 
Sent: Tuesday, May 12, 2015 10:12 AM
To: solr-user@lucene.apache.org
Subject: Re: Retrieving list of synonyms and facet field values

Hi Siamak,

1) You can do that with the managed resources :
Take a look to the synonym section.
https://cwiki.apache.org/confluence/display/solr/Managed+Resources

Specifically :

"To determine the synonyms for a specific term, you send a GET request for the child resource, such as /schema/analysis/synonyms/english/mad would return ["angry","upset"]. Lastly, you can delete a mapping by sending a DELETE request to the managed endpoint."


2) you can use the Term Component (
https://cwiki.apache.org/confluence/display/solr/The+Terms+Component)
It's quite straightforward to use .
If you are talking about the facets, when you send a query to Solr , with the facets enabled, you simply need to parse the resulting Json ( or xml).
In the case you are doing it programmatically SolrJ gives great support for the facets.

Cheers

2015-05-12 14:43 GMT+01:00 Siamak Rowshan <si...@softmart.com>:

> Hi all, I'm new to Solr and would appreciate any help with this question.
> Is there a way, to retrieve the list of synonyms via the API? I also 
> need to retrieve the values of each facet field via API. For example 
> the list of "Cat" facet includes: "fiction", "non-fiction", etc.
>
> Thanks,
> Siamak
>



--
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Re: Retrieving list of synonyms and facet field values

Posted by Alessandro Benedetti <be...@gmail.com>.
Hi Siamak,

1) You can do that with the managed resources :
Take a look to the synonym section.
https://cwiki.apache.org/confluence/display/solr/Managed+Resources

Specifically :

"To determine the synonyms for a specific term, you send a GET request for
the child resource, such as /schema/analysis/synonyms/english/mad would
return ["angry","upset"]. Lastly, you can delete a mapping by sending a
DELETE request to the managed endpoint."


2) you can use the Term Component (
https://cwiki.apache.org/confluence/display/solr/The+Terms+Component)
It's quite straightforward to use .
If you are talking about the facets, when you send a query to Solr , with
the facets enabled, you simply need to parse the resulting Json ( or xml).
In the case you are doing it programmatically SolrJ gives great support for
the facets.

Cheers

2015-05-12 14:43 GMT+01:00 Siamak Rowshan <si...@softmart.com>:

> Hi all, I'm new to Solr and would appreciate any help with this question.
> Is there a way, to retrieve the list of synonyms via the API? I also need
> to retrieve the values of each facet field via API. For example the list of
> "Cat" facet includes: "fiction", "non-fiction", etc.
>
> Thanks,
> Siamak
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England