OfficeTextQuery
OfficeIMO.TextAnalysis
A query over an OfficeTextIndex: terms, phrases, prefixes and AND/OR combinations of them. Query text is analysed with the index analyser when the query runs.
Inheritance
- object
- OfficeTextQuery
Remarks
OfficeTextQuery.Parse accepts words, "quoted phrases", prefix*, the upper-case operators AND and OR, and parentheses. AND binds tighter than OR. A word that the analyser splits into several tokens, such as e-mail or a run of Han ideographs, is matched as a phrase.
Usage
Explore 11 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 8
- Property OfficeTextIndexSearchResult.Query
- Method OfficeTextQuery.And
- Method OfficeTextQuery.Or
- Method OfficeTextQuery.Parse
- Method OfficeTextQuery.Phrase
- Method OfficeTextQuery.Prefix
- Method OfficeTextQuery.Term
- Property OfficeTextQuery.Children
Accepted by parameters 3
- Method OfficeTextIndex.Search
- Method OfficeTextQuery.And
- Method OfficeTextQuery.Or
Methods
public static OfficeTextQuery And(params OfficeTextQuery[] clauses) #Matches documents matching every clause.
Parameters
- clauses OfficeIMO.TextAnalysis.OfficeTextQuery[]
Returns
OfficeTextQuerypublic static OfficeTextQuery Or(params OfficeTextQuery[] clauses) #Matches documents matching at least one clause.
Parameters
- clauses OfficeIMO.TextAnalysis.OfficeTextQuery[]
Returns
OfficeTextQuerypublic static OfficeTextQuery? Parse(string text, OfficeTextQueryOperator defaultOperator = And) #Parses query syntax. Returns null when the text contains no clauses, for example only operators or quotes.
Parameters
- text string
- defaultOperator OfficeIMO.TextAnalysis.OfficeTextQueryOperator = And
Returns
OfficeTextQuery?public static OfficeTextQuery Phrase(string text) #Matches words that appear consecutively in one field.
Parameters
- text string
Returns
OfficeTextQuerypublic static OfficeTextQuery Prefix(string text) #Matches any term starting with text after normalization and folding.
Parameters
- text string
Returns
OfficeTextQuerypublic static OfficeTextQuery Term(string text) #Matches one word.
Parameters
- text string
Returns
OfficeTextQuerypublic override string ToString() #Returns a string that represents the current object.
Returns
string A string that represents the current object.