I'm looking into the possibility of de-boosting a set of documents during query time. In my application, when I search for e.g. "preferences", I want to de-boost content tagged with ContentGroup:"Developer" or in other words, push those content back in the order. Here's the catch. I've the following weights on query fields and boost query on source
qf=text^6 title^15 IndexTerm^8
As you can see, title has a higher weight.
Now, a bunch of content tagged with ContentGroup:"Developer" consists of a title like "Preferences.material" or "Preferences Property" or "Preferences.graphics". The boost on title pushes these documents at the top.
What I'm looking is to see if there's a way to deboost all documents that are tagged with ContentGroup:"Developer" irrespective of the term occurrence is text or title. I tried something like, but didn't make any difference.
Source:simplecontent^10 Source:Help^20 (-ContentGroup-local:("Developer"))^99
I'm using edismax query parser.
Any pointers will be appreciated.
Thanks,
Shamik
You're onto something with your last attempt, but you have to start with
*:*
, so that you actually have something to subtract the documents from. The resulting set of documents (those not matching your query) can then be boosted.From the Solr Relevancy FAQ