I have two indexes my first index test file is as follow:
{
"took": 31,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 259636,
"max_score": 0.012848643,
"hits": [
{
"_index": "test",
"_type": "testtype",
"_id": "AV0TAUuCWj5Ta51I8M6S",
"_score": 0.012848643,
"_source": {
"resource": "a6fa3184-3845-475e-b87b-866a92edae0c",
"cookie_user": "9e3f8294-b0b8-89b2-55c6-94ec49bb2322",
"user": "ffffffff-ffff-ffff-ffff-ffffffffffff"
}
}
}
My second index resources file is as follow
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 84796,
"max_score": 1,
"hits": [
{
"_index": "resources",
"_type": "resourcestype",
"_id": "AV0SrP_Sa_bOoMdWCF42",
"_score": 1,
"_source": {
"haseditor": [
"equipo didactalia"
],
"hasnumeroComentarios": [
"0"
],
"ID": "a6fa3184-3845-475e-b87b-866a92edae0c",
"hasTituloDesc": [
" is there a relationship between tempo and genre "
],
"haspublicador": [
"consultor2 gnoss"
]
}
}
}
The resource field of test index document is same as ID field of resources index document.
I want to write a query to find all fields of both index documents having resource value "a6fa3184-3845-475e-b87b-866a92edae0c" of test document equal to ID value of resources document. Your help is highly appreciated.