Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "mapping": {
- "properties": {
- "id": {
- "type": "String",
- "index": "not_analyzed"
- },
- "tags": {
- "type": "nested",
- "properties": {
- "id": {
- "type": "String",
- "index": "not_analyzed"
- },
- "tag_value": {
- "type": "nested",
- "properties": {
- "tagId": {
- "type": "String",
- "index": "not_analyzed"
- },
- "label": {
- "type": "String",
- "index": "not_analyzed"
- }
- }
- }
- }
- }
- }
- }
- }
- {
- "_source": {
- "includes": [
- "id"
- ]
- },
- "query": {
- "bool": {
- "filter": [
- {
- "ids": {
- "values": [
- "021a9586-82de-4cbd-a651-e0b403d2b6da",
- "fee6e022-442d-419f-943f-ad2859013330"
- ]
- }
- },
- {
- "nested": {
- "path": "tags",
- "query": {
- "bool": {
- "must": [
- {
- "term": {
- "id": "xyz"
- }
- },
- {
- "nested": {
- "path": "tags.tag_value",
- "query": {
- "bool": {
- "must": [
- {
- "terms": {
- "tags.tag_value.tagId": [
- "english",
- "portugese"
- ]
- }
- }
- ]
- }
- },
- "inner_hits": {
- "size": 4,
- "_source": {
- "includes": [
- "tagId",
- "label"
- ]
- }
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement