# Filter on in elasticsearch-1.2.1 trigger the error below. How can i resolve this? i am new to elasticsearch

**URL:** https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944
**Category:** Elasticsearch
**Created:** [December 15, 2017, 9:59am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944 "2017-12-15T09:59:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Hein\_Htet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hein_htet/32/25543_2.png) [@Hein\_Htet](https://discuss.elastic.co/u/Hein_Htet)
#### Post date: [December 15, 2017, 9:59am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/1 "2017-12-15T09:59:39Z")

</div>

`[DEBUG][action.search.type] [Hobgoblin II] [product_catalogue][4], node[DKcHeBciTEmIBk6UsZuSTQ], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@79f7411] org.elasticsearch.search.SearchParseException: [product_catalogue][4]: query[ConstantScore(:)],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"match_all":[]},"filter":{"and":[{"geo_distance":{"distance":"20000miles","location":{"lat":"16.8390025","lon":"96.1522940"},"distance_type":"arc"}}]},"from":0,"size":52}]]`  
\</\>

---

<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: [December 15, 2017, 10:00am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/2 "2017-12-15T10:00:33Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Could you provide a full recreation script as described in

> [@About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21):
>
> The heart of the free and open Elastic Stack Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease. warning PLEASE READ THIS SECTION IF IT'S YOUR FIRST POST Some useful links: [elasticsearch reference guide](http://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)[elasticsearch user guide](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html)[elasticsearch plugins](https://www.elastic.co/guide/en/elasticsearch/plugins/current/index.html)[elasticsearch cl…](https://www.elastic.co/guide/en/elasticsearch/client/index.html)

It will help to better understand what you are doing.  
Please, try to keep the example as simple as possible.

Also 1.2.1 is so old that you should not use that.

---

<div class="post-metadata">

### Author: ![Hein\_Htet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hein_htet/32/25543_2.png) [@Hein\_Htet](https://discuss.elastic.co/u/Hein_Htet)
#### Post date: [December 15, 2017, 10:07am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/3 "2017-12-15T10:07:32Z")

</div>

As the format above, is it seems to be understandable for you? or still do i need to provide more information? If i make you guys confuse my apology cause i am new to the elastic search and encountering that problem recently and try to resolve this so hard. i even thought that would be translog corrupted error so i deleted the translog. However didn't solute the problem.

---

<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: [December 15, 2017, 10:24am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/4 "2017-12-15T10:24:35Z")

</div>

Could you provide a full recreation script as described in

> [@About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21):
>
> The heart of the free and open Elastic Stack Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease. warning PLEASE READ THIS SECTION IF IT'S YOUR FIRST POST Some useful links: [elasticsearch reference guide](http://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)[elasticsearch user guide](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html)[elasticsearch plugins](https://www.elastic.co/guide/en/elasticsearch/plugins/current/index.html)[elasticsearch cl…](https://www.elastic.co/guide/en/elasticsearch/client/index.html)

It will help to better understand what you are doing.  
Please, try to keep the example as simple as possible.

---

<div class="post-metadata">

### Author: ![Hein\_Htet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hein_htet/32/25543_2.png) [@Hein\_Htet](https://discuss.elastic.co/u/Hein_Htet)
#### Post date: [December 15, 2017, 10:28am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/5 "2017-12-15T10:28:33Z")

</div>

here is my document  
`{"query":{"match_all":[]},"filter":{"and":[{"geo_distance":{"distance":"20000miles","location":{"lat":16.8390025,"lon":96.152294},"distance_type":"arc"}}]},"from":0,"size":52}`  
also the elastic structure is seemingly correct.

---

<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: [December 15, 2017, 11:27am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/6 "2017-12-15T11:27:02Z")

</div>

We can’t reproduce without data.

That said, I’m not going to reproduce on à so old version. But I’d probably try on 6.1.

Why are you using a so old version?

---

<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: [December 15, 2017, 11:28am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/7 "2017-12-15T11:28:04Z")

</div>

Btw may be this Is wrong:

```
 20000miles
```

---

<div class="post-metadata">

### Author: ![Hein\_Htet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hein_htet/32/25543_2.png) [@Hein\_Htet](https://discuss.elastic.co/u/Hein_Htet)
#### Post date: [December 16, 2017, 8:06am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/8 "2017-12-16T08:06:41Z")

</div>

Thanks for your suggestion to move on to use newer version. However, the whole structure of the elastic is being setup long time ago so it might probably take a long time to rebuild on newer version so that consider it less piority to change newer version. But though, i am keen to learn newer version.

---

<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: [January 13, 2018, 8:06am UTC](https://discuss.elastic.co/t/filter-on-in-elasticsearch-1-2-1-trigger-the-error-below-how-can-i-resolve-this-i-am-new-to-elasticsearch/111944/9 "2018-01-13T08:06:42Z")

</div>

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