Method CreatePhraseQuery
CreatePhraseQuery(String, String)
Creates a phrase query from the query text.
This is equivalent to CreatePhraseQuery(field, queryText, 0)
Declaration
public virtual Query CreatePhraseQuery(string field, string queryText)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Field name. |
System.String | queryText | Text to be passed to the analyzer. |
Returns
Type | Description |
---|---|
Query | TermQuery, BooleanQuery, PhraseQuery, or
MultiPhraseQuery, based on the analysis of |
CreatePhraseQuery(String, String, Int32)
Creates a phrase query from the query text.
Declaration
public virtual Query CreatePhraseQuery(string field, string queryText, int phraseSlop)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Field name. |
System.String | queryText | Text to be passed to the analyzer. |
System.Int32 | phraseSlop | number of other words permitted between words in query phrase |
Returns
Type | Description |
---|---|
Query | TermQuery, BooleanQuery, PhraseQuery, or
MultiPhraseQuery, based on the analysis of |