lib/redisearch.rb
# Deletes all documents matching the query
#
# @param [String] query in the same format as used in `search`
# @param [Hash] opts options for the query, same  as in `search`
# @return [int] count of documents deleted
Deletes all documents matching the query
Deletes all documents matching the query
def delete_by_query(query, opts = {})
    call(ft_search(query, opts.merge(nocontent: true)))[1..-1].map do |doc_id|
      call(ft_del(doc_id, opts))
    end.sum
  end
def delete_by_query ( query , opts = { } ) call ( ft_search ( query , opts . merge ( nocontent : true ) ) ) [ 1 .. - 1 ] . map do | doc_id | call ( ft_del ( doc_id , opts ) ) end . sum end
Deletes all documents matching the query
Deletes all documents matching the query
count of documents deleted
count of documents deleted
int
query
opts
opts options for the query, same as in `search`
opts options for the query same as in ` search `