These are only 3 documents in my index
</>
"hits": [
{
"_index": "test_index",
"_type": "relationship",
"_id": "AWly5Q6mfOHUG_jfP5e8",
"_score": 1,
"_source": {
"fromEntityId": "a323dd-d43de-d43d3d4-d4334",
"toEntityId": "12345",
"score": 1
}
},
{
"_index": "test_index",
"_type": "relationship",
"_id": "AWly5Q6mfOHUG_jfP5e9",
"_score": 1,
"_source": {
"fromEntityId": "a323dd-48534-d43d3d4-hd4738f",
"toEntityId": "123455",
"score": 2
}
},
{
"_index": "test_index",
"_type": "relationship",
"_id": "AWly5Q6nfOHUG_jfP5e-",
"_score": 1,
"_source": {
"fromEntityId": "784hd4-48534-784d43-hd4738f",
"toEntityId": "1234556",
"score": 3
}
}
]
When i analyze this text [2 whole keys space separated]
{
"text" : "784hd4-48534-784d43-hd4738f a323dd-48534-d43d3d4-hd4738f",
"analyzer" : "whitespace"
}
I get these tokens which is okay
{
"token": "784hd4-48534-784d43-hd4738f",
"start_offset": 0,
"end_offset": 27,
"type": "word",
"position": 0
},
{
"token": "a323dd-48534-d43d3d4-hd4738f",
"start_offset": 28,
"end_offset": 56,
"type": "word",
"position": 1
}
But in multi match search result i get nothing
</>
{
"query" : {
"multi_match" : {
"query" : "784hd4-48534-784d43-hd4738f 323dd-48534-d43d3d4-hd4738f",
"analyzer" : "whitespace",
"fields" : [ "fromEntityId" , "toEntityId" ],
"operator" : "or"
}
}
}
"hits": [ ]
This should return both those documents. Please help