Reputation: 557
I have been stucked in a scenario and not getting any proper solution. Here is the problem i am facing with Elasticsearch. Any help would be appriciated.
So need your help in this to find a solution. Thank you.
Upvotes: 0
Views: 92
Reputation: 263
Since ES is nonSQL, you won't get the relational searching feature. You have a few ways you can resolve this:
es.get(index="Video", id=video_id, _source_includes=["video_ description", "video_description"])
and one to get the subtitles es.search(index="Subtitles", body={"query": {"match": {"video_id.keyword": video_id}}})["hits"]["hits"]
. This was you will get video title, description and its subtitle. FYI, _source_includes
will only return those fields, this will give better performance in case document is large.PS: I am not sure what you are working on for which you required this but I would personally prefer the second way since trying to make the tables relational will end up costing performance.
Upvotes: 1