Re[2]: Sort hits in the order of subqueries

2018-06-07 Thread Robert K .
Hello, I had a look at the Constant Score approach suggested by Emir: (q0^=100) OR (q1)^=90 ... As observed by Alexandre it seems to introduce stratification at the cost of the intra-query ranking which is not satisfactory. So if I imagine Constant Score as a function f(x) = C operating on a d

Re: Sort hits in the order of subqueries

2018-06-07 Thread Alexandre Rafalovitch
I think this solution will destroy intra-query ranking. So all results in q0 come before q1 but would be random within q0 results. Would instead just a bunch of boost queries with different weights (additive probably) be a beter way to introduce stratification? Regards, Alex On Thu, Jun 7, 20

Re: Sort hits in the order of subqueries

2018-06-07 Thread Emir Arnautović
Hi Robert, If I get your requirement right, you can solve it with following: (q0)^=100 OR (q1)^=90…. Assuming there are no overlaps - otherwise, one matching multiple conditions can change the ordering. HTH, Emir -- Monitoring - Log Management - Alerting - Anomaly Detection Solr & Elasticsearch

Sort hits in the order of subqueries

2018-06-07 Thread Robert K .
Hello, I am investigating the following use case. Suppose I have a list of queries q_0, q_1, ..., q_n which I combine to a boolean query using 'SHOULD'-clauses. The requirement for the hits sorting is that the results of q_0 precede the results of q_1, the results of q_1 precede the results of