lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Dall'Osto <>
Subject Get results in multiple orders (multiple boosts)
Date Mon, 17 Jul 2017 10:20:23 GMT
I'm new in Solr (and in mailing lists..), and I have a question about querying contents in
multiple custom orders.
I 'm trying to query some documents boosted by 2 (or more) fields: I'm able to make a search
of 2 day and return results boosted by category field, like this:

&q=(date:[2017-06-16T00:00:00Z TO 2017-06-18T23:59:59Z]) 
&wt=jsonThis will return all documents of category 9500 first, and 1100 in after.Now
I would like to get this documents with a second boost based on another field, called source.I
would like to have documents in this order:1) category:9500 AND source:5
2) category:9500 AND source:9
3) category:9500 AND source:7
4) category:1100 AND source:5
5) category:1100 AND source:9
6) category:1100 AND source:7
To get this order, I tied with this query:?indent=on
&q=(date:[2017-06-16T00:00:00Z TO 2017-06-18T23:59:59Z]) 
&bq=category:9500^2+source:(5^3 OR 9^2 OR 7^1)
&bq=category:1100^1+source:(5^3 OR 9^2 OR 7^1)
How can I apply a double boosts to get the documents in my correct order? Is boost the correct
tool for my purpose?Any help will be greatly appreciated. Thanks
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message