def query_delete(query)
      @dir.synchronize do
        ensure_writer_open()
        ensure_searcher_open()
        query = do_process_query(query)
        @searcher.search_each(query, :limit => :all) do |doc, score|
          @reader.delete(doc)
        end
        flush() if @auto_flush
      end
    end
def query_delete(query)
      @dir.synchronize do
        ensure_writer_open()
        ensure_searcher_open()
        query = do_process_query(query)
        @searcher.search_each(query, :limit => :all) do |doc, score|
          @reader.delete(doc)
        end
        flush() if @auto_flush
      end
    end
Delete all documents returned by the query.

 query:: The query to find documents you wish to delete. Can either be a
         string (in which case it is parsed by the standard query parser)
         or an actual query object.