SearchTerm
open class SearchTerm : SearchExpression
Represents an OData search term (word or phrase).
-
An empty search term, that will match any words.
Declaration
Swift
public static let empty: SearchTerm -
Search operator, or zero if
isTermistrue.Declaration
Swift
override open var `operator`: Int { get } -
Is this search term empty, so it will match any words?
Declaration
Swift
open var isEmpty: Bool { get } -
True if this search expression is a
SearchTermwhereSearchTerm.isPhraseis true.Declaration
Swift
override open var isPhrase: Bool { get } -
True if this search expression is a
SearchTerm.Declaration
Swift
override open var isTerm: Bool { get } -
True if this search expression is a
SearchTermwhereSearchTerm.isWordis true.Declaration
Swift
override open var isWord: Bool { get } -
Declaration
Swift
override open func matchesWithOptions(words: StringList, options: SearchOptions) -> BoolParameters
wordsWords to be matched with this search expression.
optionsSearch options.
Return Value
True if this search expression matches a specified list of words.
-
Search operands, or empty if
isTermistrue.Declaration
Swift
override open var operands: SearchExpressionList { get } -
Declaration
Swift
open class func phrase(_ words: StringList) -> SearchTermParameters
wordsPhrase words.
Return Value
a new phrase term. For a phrase term,
matchesensures that the words of the phrase occur in sequence. -
Declaration
Swift
open class func prefix(_ text: String, limit: Int = (0 as Int)) -> SearchTermParameters
textText of word, or phrase surrounded by double quotes.
limitNumber of words to have “*” appended. If zero, it applies to all words. If positive, it applies to the first
limitwords. If negative, it applies to the last-limitwords.Return Value
a new word or phrase term with “*” appended to each word to indicate prefix matching. Note: some server implementations might not support such prefix matching. Use only where appropriate.
-
Declaration
Swift
override open func toString() -> StringReturn Value
This search expression in human readable format.
-
Declaration
Swift
override open func urlString() -> StringReturn Value
This search expression in OData URL format.
-
Declaration
Swift
open class func word(_ text: String) -> SearchTermParameters
textWord text.
Return Value
a new word term.
-
Search words, or empty if
isTermisfalse.Declaration
Swift
override open var words: StringList { get }