# Elasticsearch hangs on? Invalid results

**URL:** <https://discuss.elastic.co/t/elasticsearch-hangs-on-invalid-results/35252>\
**Category:** Elasticsearch\
**Created:** [November 22, 2015, 10:17pm UTC](https://discuss.elastic.co/t/elasticsearch-hangs-on-invalid-results/35252 "2015-11-22T22:17:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaKro](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MaKro](https://discuss.elastic.co/u/MaKro)\
**Post date:** [November 22, 2015, 10:17pm UTC](https://discuss.elastic.co/t/elasticsearch-hangs-on-invalid-results/35252/1 "2015-11-22T22:17:04Z")

</div>

Hi.

Example query:

> {  
> "from" : 0,  
> "size" : 50,  
> "query" : {  
> "bool" : {  
> "must" : {  
> "bool" : {  
> "should" : [ {  
> "match" : {  
> "prop1" : {  
> "query" : "/value1/path",  
> "type" : "phrase\_prefix"  
> }  
> }  
> }, {  
> "match" : {  
> "prop1" : {  
> "query" : "/value2/path",  
> "type" : "phrase\_prefix"  
> }  
> }  
> } ],  
> "minimum\_should\_match" : "1"  
> }  
> }  
> }  
> },  
> "sort" : [ {  
> "created" : {  
> "order" : "desc",  
> "missing" : "\_last"  
> }  
> } ]  
> }

This is my document:

> {  
> "\_index" : "indexName",  
> "\_type" : "docs",  
> "\_id" : "randomId",  
> "\_score" : 1.0,  
> "\_source":{"documentId":"randomId","name":"name","extension":"jpg","prop1":"/value2/path/myPath","created":1438762887487, "width":900,"height":1226}  
> }

Mapping for field prop1:

> ```
> "prop1": {
> "type": "string",
> "include_in_all": true,
> "index": "not_analyzed"
> }
> 
> ```

I have an index with some data, lets say there is ~70k documents.  
I'm quering that index with Java API,  
I have a problem with my query, because for some values it doesn't work, and for some values it works properly.  
For example when prop1 has value with prefix /something/new - my query is working. If value is set to /something/old, then the query is not working.  
I can find documents which got prop1 with value /something/old by searching for them with different property, for example width, so I'm sure that those documents are present in the index. Of course I get the prop1 with proper value.

I tried to run that query from the command line but I have the same issue.  
What is strange is that, from time to time that query just stops working for different values. I have no idea what is going on, mapping is the same for all values

My ES setup is a cluster which is built from three different machines.

Any ideas what can be wrong?

---

<div class="post-metadata">

**Author:** ![MaKro](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MaKro](https://discuss.elastic.co/u/MaKro)\
**Post date:** [November 24, 2015, 10:19am UTC](https://discuss.elastic.co/t/elasticsearch-hangs-on-invalid-results/35252/2 "2015-11-24T10:19:25Z")

</div>

Nobody can suggest anything? It's very strange for me that such behaviour can even occur,

---

<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, 11:36pm UTC](https://discuss.elastic.co/t/elasticsearch-hangs-on-invalid-results/35252/3 "2017-07-05T23:36:21Z")

</div>


