lib/esse/backend/index/refresh.rb in esse-0.0.5 vs lib/esse/backend/index/refresh.rb in esse-0.1.1

- old
+ new

@@ -25,16 +25,16 @@ # # @note The refresh operation can adversely affect indexing throughput when used too frequently. # @param :suffix [String, nil] :suffix The index suffix. Defaults to the index_version. # A uniq index name will be generated if one index already exist with the given alias. # @param options [Hash] Options hash - # @return [Hash, false] the elasticsearch response, or false in case of failure + # @return [Hash] the elasticsearch response, or an hash with 'errors' as true in case of failure # # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html def refresh(suffix: index_version, **options) refresh!(suffix: suffix, **options) rescue Elasticsearch::Transport::Transport::ServerError - false + { 'errors' => true } end end include InstanceMethods end