Elasticsearch hangs on? Invalid results


(Marek K) #1

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?


(Marek K) #2

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


(system) #3