Commit 9918cfda authored by Jonas Waeber's avatar Jonas Waeber
Browse files

move query util script to folder

parent 8bdfcac3
{
"script": {
"source": "for (item in ctx._source.access) { if (item.name.it[0] == 'Nel local') { item.name.it = params.name } }",
"lang": "painless",
"params": {
"name": ["Sul posto"]
}
},
"query": {
"term": {
"access.name.it.filter": "Nel local"
}
}
}
{
"query": {
"term": {
"recordSet.facet": "bar-001"
}
},
"script": {
"params" : {
"institution": [
{
"facet" : [],
"filter" : "csa",
"name" : {
"de" : ["Cinémathèque suisse"],
"fr" : ["Cinémathèque suisse"],
"it" : ["Cinémathèque suisse"], "un" : []}},
{
"facet" : [], "filter" : "bar",
"name" : {
"de" : ["Schweizerisches Bundesarchiv"],
"fr" : ["Archives fédérales suisses"],
"it" : ["Archivio federale svizero"],
"un" : []}
}
]
},
"source" : "ctx._source['institution'] = params.institution"
}}
curl -X POST -H 'Content-Type: application/json' -d "@query.json" "localhost:8080/documents-v21/_update_by_query"
\ No newline at end of file
curl -X POST -H 'Content-Type: application/json' -d "@query.json" "localhost:8080/documents-v21/_update_by_query"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment