Firestore API - Class Filter (3.6.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 3.6.0keyboard_arrow_down
public abstract class Filter : IEquatable<Filter>
Reference documentation and code samples for the Firestore API class Filter.
A holder for any type of filter.
Namespace
Google.Cloud.Firestore
Assembly
Google.Cloud.Firestore.dll
Methods
And(params Filter[])
public static Filter And(params Filter[] filters)
Creates a composite filter which is the logical "AND" of all the specified filters.
Parameter
Name
Description
filters
Filter
Set of filters to combine. Must not be null or empty, or contain null references.
Returns
Type
Description
Filter
A filter representing the logical "AND" of all the elements in filters
.
And(IEnumerable<Filter>)
public static Filter And(IEnumerable<Filter> filters)
Creates a composite filter which is the logical "AND" of all the specified filters.
Parameter
Name
Description
filters
IEnumerable Filter
Set of filters to combine. Must not be null or empty, or contain null references.
Returns
Type
Description
Filter
A filter representing the logical "AND" of all the elements in filters
.
ArrayContains(FieldPath, object)
public static Filter ArrayContains(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be an array containing
value
.
Returns
Type
Description
Filter
ArrayContains(string, object)
public static Filter ArrayContains(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be an array containing
value
.
Returns
Type
Description
Filter
ArrayContainsAny(FieldPath, IEnumerable)
public static Filter ArrayContainsAny(FieldPath fieldPath, IEnumerable values)
Returns a filter specifying that fieldPath
must be
a field present in the document, with a value which is an array containing at least one value in values
.
Returns
Type
Description
Filter
ArrayContainsAny(string, IEnumerable)
public static Filter ArrayContainsAny(string fieldPath, IEnumerable values)
Returns a filter specifying that fieldPath
must be
a field present in the document, with a value which is an array containing at least one value in values
.
Returns
Type
Description
Filter
EqualTo(FieldPath, object)
public static Filter EqualTo(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be
equal to value
.
Returns
Type
Description
Filter
EqualTo(string, object)
public static Filter EqualTo(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be
equal to value
.
Returns
Type
Description
Filter
GreaterThan(FieldPath, object)
public static Filter GreaterThan(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be greater than
value
.
Returns
Type
Description
Filter
GreaterThan(string, object)
public static Filter GreaterThan(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be greater than
value
.
Returns
Type
Description
Filter
GreaterThanOrEqualTo(FieldPath, object)
public static Filter GreaterThanOrEqualTo(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be greater than or equal to
value
.
Returns
Type
Description
Filter
GreaterThanOrEqualTo(string, object)
public static Filter GreaterThanOrEqualTo(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be greater than or equal to
value
.
Returns
Type
Description
Filter
InArray(FieldPath, IEnumerable)
public static Filter InArray(FieldPath fieldPath, IEnumerable values)
Returns a filter specifying that fieldPath
must be
a field present in the document, with a value which is one of the values in values
.
Returns
Type
Description
Filter
InArray(string, IEnumerable)
public static Filter InArray(string fieldPath, IEnumerable values)
Returns a filter specifying that fieldPath
must be
a field present in the document, with a value which is one of the values in values
.
Returns
Type
Description
Filter
LessThan(FieldPath, object)
public static Filter LessThan(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be less than
value
.
Returns
Type
Description
Filter
LessThan(string, object)
public static Filter LessThan(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be less than
value
.
Returns
Type
Description
Filter
LessThanOrEqualTo(FieldPath, object)
public static Filter LessThanOrEqualTo(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be less than or equal to
value
.
Returns
Type
Description
Filter
LessThanOrEqualTo(string, object)
public static Filter LessThanOrEqualTo(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must be less than or equal to
value
.
Returns
Type
Description
Filter
NotEqualTo(FieldPath, object)
public static Filter NotEqualTo(FieldPath fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must not be
equal to value
.
Returns
Type
Description
Filter
NotEqualTo(string, object)
public static Filter NotEqualTo(string fieldPath, object value)
Returns a filter specifying that the value in fieldPath
must not be
equal to value
.
Returns
Type
Description
Filter
NotInArray(FieldPath, IEnumerable)
public static Filter NotInArray(FieldPath fieldPath, IEnumerable values)
Returns a filter specifying that fieldPath
must be
a field present in the document, with a value which is not one of the values in values
.
Returns
Type
Description
Filter
NotInArray(string, IEnumerable)
public static Filter NotInArray(string fieldPath, IEnumerable values)
Returns a filter specifying that fieldPath
must be
a field present in the document, with a value which is not one of the values in values
.
Returns
Type
Description
Filter
Or(params Filter[])
public static Filter Or(params Filter[] filters)
Creates a composite filter which is the logical "OR" of all the specified filters.
Parameter
Name
Description
filters
Filter
Set of filters to combine. Must not be null or empty, or contain null references.
Returns
Type
Description
Filter
A filter representing the logical "OR" of all the elements in filters
.
Or(IEnumerable<Filter>)
public static Filter Or(IEnumerable<Filter> filters)
Creates a composite filter which is the logical "OR" of all the specified filters.
Parameter
Name
Description
filters
IEnumerable Filter
Set of filters to combine. Must not be null or empty, or contain null references.
Returns
Type
Description
Filter
A filter representing the logical "OR" of all the elements in filters
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eFilter\u003c/code\u003e class in the Google.Cloud.Firestore API provides a way to define various types of filters for querying Firestore databases.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation covers version 3.6.0 of the Google Cloud Firestore Filter, with links to other versions ranging from 2.3.1 to 3.10.0 (latest).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFilter\u003c/code\u003e class can create composite filters using logical "AND" and "OR" operations to combine multiple filter conditions.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003eEqualTo\u003c/code\u003e, \u003ccode\u003eGreaterThan\u003c/code\u003e, \u003ccode\u003eLessThan\u003c/code\u003e, \u003ccode\u003eArrayContains\u003c/code\u003e, \u003ccode\u003eInArray\u003c/code\u003e, and their variations allow for creating specific filter criteria based on field values and array contents.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements \u003ccode\u003eIEquatable\u003c/code\u003e and can be used to check if filters are the same, making the \u003ccode\u003eFilter\u003c/code\u003e class an abstract holder for any type of filter.\u003c/p\u003e\n"]]],[],null,[]]