lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: solr result handler??
Date Sat, 30 Aug 2014 12:18:52 GMT
You can specify a filter query that has "must not" terms. For example:

fq=*:* field1:(-shoot -darn -rats) field2:(-shoot -darn -rats)


fq=*:* field1:(-shoot -darn -rats)
fq=*:* field2:(-shoot -darn -rats)

Ypu could specify edismax for the filter query parser and list the fields in 
the qf parameter, BUT... the qf parameter would then be shared between the 
main query and the filter query.

You could also include that filter query in the "invariants" or "appends" 
section of the query request handler configuration in solrconfig to assure 
that no query could override that filter. Or, do an application layer that 
forces that filter to be added.

-- Jack Krupansky

-----Original Message----- 
From: cmd.ares
Sent: Saturday, August 30, 2014 2:10 AM
Subject: solr result handler??

I have a blacklist<string> save some keywords,and the query results need to
be excluded the blacklist。if any filed value contains the keyword,the row
should be removed.
I think there are two ways:
1.modify the solr resultset handler..and which class can be modify?
2.if can implement or extend some class to filter the queryresult?

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

View raw message