sunburnt icon indicating copy to clipboard operation
sunburnt copied to clipboard

LocalParams syntax

Open rslinckx opened this issue 14 years ago • 0 comments

Hi !

I was wondering if it would be easy to add support for localparams syntax, especially when dealing with facetting (multi-select facets as described in solr docs: http://wiki.apache.org/solr/SimpleFacetParameters#Multi-Select_Faceting_and_LocalParams )

Something like this should work to retrieve doctype facets without taking doctype:pdf filter into account:

s.query('query').filter('{!tag=dt}doctype:pdf').facet_by('{!ex=dt}doctype')

but currently it won't work because sunburnt will try to get the "{!ex=dt}doctype" field in the schema which obviously doesn't exist.

One workaround is to monkey patch the schema.match_field method to strip the localparam tag but i have no idea if this is a good or bad thing :)

How would you do it ?

rslinckx avatar Oct 11 '10 12:10 rslinckx