diff --git a/lib/esse/document.rb b/lib/esse/document.rb index 9c3327a..53318a3 100644 --- a/lib/esse/document.rb +++ b/lib/esse/document.rb @@ -85,11 +85,11 @@ def ignore_on_delete? end def eql?(other, match_lazy_doc_header: false) - if match_lazy_doc_header && other.is_a?(LazyDocumentHeader) + if match_lazy_doc_header other.eql?(self) else other.is_a?(Esse::Document) && ( - id.to_s == other.id.to_s && type == other.type && routing == other.routing && meta == other.meta && source == other.source + id.to_s == other.id.to_s && type == other.type && routing == other.routing && meta == other.meta ) end end