# Custom Elasticsearch queries without using script

**URL:** https://discuss.elastic.co/t/custom-elasticsearch-queries-without-using-script/347404
**Category:** Elasticsearch
**Created:** [November 17, 2023, 12:39pm UTC](https://discuss.elastic.co/t/custom-elasticsearch-queries-without-using-script/347404 "2023-11-17T12:39:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vickram](https://avatars.discourse-cdn.com/v4/letter/v/b782af/32.png) [@vickram](https://discuss.elastic.co/u/vickram)
#### Post date: [November 17, 2023, 12:39pm UTC](https://discuss.elastic.co/t/custom-elasticsearch-queries-without-using-script/347404/1 "2023-11-17T12:39:40Z")

</div>

{"publishDate":"2023-08-06T10:34:00Z","data":{"evalFrequency":"3"}}

Above is the sample data that I have in Elasticsearch, where I am struggling to find the right query to get results on the basis of the below condition without scripting.  
Here evalFrequency represents the month, where I want the records whose  
publishDate+(evalFrequency) between the week range, and the week start end range should be an external parameter.

---

<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: [December 15, 2023, 12:40pm UTC](https://discuss.elastic.co/t/custom-elasticsearch-queries-without-using-script/347404/2 "2023-12-15T12:40:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
