Skip to content

refresh param to bulk not working #614

@clintongormley

Description

@clintongormley

Passing refresh=true to the bulk command does not seem to have any effect.

# [Sat Jan  8 20:01:30 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XPUT 'http://127.0.0.1:9200/foo/'  -d '
{}
'

# [Sat Jan  8 20:01:30 2011] Response:
# {
#    "ok" : true,
#    "acknowledged" : true
# }

# [Sat Jan  8 20:01:34 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XPOST 'http://127.0.0.1:9200/_bulk?refresh=true'  -d '
{"index" : {"_index" : "foo", "_id" : 1, "_type" : "bar"}}
{"text" : "foo"}
{"index" : {"_index" : "foo", "_id" : 2, "_type" : "bar"}}
{"text" : "bar"}
'

# [Sat Jan  8 20:01:34 2011] Response:
# {"items" : [{"index" : {"ok" : true, "_index" : "foo", "_id" : "1
# > ", "_type" : "bar"}}, {"index" : {"ok" : true, "_index" : "foo"
# > , "_id" : "2", "_type" : "bar"}}]}

# [Sat Jan  8 20:01:34 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XGET 'http://127.0.0.1:9200/foo/_count'  -d '
{"match_all" : {}}'

# [Sat Jan  8 20:01:34 2011] Response:
# {"count" : 0, "_shards" : {"failed" : 0, "successful" : 5, "total
# > " : 5}}

I also tried setting index.refresh_interval: -1 and passing refresh=true as above, and the index doesn't refresh at all, until I pass it an actual /_refresh

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions