# Street Number Range Search

**URL:** <https://discuss.elastic.co/t/street-number-range-search/119310>\
**Category:** Elasticsearch\
**Created:** [February 9, 2018, 10:06pm UTC](https://discuss.elastic.co/t/street-number-range-search/119310 "2018-02-09T22:06:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![code\_blue](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@code\_blue](https://discuss.elastic.co/u/code_blue)\
**Post date:** [February 9, 2018, 10:06pm UTC](https://discuss.elastic.co/t/street-number-range-search/119310/1 "2018-02-09T22:06:32Z")

</div>

We have two fields Street Number 1 & Street Number 2 in Elastic Search. We also have an Address field in Elastic Search and Address is a combination of 2 fields with some other fields. So we have an address as:

- 1604-1612 Calver Building
- 1608- 1645 Park House

If the user is searching with 1610 both the address should be returned.

Any help of how the query should be formed?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 10, 2018, 7:23am UTC](https://discuss.elastic.co/t/street-number-range-search/119310/2 "2018-02-10T07:23:49Z")

</div>

So a range query on the first number and a range query on the second number all wrapped in a bool query inside the filter clause?

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [February 10, 2018, 7:25am UTC](https://discuss.elastic.co/t/street-number-range-search/119310/3 "2018-02-10T07:25:52Z")

</div>

I didn't see this was cross-posted but an answer is available here:

> <https://stackoverflow.com/questions/48716910/elastic-search-street-range-search/48717296#48717296>

---

<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:** [March 10, 2018, 7:25am UTC](https://discuss.elastic.co/t/street-number-range-search/119310/4 "2018-03-10T07:25:54Z")

</div>

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