Hi,
I have a query like this:
$params['body'] = array(
'query' => array(
'filtered' => array(
'query' => array(
'function_score' => array(
'script_score' => array(
'script' => '_score + (0.001 *
doc["compraram"].value) + (0.001 * doc["clicks"].value)',
'lang' => 'groovy'
),
'boost_mode' => 'replace',
'query' => array(
'multi_match' => array(
'query' =>
substr($where['busca'],0,432),
'type' => 'best_fields',
'fields' =>
array("nome^1.3","sku^1.1","nome.ng^1.1","nome.ed^1.05","EcommerceBusca.keywords^1.005","keywords^1.0025"),
"minimum_should_match" => "99%",
'operator' => 'or',
)
)
)
),
'filter' => array(
'bool' => array(
'must' => array(
array('term' => array('ativo' => 1)),
array('term' => array('oculto' => 0)),
array('term' => array('id_instancia' =>
$this->instancia)),
),
),
),
)
),
);
But i only want to multiply the score of the field "nome" with the fields
doc["compraram"].value and doc["clicks"].value, not the entiry score.
How can I do it?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2ba35496-0c62-4cf5-892b-03f604a6e484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.