On Thu, Dec 11, 2008 at 2:54 PM, Shalin Shekhar Mangar <shalinman...@gmail.com> wrote: > On Thu, Dec 11, 2008 at 11:54 PM, Yonik Seeley <yo...@apache.org> wrote: > >> >> Option #3: tag parts of a request using "local params" >> q=foo&fq=date:[1 TO 2]&fq=securityfilter:42&fq={!tag=type}type:(pdf OR >> html)&facet.field=type >> &facet.field={!exclude=type}author >> >> So here, one fq is tagged with "type" {!tag=type} >> and then excluded when faceting on author. >> Upsides: >> - don't necessarily need to repeat and re-parse params since they >> are referenced by name/tag. >> - tagging is a generic mechanism that can be used for other functionality. >> >> Thoughts? > > > I like this idea. A few questions: > > The tag is only used for the current request, right?
Right. > How will this look when we want to exclude more than one filter? Will it be > like fq={!exclude=filter1,filter2} ? Yeah, exactly what I was thinking. > Is this local param a syntax we are inventing or is it something which > already exists? Already exists, and is utilized in the QParser framework: http://lucene.apache.org/solr/api/org/apache/solr/search/DisMaxQParserPlugin.html -Yonik