Skip to end of metadata
Go to start of metadata
Contents Summary
 

The code in below examples uses some methods defined in Common Utilities.

Exact Phrase Search

This feature is supported by version 16.10 or greater.

GroupDocs.Search allows you to search the documents by exact phrase.

The Recipe

To perform an exact phrase search, the following steps are needed to be followed:

  • Initialize Index
  • Add documents folder to Index
  • Perform a search operation using Index.search("\"exact phrase\"")

The Code

Use double quotes in the query string for Exact Phrase Search.

Exact Phrase Search with Highlighted Results

This feature is supported by version 17.2 or greater.

GroupDocs.Search allows you to generate HTML-formatted text with highlighted found terms for the results of exact phrase search. 

The Recipe

To save highlighted results, the following steps are needed to be followed:

  • Initialize Index
  • Add documents folder to Index
  • Perform a search operation using Index.search("\"exact phrase\"")

  • Save highlighted results using Index.HighlightInText()

The Code

Labels
  • No labels