lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Multiple boost queries on a specific field
Date Fri, 17 Jul 2015 00:54:24 GMT
Why are you using q.alt? That uses much different query parsing
logic that I believe bypasses the dismax stuff. Just use q=*:*.

*:* also short-circuits most of the scoring since there's nothing to score
there, try with q= real terms.

As to your second query, see
for a way to make more recent documents bubble to the top. It doesn't quite do
what you're asking, but it might be "close enough".


On Thu, Jul 16, 2015 at 4:55 AM, bengates <> wrote:
> Hello,
> 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 :
> /?q=&wt=json&defType=dismax&q.alt=*:*&bq=provider:A^2.0/
> My first results have provider A.
> Let's try another one :
> ?q=&wt=json&defType=dismax&q.alt=*:*&bq=provider:B^1.5
> My first results have provider B. Good!
> But that's not exactly what I'm looking for (otherwise I'd just made a
> filterQuery).
> 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 :
> /?q=&wt=json&defType=dismax&q.alt=*:*&bq=provider:A^2.0&bq=provider:B^1.5/
> 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,
> Ben
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message