# Question about \_score metrics

**URL:** <https://discuss.elastic.co/t/question-about--score-metrics/22921>\
**Category:** Elasticsearch\
**Created:** [March 26, 2015, 1:28pm UTC](https://discuss.elastic.co/t/question-about--score-metrics/22921 "2015-03-26T13:28:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joao\_Lima](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@Joao\_Lima](https://discuss.elastic.co/u/Joao_Lima)\
**Post date:** [March 26, 2015, 1:28pm UTC](https://discuss.elastic.co/t/question-about--score-metrics/22921/1 "2015-03-26T13:28:30Z")

</div>

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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/2ba35496-0c62-4cf5-892b-03f604a6e484%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:23am UTC](https://discuss.elastic.co/t/question-about--score-metrics/22921/2 "2017-07-06T00:23:43Z")

</div>


