lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bengates <benga...@aliceadsl.fr>
Subject Multiple boost queries on a specific field
Date Thu, 16 Jul 2015 11:55:10 GMT
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: http://lucene.472066.n3.nabble.com/Multiple-boost-queries-on-a-specific-field-tp4217678.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message