i trying user bulk insert ttl value not it. here curl request doing.
all trying insert values has ttl. tell me doing wrong. not find example usage this.
curl -xpost 'http://10.9.8.7:9200/_bulk?_ttl=1&op_type=create' -d '{"index": {"_type": "numbers", "_index": "index"}} {"name": 1, "number": 1} {"index": {"_type": "numbers", "_index": "index"}} {"name": 2, "number": 2} {"index": {"_type": "numbers", "_index": "index"}} {"name": 3, "number": 3} {"index": {"_type": "numbers", "_index": "index"}} {"name": 4, "number": 4}
what's error/response? did enable ttl in mapping?
default off according this: http://www.elasticsearch.org/guide/reference/mapping/ttl-field/ also, can set default ttl in mapping.
and according http://www.elasticsearch.org/guide/reference/api/bulk/, ttl should go in body , not url.
Comments
Post a Comment