Represents a word pattern for the wildcard search.
A pattern is a sequence of values, each of them either a character or a wildcard. A wildcard carries the flag that puts it above System.Char.MaxValue, together with the least and the greatest number of characters it stands for, therefore a character of the pattern is anything that fits into a UTF-16 code unit.
The WordPattern type exposes the following members:
Returns a string that represents the current WordPattern.
Example
fromgroupdocs.searchimportSearchQueryfromgroupdocs.search.commonimportWordPattern# Create a pattern that matches words like "merry" or "marry"pattern=WordPattern()pattern.append_string("m")pattern.append_one_character_wildcard()pattern.append_string("rry")query=SearchQuery.create_word_pattern_query(pattern)result=index.search(query)# Create a pattern that matches words like "cardiff", "cardinal", "cardio", "cards"pattern2=WordPattern()pattern2.append_string("card")pattern2.append_wildcard(1,6)# matches between 1 and 6 charactersquery2=SearchQuery.create_word_pattern_query(pattern2)result2=index.search(query2)