Skip to content

Instantly share code, notes, and snippets.

@firecentaur
Created May 27, 2020 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save firecentaur/156fbca6a5c17cf1baf82597910f8af9 to your computer and use it in GitHub Desktop.
Save firecentaur/156fbca6a5c17cf1baf82597910f8af9 to your computer and use it in GitHub Desktop.
{
"query": {
"nested": {
"path": "subtitles",
"query": {
"bool": {
"must": {
"match_phrase": {
"subtitles.content": "pretty good"
}
},
"filter": [
{
"term": {
"subtitles.video_parent_type": "group"
}
},
{
"term": {
"subtitles.video_parent_id": 9
}
}
]
}
},
"inner_hits": {
"size": 50,
"highlight": {
"nested": {
"size": 50,
"path": "subtitles",
"pre_tags": [
""
],
"post_tags": [
"<\/span>"
],
"fields": {
"subtitles.content": {}
}
}
}
}
}
},
"_source": [
"id",
"uid",
"name",
"vid_url",
"parent_id",
"parent_type",
"source_id",
"subtitles.*",
"tags.*",
"flag",
"cefr",
"duration",
"channelId",
"channelName",
"youtube_published_at",
"update_time",
"publishedAt",
"vidid"
],
"from": 0,
"size": 50,
"sort": {
"id": "desc"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment