Method Phrase
Phrase(SearchPathDefinition<TDocument>, SearchQueryDefinition, int?, SearchScoreDefinition<TDocument>)
Creates a search definition that performs search for documents containing an ordered sequence of terms.
public SearchDefinition<TDocument> Phrase(SearchPathDefinition<TDocument> path, SearchQueryDefinition query, int? slop = null, SearchScoreDefinition<TDocument> score = null)
Parameters
path
SearchPathDefinition<TDocument>The indexed field or fields to search.
query
SearchQueryDefinitionThe string or strings to search for.
slop
int?The allowable distance between words in the query phrase.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A phrase search definition.
Phrase<TField>(Expression<Func<TDocument, TField>>, SearchQueryDefinition, int?, SearchScoreDefinition<TDocument>)
Creates a search definition that performs search for documents containing an ordered sequence of terms.
public SearchDefinition<TDocument> Phrase<TField>(Expression<Func<TDocument, TField>> path, SearchQueryDefinition query, int? slop = null, SearchScoreDefinition<TDocument> score = null)
Parameters
path
Expression<Func<TDocument, TField>>The indexed field or fields to search.
query
SearchQueryDefinitionThe string or strings to search for.
slop
int?The allowable distance between words in the query phrase.
score
SearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A phrase search definition.
Type Parameters
TField
The type of the field.