My documents look like below,
{
"took": 22,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 88096,
"max_score": 1,
"hits": [
{
"_index": "elasticray_20155",
"_type": "documents",
"_id": "thread_1",
"_score": 1,
"_source": {
"entryClassPK": "thread_1",
"entryClassName": "MBThread",
}
},
{
"_index": "elasticray_20155",
"_type": "documents",
"_id": "thread_2",
"_score": 1,
"_source": {
"entryClassPK": "thread_2",
"entryClassName": "MBThread",
}
},
{
"_index": "liferay_elasticray_20155",
"_type": "documents",
"_id": "message_1",
"_score": 1,
"_source": {
"entryClassPK": "message_1",
"entryClassName": "MBMessage",
"title":"test message aaa",
"threadID":"thread_1"
}
},
{
"_index": "liferay_elasticray_20155",
"_type": "documents",
"_id": "message_2",
"_score": 1,
"_source": {
"entryClassPK": "message_2",
"entryClassName": "MBMessage",
"title":"test message bbb",
"threadID":"thread_2"
}
},
{
"_index": "liferay_elasticray_20155",
"_type": "documents",
"_id": "message_3",
"_score": 1,
"_source": {
"entryClassPK": "message_3",
"entryClassName": "MBMessage",
"title":"test message ccc",
"threadID":"thread_1"
}
}
]
}
}
I want to search in title where entryClassName is MBMessage,
But in return i need the set of documents where entryClassName is MBThread +(entryClassPK == threadID results of search)
is it possible ?