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 Vincent Pérès <vi...@gmail.com> on 2008/10/21 11:42:37 UTC
Create custom facets after building index
Hello,
I would like to create a custom facet for a 'rating_facets'.
The rates are like that : 1, 1.2, 5, 5.78 etc.
Is it possible to tell solr to create a 'custom' facet :
[0 to 0.99] is 0
[ 1 to 1.99] is 1
etc. (and get them back into xml results with number of results by value)
Or I have to specify this way on my schema.xml?
Thank you !
Vincent
--
View this message in context: http://www.nabble.com/Create-custom-facets-after-building-index-tp20086166p20086166.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Create custom facets after building index
Posted by Vincent Pérès <vi...@gmail.com>.
Hello !
Thank you it is working. I've done a query, and my facet query is :
"facet_queries":{
"published_year_facet:[1999 TO 2005]":95,
"rating_facet:[3 TO 3.99]":25,
"rating_facet:[1 TO 1.99]":1},
Is it possible to 'group' kind of queries (published together, rating
together etc.) ? Or I have to match every query with regex ?
Thanks !
--
View this message in context: http://www.nabble.com/Create-custom-facets-after-building-index-tp20086166p20091818.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Create custom facets after building index
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
You should use facet.query which gives the number of documents matching the
query. For example:
facet.query=rating:[0 TO 0.99]&facet.query=rating:[1 TO 1.99] etc.
http://wiki.apache.org/solr/SimpleFacetParameters
On Tue, Oct 21, 2008 at 3:12 PM, Vincent Pérès <vi...@gmail.com>wrote:
>
> Hello,
>
> I would like to create a custom facet for a 'rating_facets'.
> The rates are like that : 1, 1.2, 5, 5.78 etc.
> Is it possible to tell solr to create a 'custom' facet :
> [0 to 0.99] is 0
> [ 1 to 1.99] is 1
> etc. (and get them back into xml results with number of results by value)
> Or I have to specify this way on my schema.xml?
>
> Thank you !
> Vincent
> --
> View this message in context:
> http://www.nabble.com/Create-custom-facets-after-building-index-tp20086166p20086166.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
--
Regards,
Shalin Shekhar Mangar.