Method Near
Near(SearchPathDefinition<TDocument>, double, double, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near(SearchPathDefinition<TDocument> path, double origin, double pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
origin
doubleThe number, date, or geographic point to search near.
pivot
doubleThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Near<TField>(Expression<Func<TDocument, TField>>, double, double, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near<TField>(Expression<Func<TDocument, TField>> path, double origin, double pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
origin
doubleThe number, date, or geographic point to search near.
pivot
doubleThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Type Parameters
TField
The type of the field.
Near(SearchPathDefinition<TDocument>, int, int, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near(SearchPathDefinition<TDocument> path, int origin, int pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
origin
intThe number, date, or geographic point to search near.
pivot
intThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Near<TField>(Expression<Func<TDocument, TField>>, int, int, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near<TField>(Expression<Func<TDocument, TField>> path, int origin, int pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
origin
intThe number, date, or geographic point to search near.
pivot
intThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Type Parameters
TField
The type of the field.
Near(SearchPathDefinition<TDocument>, long, long, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near(SearchPathDefinition<TDocument> path, long origin, long pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
origin
longThe number, date, or geographic point to search near.
pivot
longThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Near<TField>(Expression<Func<TDocument, TField>>, long, long, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near<TField>(Expression<Func<TDocument, TField>> path, long origin, long pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
origin
longThe number, date, or geographic point to search near.
pivot
longThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Type Parameters
TField
The type of the field.
Near(SearchPathDefinition<TDocument>, DateTime, long, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near(SearchPathDefinition<TDocument> path, DateTime origin, long pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
origin
DateTimeThe number, date, or geographic point to search near.
pivot
longThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Near<TField>(Expression<Func<TDocument, TField>>, DateTime, long, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near<TField>(Expression<Func<TDocument, TField>> path, DateTime origin, long pivot, SearchScoreDefinition<TDocument> score = null)
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
origin
DateTimeThe number, date, or geographic point to search near.
pivot
longThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Type Parameters
TField
The type of the field.
Near<TCoordinates>(SearchPathDefinition<TDocument>, GeoJsonPoint<TCoordinates>, double, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near<TCoordinates>(SearchPathDefinition<TDocument> path, GeoJsonPoint<TCoordinates> origin, double pivot, SearchScoreDefinition<TDocument> score = null) where TCoordinates : GeoJsonCoordinates
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
origin
GeoJsonPoint<TCoordinates>The number, date, or geographic point to search near.
pivot
doubleThe value to use to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Type Parameters
TCoordinates
The type of the coordinates.
Near<TCoordinates, TField>(Expression<Func<TDocument, TField>>, GeoJsonPoint<TCoordinates>, double, SearchScoreDefinition<TDocument>)
Creates a search definition that supports querying and scoring numeric and date values.
public SearchDefinition<TDocument> Near<TCoordinates, TField>(Expression<Func<TDocument, TField>> path, GeoJsonPoint<TCoordinates> origin, double pivot, SearchScoreDefinition<TDocument> score = null) where TCoordinates : GeoJsonCoordinates
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
origin
GeoJsonPoint<TCoordinates>The number, date, or geographic point to search near.
pivot
doubleThe value to user to calculate scores of result documents.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A near search definition.
Type Parameters
TCoordinates
The type of the coordinates
TField
The type of the fields.