Method In
In<TField>(SearchPathDefinition<TDocument>, IEnumerable<TField>, SearchScoreDefinition<TDocument>)
Creates a search definition that queries for documents where the value of the field equals to any of specified values.
public SearchDefinition<TDocument> In<TField>(SearchPathDefinition<TDocument> path, IEnumerable<TField> values, SearchScoreDefinition<TDocument> score = null)
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
values
IEnumerable<TField>Values to compare the field with.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
An In search definition.
Type Parameters
TField
The type of the field. Valid types are: boolean, ObjectId, number, date, string.
In<TField>(Expression<Func<TDocument, TField>>, IEnumerable<TField>, SearchScoreDefinition<TDocument>)
Creates a search definition that queries for documents where the value of the field equals to any of specified values.
public SearchDefinition<TDocument> In<TField>(Expression<Func<TDocument, TField>> path, IEnumerable<TField> values, SearchScoreDefinition<TDocument> score = null)
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
values
IEnumerable<TField>Values to compare the field with.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
An In search definition.
Type Parameters
TField
The type of the field. Valid types are: boolean, ObjectId, number, date, string.