# Search query is taking long time to give results

**URL:** <https://discuss.elastic.co/t/search-query-is-taking-long-time-to-give-results/47947>\
**Category:** Elasticsearch\
**Created:** [April 20, 2016, 6:41pm UTC](https://discuss.elastic.co/t/search-query-is-taking-long-time-to-give-results/47947 "2016-04-20T18:41:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [April 20, 2016, 6:41pm UTC](https://discuss.elastic.co/t/search-query-is-taking-long-time-to-give-results/47947/1 "2016-04-20T18:41:57Z")

</div>

Hi,  
i indexed around 60 GB of logfiles using logstash.  
i used the below filtered query to get results. it is taking more than 3mins to get back the results. the result set is also not a big list, a count of 40.  
i made the fields "not analysed" to gain some indexing space. will it be a real problem or do i have to improve the query? please suggest.  
{  
"query" : {  
"filtered": {  
"query": { "regexp": { "msg\_ext": "._testing Version:._(ABC._) duil._" }},  
"filter": {  
"bool": {  
"must" : [  
{  
"regexp" : {  
"path" : {  
"value" : "._BONCAT._",  
"flags\_value" : 65535  
}  
}  
}  
]  
}  
}  
}  
}  
}

thanks

---

<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 5, 2017, 10:57pm UTC](https://discuss.elastic.co/t/search-query-is-taking-long-time-to-give-results/47947/2 "2017-07-05T22:57:34Z")

</div>


