Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

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:

  • ? - quotation 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

HTML
<script src="https://gist.github.com/GroupDocsGists/63e69afae314151a0f181d99f2b112ee.js"></script>

...

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

HTML
<script src="https://gist.github.com/GroupDocsGists/53b8f6305ca047aa3d376dbb1e320293.js"></script>