lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bengates <>
Subject Multiple boost queries on a specific field
Date Thu, 16 Jul 2015 11:55:10 GMT

I'm trying to use the boost queries for the 1st time and I need some help.
Let's assume my documents have a /provider /field, which is populated by a
string, i.e. A, B, C, D, E.

I'd like to assign weight to providers. A is /^2.0/, B is /^1.5/ and the
others are 1.0.

So, if I run the following query :
My first results have provider A.

Let's try another one :

My​ first results have provider B. Good!

But that's not exactly what I'm looking for (otherwise I'd just made a
What I want is a /multiple /boost query. So I tried :
/?q=&wt=json&defType=dismax&q.alt=*:*&bq=provider:​(​A^2.0​ B^1.5)​/
Then my first results have provider B. It's not logical.

I tried another syntax :
But nothing changes.

Can you help me ?

My 2nd problem is that I would like to give some weight to the newer
documents, but in a range of a month.
That means, if a document named B1 with provider B (weighs 1.5) is newer
than a document named A1 with provider A (weighs 2.0), I want that B1 gets
on top of A1 /only /if the difference between their dates are /at least 1
month/. Do you know how to do this ?

Since my boost logic depends on the user navigation, I have to realize this
only at query-time.

Thanks for your help,

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

View raw message