# Slow Custom score query

**URL:** <https://discuss.elastic.co/t/slow-custom-score-query/3872>\
**Category:** Elasticsearch\
**Created:** [February 3, 2011, 11:45am UTC](https://discuss.elastic.co/t/slow-custom-score-query/3872 "2011-02-03T11:45:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ariel\_Amato](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Ariel\_Amato](https://discuss.elastic.co/u/Ariel_Amato)\
**Post date:** [February 3, 2011, 11:45am UTC](https://discuss.elastic.co/t/slow-custom-score-query/3872/1 "2011-02-03T11:45:04Z")

</div>

Hi All,  
I'm using ElasticSearch to search through a dataset of around 1.2M records, with 25 fields each.  
When I do a simple query, by 5/6 terms, almost instantly.  
My problems start when I try to add a custom score to the same query, with a simple script like: "(1/(time - doc['time\_field'].value)) \* \_score" , the request now takes around 5-10 seconds to complete.  
Is it normal for the custom score query to take that long?  
I'm running ElasticSearch on a dual core system, with 8gb of memory.

Thanks in advance,  
Best Regards  
Ariel

---

<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, 4:12am UTC](https://discuss.elastic.co/t/slow-custom-score-query/3872/2 "2017-07-06T04:12:44Z")

</div>


