public sealed class ExistenceFilter : IMessage<ExistenceFilter>, IEquatable<ExistenceFilter>, IDeepCloneable<ExistenceFilter>, IBufferMessage, IMessage
Reference documentation and code samples for the Firestore v1 API class ExistenceFilter.
A digest of all the documents that match a given target.
The total count of documents that match
[target_id][google.firestore.v1.ExistenceFilter.target_id].
If different from the count of documents in the client that match, the
client must manually determine which documents no longer match the target.
The client can use the unchanged_names bloom filter to assist with
this determination by testing ALL the document names against the filter;
if the document name is NOT in the filter, it means the document no
longer matches the target.
A bloom filter that, despite its name, contains the UTF-8 byte encodings of
the resource names of ALL the documents that match
[target_id][google.firestore.v1.ExistenceFilter.target_id], in the form
projects/{project_id}/databases/{database_id}/documents/{document_path}.
This bloom filter may be omitted at the server's discretion, such as if it
is deemed that the client will not make use of it or if it is too
computationally expensive to calculate or transmit. Clients must gracefully
handle this field being absent by falling back to the logic used before
this field existed; that is, re-add the target without a resume token to
figure out which documents in the client's cache are out of sync.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eExistenceFilter\u003c/code\u003e class is part of the Firestore v1 API and provides a digest of documents matching a specific target.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, which help with serialization, equality checks, deep cloning, and buffering of the message.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExistenceFilter\u003c/code\u003e includes properties like \u003ccode\u003eCount\u003c/code\u003e, \u003ccode\u003eTargetId\u003c/code\u003e, and \u003ccode\u003eUnchangedNames\u003c/code\u003e, where the \u003ccode\u003eCount\u003c/code\u003e property represents the number of documents that match the \u003ccode\u003eTargetId\u003c/code\u003e, and \u003ccode\u003eUnchangedNames\u003c/code\u003e is a bloom filter containing resource names of all documents that match the target.\u003c/p\u003e\n"],["\u003cp\u003eThere are 14 versions of \u003ccode\u003eExistenceFilter\u003c/code\u003e, ranging from 2.3.0 to 3.10.0, with the latest being 3.10.0, as part of the \u003ccode\u003eGoogle.Cloud.Firestore.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"]]],[],null,["# Firestore v1 API - Class ExistenceFilter (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.9.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.8.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.7.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.6.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.5.1/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.4.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.3.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.2.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.1.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.0.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.5.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.4.0/Google.Cloud.Firestore.V1.ExistenceFilter)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.3.0/Google.Cloud.Firestore.V1.ExistenceFilter) \n\n public sealed class ExistenceFilter : IMessage\u003cExistenceFilter\u003e, IEquatable\u003cExistenceFilter\u003e, IDeepCloneable\u003cExistenceFilter\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Firestore v1 API class ExistenceFilter.\n\nA digest of all the documents that match a given target. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ExistenceFilter \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ExistenceFilter](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.ExistenceFilter), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ExistenceFilter](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.ExistenceFilter), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ExistenceFilter](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.ExistenceFilter), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Firestore.V1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.V1.dll\n\nConstructors\n------------\n\n### ExistenceFilter()\n\n public ExistenceFilter()\n\n### ExistenceFilter(ExistenceFilter)\n\n public ExistenceFilter(ExistenceFilter other)\n\nProperties\n----------\n\n### Count\n\n public int Count { get; set; }\n\nThe total count of documents that match\n\\[target_id\\]\\[google.firestore.v1.ExistenceFilter.target_id\\].\n\nIf different from the count of documents in the client that match, the\nclient must manually determine which documents no longer match the target.\n\nThe client can use the `unchanged_names` bloom filter to assist with\nthis determination by testing ALL the document names against the filter;\nif the document name is NOT in the filter, it means the document no\nlonger matches the target.\n\n### TargetId\n\n public int TargetId { get; set; }\n\nThe target ID to which this filter applies.\n\n### UnchangedNames\n\n public BloomFilter UnchangedNames { get; set; }\n\nA bloom filter that, despite its name, contains the UTF-8 byte encodings of\nthe resource names of ALL the documents that match\n\\[target_id\\]\\[google.firestore.v1.ExistenceFilter.target_id\\], in the form\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\n\nThis bloom filter may be omitted at the server's discretion, such as if it\nis deemed that the client will not make use of it or if it is too\ncomputationally expensive to calculate or transmit. Clients must gracefully\nhandle this field being absent by falling back to the logic used before\nthis field existed; that is, re-add the target without a resume token to\nfigure out which documents in the client's cache are out of sync."]]