elasticsearch-ruby

Is there a way to set a score range (or a max score) for a query

天大地大妈咪最大 提交于 2020-08-09 14:56:52
问题 I have a very simple query : match: { field => { boost: 4, query: term, fuzziness: 'AUTO', } } Composed with several (about 10) others queries most of them using constant_score. The problem is that on specific terms, my query has a too big score that cancel all others queries results. Here is a part of the explain : "details" => [ [0] { "value" => 63.656006, "description" => "sum of:", "details" => [ [0] { "value" => 63.656006, "description" => "weight(title.de:kandinsky in 1694239)

Is there a way to set a score range (or a max score) for a query

杀马特。学长 韩版系。学妹 提交于 2020-08-09 14:56:46
问题 I have a very simple query : match: { field => { boost: 4, query: term, fuzziness: 'AUTO', } } Composed with several (about 10) others queries most of them using constant_score. The problem is that on specific terms, my query has a too big score that cancel all others queries results. Here is a part of the explain : "details" => [ [0] { "value" => 63.656006, "description" => "sum of:", "details" => [ [0] { "value" => 63.656006, "description" => "weight(title.de:kandinsky in 1694239)

ElasticSearch Nested Query - exclude parent document

∥☆過路亽.° 提交于 2019-12-11 02:27:52
问题 Trying to exclude top-level documents where one of the child documents doesn't match the query. For the example below, I'm trying to exclude all documents where one of its nested jobs has current: true , and matches with the company name: Elastic . But since one of the nested job documents matches with current: false and company name: Elastic , this document is returned. I am using a nested query with a must match on company name and a filter where current: false. How can I make it so that