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

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

Accent-Insensitive indexing

This feature is supported by version 17.8.0 or greater

GroupDocs.Search for .NET API allows performing replacements of characters during indexing. You can manage a list of characters for replacements. It makes sense to do this only before indexing.

The Recipe

Accent-insensitive indexing can be performed by using the following steps:

  • Initialize an object of type IndexSettings and enable replacements during indexing using settings.UseCharacterReplacements = true
  • Create index
  • Clear dictionary of replacements using index.Dictionaries.CharacterReplacements.Clear()
  • Define your desired set of replacements using the KeyValue pair
  • Add the replacements using index.Dictionaries.CharacterReplacements.AddRange(replacements)
  • One can also import replacements from a file. Existing replacements will stay
  • You can even export the replacements to a file
  • Add documents to index, this way the documents will have the accent the user-defined

The Code

Labels
  • No labels