Skip to content

Instantly share code, notes, and snippets.

@odinuv
Last active April 27, 2017 13:15
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 odinuv/19d9ab28085798732bf1da10bdaac00a to your computer and use it in GitHub Desktop.
Save odinuv/19d9ab28085798732bf1da10bdaac00a to your computer and use it in GitHub Desktop.
{
"parameters": {
"api": {
"authentication": {
"type": "basic"
},
"baseUrl": "https://yourElastisearchHost.com",
"pagination": {
"method": "response.param",
"responseParam": "_scroll_id",
"queryParam": "scroll_id",
"scrollRequest": {
"endpoint": "_search/scroll",
"method": "GET",
"params": {
"scroll": "1m"
}
}
}
},
"config": {
"outputBucket": "sapi-elasticsearch",
"debug": true,
"username": "YOUR_ELASTICSEARCH_USERNAME",
"#password": "YOUR_ELASTICSEARCH_PASSWORD",
"jobs": [{
"endpoint": "/kbc-files-*/_search?search_type=scan&scroll=1m",
"params": {
"query": {
"filtered": {
"query": {
"match_all": []
},
"filter": {
"bool": {
"must": [{
"range": {
"created": {
"from": "now-48h"
}
}
}]
}
}
}
},
"partial_fields": {
"file": {
"include": [
"id",
"projectId",
"token.id",
"token.name",
"s3Path",
"name",
"uploadType",
"created",
"runId",
"isSliced",
"sizeBytes",
"isPublic",
"isEncrypted",
"tags",
"maxAgeDays",
"export.tableId"
]
}
},
"size": 10000
},
"dataField": "hits.hits",
"dataType": "files",
"method": "POST"
}]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment