...
Code Block | ||
---|---|---|
| ||
DOMAIN=domain-for-versioning && curl -s "$ESIP:9200/$ESINDEX/_search?q=stype:DOMAIN+AND+name:$DOMAIN&pretty" | jq -r '.hits.hits[]._source.etag' |
Get Bucket id (context id)
from Swarm by domain name
...
You can remove the
name:domain-for-versioning
if you know the bucket name is unique among domains. You can leave it off if you aren't sure but might get multiple results to sort through.
Stream count
...
by
...
bucket (
...
context id)
Code Block | ||
---|---|---|
| ||
CONTEXTID=<contextid> && curl -s -XPOST -H "Content-Type: application/json" --data-binary '{"query":{"bool":{"must":[{"match":{"contextid":"'"$CONTEXTID"'"}}]}}}' "$ESIP:9200/$ESINDEX/_search?pretty&q=contextid:$CONTEXTIDcount" | jq '.count' |
Stream count by Domain (domain id)
Code Block | ||
---|---|---|
| ||
DOMAINID=<domainid> && curl -s -XPOST -H "Content-Type: application/json" --data-binary '{"query":{"bool":{"must":[{"match":{"domainid":"'"$DOMAINID"'"}}]}}}' "$ESIP:9200/$ESINDEX/_count" | jq '.hits.total.valuecount' |