I'm running ES 1.7.1 on found, accessing it via the Java client (1.7.1).
I've found that the order of the types I define in the query changes the results. For instance, if I use types 'a,b,c', I get different results from 'b,c,a'. E.g.
This is the query I used:
{
"from" : 0,
"size" : 28,
"query" : {
"filtered" : {
"query" : {
"bool" : {
"should" : {
"multi_match" : {
"query" : "alan",
"fields" : [ "name^2", "nickName^2", "role^1.5", "localization" ],
"fuzziness" : "AUTO"
}
}
}
},
"filter" : {
"bool" : {
"must" : [ {
"type" : {
"value" : "person"
}
}, {
"range" : {
"createdOn" : {
"from" : null,
"to" : 1450291614644,
"include_lower" : true,
"include_upper" : true
}
}
}, {
"missing" : {
"field" : "deletedOn"
}
} ]
}
}
}
}
}
If I run GET ciandt-com/person,linkPost,post/_search
, I get one result, as expected:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 4.6976204,
"hits": [
{
"_index": "ciandt-com-20151216183428244",
"_type": "person",
"_id": "635181261",
"_score": 4.6976204,
"_source": {
"type": "person",
"avatar": {
"url": "https://lh5.googleusercontent.com/-qpD-rFV18pA/AAAAAAAAAAI/AAAAAAAAAr8/ZbnMNmGxH8w/photo.jpg"
},
"cover": {
"url": "https://lh5.googleusercontent.com/-qpD-rFV18pA/AAAAAAAAAAI/AAAAAAAAAr8/ZbnMNmGxH8w/photo.jpg"
},
"createdOn": "2015-12-16T18:04:34.173Z",
"email": "alanbk@ciandt.com",
"hashtags": [],
"id": 635181261,
"name": "Alan Kleiman",
"nickName": "mars",
"phone": "",
"title": "Alan Kleiman",
"universalId": "PersonProfile:alanbk@ciandt.com"
}
}
]
}
}
But if I run GET ciandt-com/linkPost,person,post/_search
:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
Am I missing something here?
Edit: Fussing with the query some more, I removed the type query, and this behavior disappeared. Should I just not use the type query?