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 Britske <gb...@gmail.com> on 2009/02/25 14:38:43 UTC

solr 1.4: multi-select for statscomponent

Is there way to exclude filters from a stats field, like it is possible to
exclude filters from a facet.field? It didn't work for me. 

i.e: I have a field price, and although I filter on price, I would like to
be able to get the entire range (min,max) of prices as if I didn't specify
the filter. Obviously without excluding the filter the min,max range is
constrained by [50,100]

Part of query: 
stats=true&stats.field={!ex=p1}price&fq={!tag=p1}price:[50 TO 100]

USE-CASE:
I show a double-slider using javascript to display possible prices. (2
handles, one allowing to set min-price and the other to set max-price) 
The slider has a range of [0,maxprice without price filter set]. maxprice is
inserted by getting info from 'stats.price&stats=true'

When the user sets the slider a filter (fq) is set constraining the
resultset the set min and max-prices. 
After the page updates, I still want to show the price-slider, with the min
and max handles set to the prices as selected by the user, so the user can
alter his filter quickly.

However (and here it comes) I would also be able to get the 'maxprice
without price filter set' because I need this to set the max-range of the
slider. 

Is there any (undocumented) feature that makes this possible? If not, would
it be easy to add?

Thanks, 
Britske

-- 
View this message in context: http://www.nabble.com/solr-1.4%3A-multi-select-for-statscomponent-tp22202971p22202971.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: solr 1.4: multi-select for statscomponent

Posted by gunjan_versata <gu...@gmail.com>.
Is there any update on this requirement??


Britske wrote:
> 
> Is there way to exclude filters from a stats field, like it is possible to
> exclude filters from a facet.field? It didn't work for me. 
> 
> i.e: I have a field price, and although I filter on price, I would like to
> be able to get the entire range (min,max) of prices as if I didn't specify
> the filter. Obviously without excluding the filter the min,max range is
> constrained by [50,100]
> 
> Part of query: 
> stats=true&stats.field={!ex=p1}price&fq={!tag=p1}price:[50 TO 100]
> 
> USE-CASE:
> I show a double-slider using javascript to display possible prices. (2
> handles, one allowing to set min-price and the other to set max-price) 
> The slider has a range of [0,maxprice without price filter set]. maxprice
> is inserted by getting info from 'stats.price&stats=true'
> 
> When the user sets the slider a filter (fq) is set constraining the
> resultset the set min and max-prices. 
> After the page updates, I still want to show the price-slider, with the
> min and max handles set to the prices as selected by the user, so the user
> can alter his filter quickly.
> 
> However (and here it comes) I would also be able to get the 'maxprice
> without price filter set' because I need this to set the max-range of the
> slider. 
> 
> Is there any (undocumented) feature that makes this possible? If not,
> would it be easy to add?
> 
> Thanks, 
> Britske
> 
> 

-- 
View this message in context: http://old.nabble.com/solr-1.4%3A-multi-select-for-statscomponent-tp22202971p26656565.html
Sent from the Solr - User mailing list archive at Nabble.com.