lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Britske <>
Subject solr 1.4: extending StatsComponent to recognize localparm {!ex}
Date Tue, 25 Aug 2009 22:35:17 GMT


I'm looking for a way to extend StatsComponent te recognize localparams
especially the {!ex}-param.
To my knowledge this isn't implemented in the current trunk. 

One of my use-cases for this is to be able to have a javascript
price-slider, where the user can operate the slider and thus set a
price-filter (fq). (e.g. see  Regardless of this setting, min and
max values for the price should be available so to properly scale the
slider. I have a couple of other uses for it too, so I'm really interested
in this feature. 

I'm trying to get my had around how the Searchcomponents relate to eachother
and how the general (component) flow works. Judging from the source of
seachHandler it seems that when no sharding is used (I can use this case for
now) the flow is basically that for all registered searchComponents the
process() method is called, So there is nothing like stages, etc. to take
into account?

I was thinking of letting the modified statsComponent issue a new request in
Responsebuilder.outgoing that would be picked up by FacetComponent when
statComponent found a stats.field with the {ex}-param. Afterwards the
modified statsComponent would somehow pick up the result (a widened set of
docs that match for the original query excluding the specified filter) and
process further like before. 

However, as described above, this code seems to only work when using
sharding, so I'm quite unsure how to proceed further. 

Moreover, I can't seem to find the actual code in FacetComponent or anywhere
else for that matter where the {!ex}-param case is treated. I assume it's in
FacetComponent.refineFacets but I can't seem to get a grip on it.. Perhaps
it's late here..

So, somone care to shed a light on how this might be done? (I only need some
general directions I hope..)


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message