karmi/tire — Issue #146: Add "flush" command
Author: raff
Created: 2011-11-11 01:17:40+00:00
State: open

Could it be possible to add the "flush" command to index ? I just "copied" the code from "refresh" in lib/tire/index.rb and changed the command to flush / _flush, like this:

def flush
@response = Configuration.client.post "#{Configuration.url}/#{@name}/_flush", ''

ensure
curl = %Q|curl -X POST "#{Configuration.url}/#{@name}/_flush"|
logged('_refresh', curl)
end