: For example I have product listings and I want to be able to filter out
: mature items by default. To do this I added: 

I've never done this before, but you might find something like this more 
to your likeing then what you're currently got... 

  <lst name="appends">
    <str name="fq">_query_:"{!lucene df=mature v=$mature}" mature:false</str>
  </lst>
  <lst name="default">
    <str name="mature">false</str>
  </lst>

So by default, no matter what other fq params you add, you'll have an fq 
appended that says "mature:false mature:false" (a boolean query consisting 
of two identical clauses) then in the cases where it's okay to return both 
non-mature and mature content, you just add a "mature=true" param to your 
query, and now the appended fq matches anything that is has mature:false 
or mature:true.

there's probably a nicer way to do this, because that "mature=true" fq 
will be fairly inefficient, but it should be cached so hopefuly that won't 
be a problem.



-Hoss

Reply via email to