Class IndexKeysDefinitionExtensions
Extension methods for an index keys definition.
public static class IndexKeysDefinitionExtensions
- Inheritance
-
IndexKeysDefinitionExtensions
- Inherited Members
Methods
Ascending<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with an ascending index key definition.
public static IndexKeysDefinition<TDocument> Ascending<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Ascending<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with an ascending index key definition.
public static IndexKeysDefinition<TDocument> Ascending<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Descending<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with a descending index key definition.
public static IndexKeysDefinition<TDocument> Descending<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Descending<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with a descending index key definition.
public static IndexKeysDefinition<TDocument> Descending<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Geo2DSphere<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with a 2dsphere index key definition.
public static IndexKeysDefinition<TDocument> Geo2DSphere<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Geo2DSphere<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with a 2dsphere index key definition.
public static IndexKeysDefinition<TDocument> Geo2DSphere<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Geo2D<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with a 2d index key definition.
public static IndexKeysDefinition<TDocument> Geo2D<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Geo2D<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with a 2d index key definition.
public static IndexKeysDefinition<TDocument> Geo2D<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
GeoHaystack<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with a geo haystack index key definition.
[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public static IndexKeysDefinition<TDocument> GeoHaystack<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field, FieldDefinition<TDocument> additionalFieldName = null)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
additionalFieldName
FieldDefinition<TDocument>Name of the additional field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
GeoHaystack<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with a geo haystack index key definition.
[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public static IndexKeysDefinition<TDocument> GeoHaystack<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field, Expression<Func<TDocument, object>> additionalFieldName = null)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
additionalFieldName
Expression<Func<TDocument, object>>Name of the additional field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Hashed<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with a hashed index key definition.
public static IndexKeysDefinition<TDocument> Hashed<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Hashed<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with a hashed index key definition.
public static IndexKeysDefinition<TDocument> Hashed<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Text<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)
Combines an existing index keys definition with a text index key definition.
public static IndexKeysDefinition<TDocument> Text<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
FieldDefinition<TDocument>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.
Text<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)
Combines an existing index keys definition with a text index key definition.
public static IndexKeysDefinition<TDocument> Text<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)
Parameters
keys
IndexKeysDefinition<TDocument>The keys.
field
Expression<Func<TDocument, object>>The field.
Returns
- IndexKeysDefinition<TDocument>
A combined index keys definition.
Type Parameters
TDocument
The type of the document.