Hello, I have these index:
{
"my_collection_data": {
"mappings": {
"document_data_index": {
"properties": {
"abstract": {
"type": "keyword"
},
"bibliographic_citation": {
"type": "keyword"
},
"contributor": {
"type": "keyword"
},
"datasets": {
"type": "nested",
"properties": {
"identifier": {
"type": "keyword"
},
"keywords": {
"type": "keyword"
},
"title": {
"type": "keyword"
}
}
},
"date_available": {
"type": "date"
},
"date_created": {
"type": "date"
},
"doc_format": {
"type": "keyword"
},
"file": {
"type": "keyword"
},
"identifier": {
"type": "keyword"
},
"license": {
"type": "keyword"
},
"subject": {
"type": "keyword"
},
"title": {
"type": "keyword"
}
}
}
}
}
}
I need to get all documents
with datasets=XXXX
, so I tried these query:
{
"from": 0,
"size": 10,
"query": {
"match_all": {
"boost": 1
}
},
"post_filter": {
"terms": {
"datasets": [
"Tidbits"
],
"boost": 1
}
},
"_source": {
"includes": [],
"excludes": []
},
"aggregations": {
"_filter_datasets": {
"filter": {
"match_all": {
"boost": 1
}
},
"aggregations": {
"datasets": {
"terms": {
"field": "datasets",
"size": 999,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_term": "asc"
}
]
}
}
}
}
},
"highlight": {
"fields": {
"*": {}
}
}
}
It doesn't return any record...
What I'm doing wrong here?
regards