Zie:
Hoe kan ik de achterliggende _msearch uitlezen via Invantive UniversalSQL en dan massaal alle documenten in een periode oppakken ter voeding van Claude AI?
De payload voor POST naar _msearch op https://api.openraadsinformatie.nl/v1/elastic/*/_msearch is:
{"preference":"ResultList01"}
{
"query": {
"bool": {
"must": [
{
"bool": {
"must": [
{
"bool": {
"must": [
{
"simple_query_string": {
"fields": [
"text",
"title",
"description",
"name"
],
"default_operator": "OR",
"query": "\"Ede\""
}
},
{
"terms": {
"_index": [
"ori_*",
"osi_*",
"owi_*"
]
}
},
{
"term": {
"@type": "MediaObject"
}
}
],
"must_not": [
{
"match": {
"@type": "Membership"
}
}
]
}
},
{
"bool": {
"should": [
{
"terms": {
"_index": [
"ori_ede_20250412110204"
]
}
}
]
}
},
{
"range": {
"last_discussed_at": {
"gte": "2025-01-01T00:00:00",
"lte": "2027-03-01T00:00:00",
"boost": 2
}
}
}
]
}
}
]
}
},
"highlight": {
"pre_tags": [
"<mark>"
],
"post_tags": [
"</mark>"
],
"fields": {
"text": {},
"title": {},
"name": {},
"description": {}
},
"fragment_size": 100,
"number_of_fragments": 3
},
"size": 20,
"_source": {
"includes": [
"*"
],
"excludes": []
},
"aggs": {
"_index": {
"terms": {
"field": "_index",
"size": 500,
"order": {
"_count": "desc"
}
}
}
},
"from": 0,
"sort": [
{
"last_discussed_at": {
"order": "desc"
}
}
]
}
met een antwoord zoals:
{
"took": 13,
"responses": [
{
"took": 13,
"timed_out": false,
"_shards": {
"total": 331,
"successful": 331,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 10000,
"relation": "gte"
},
"max_score": null,
"hits": []
},
"aggregations": {
"tags.http://www.w3.org/1999/02/22-rdf-syntax-ns#_8.https://argu.co/ns/meeting/tag.keyword": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
},
"status": 200
}
]
}