v0.6.0
Added
-
An
existsfilter.field("name").exists()matches the documents which have the field,
irrespective of its value;field("name").exists().not()matches those which do not.A field explicitly set to
Value::Nullis present and matches. This is the case no existing
filter could express:eq(Value::Null)andne(Value::Null)cannot tell a missing field apart
from one holding null, so "has this document been given a value for this field at all" was not
answerable.The filter reports
has_field() == falseand so is never elected for an index scan. A missing
field and a field holding null are stored under the same null key in an index, so an index scan
could not tell them apart and would disagree with a full scan.get_field_name()still returns
the name.Embedded fields are addressed by their dotted path (
field("address.city").exists()), the same
wayDocument::contains_fieldresolves them.