Skip to end of metadata
Go to start of metadata
Contents Summary
 
 The code in below examples uses some methods defined in Common Utilities.

This feature is supported by version 18.12 or greater.

Wildcard Search 

GroupDocs.Search API allows performing search of words containing wildcards. There are two possible forms of a wildcard to use in wildcard search:

  • ? - question mark representing one arbitrary character;
  • ?(N~M) - the range of arbitrary characters in an amount from N to M, where N and M must be in the range from 0 to 255.

Wild Card Search using Text Query 

The Recipe

To perform a wildcard search using text query, the following steps are needed to be followed:

  • Initialize Index
  • Add documents to the folder using Index.AddToIndex() 

  • Get search results using Index.Search("?ffect & princip?(2~4)")

The Code

Wildcard Search using Object

The Recipe

To perform a wildcard search using an object, the following steps are needed to be followed:

  • Initialize Index
  • Add documents to the folder using Index.AddToIndex() 

  • Initialize two subqueries using SearchQuery.CreateWordPatternQuery() 

  • Create a search query by combining two subqueries using SearchQuery.CreateAndQuery(subquery11, subquery12)

  • Get search results using Index.Search(SearchQuery, new SearchParameters())

The Code

Labels
  • No labels