You are here: Overviews > Options > ICU Integration
Close
dtSearch Text Retrieval Engine Programmer's Reference
ICU Integration

The dtSearch Engine can be integrated with the International Components for Unicode (ICU).

The International Components for Unicode (ICU) is a widely-used library of components that enable Unicode and internationalization-related functions. ICU was originally the IBM Classes for Unicode and was transferred to the Unicode Consortium in 2016. ICU is included with Windows 10 and is available for or included with major Linux distributions and macOS. 

ICU is distributed under the Unicode License (http://www.unicode.org/copyright.html#License). These terms cover the ICU binary components (icu*.dll). Therefore, applications that distribute or use these components must comply with the notice requirements and other terms of the Unicode license. 

Beginning with version 7.93, dtSearch can integrate with ICU to enhance text processing in the dtSearch Engine. ICU integration provides these benefits. For more information on ICU, please see the ICU project page

To enable ICU integration: 

(1) Place an icuconfig.xml file in the dtSearch HomeDir folder (or other location as specified by the homedir.xml file). This is a small XML file that tells the dtSearch Engine how to load ICU. 

(2) Add the ICU binary components icu*.dll to your installer to be installed in the same folder as the dtSearch Engine DLL. See ICU Deployment for more information. 

(3) Set the flag dtsoTfUseIcu in Options.TextFlags to enable ICU support in your application. 

(4) Include the ICU license with your product (http://www.unicode.org/copyright.html#License). 

 

Index Compatibility and ICU Versions

dtSearch versions without ICU support can search indexes created with ICU support enabled, but features enabled by ICU will not be available so use of older versions of dtSearch to search ICU-enabled indexes is not recommended. 

Because of ICU stability guarantees and because dtSearch builds character tables into each index when the index is created, minor differences in the ICU version between indexing time and search time should not affect searching, unless the specific characters being searched for are not supported in the ICU version used for searching. 

When merging indexes, inconsistent ICU versions will result in the error dtsIndexMergeNotCompatible. To prevent this, use IndexJob.CreateCompatibleIndexPath to create an index that is merge-compatible with an existing index. You can use this to create a new index that can be merged with an older existing index, or to create a compatible target index for a set of mutually-compatble existing indexes. 

dtSearch is tested with ICU version 59, the version included with Windows 10, and 63, the version included with the dtSearch Engine. The API functions dtSearch uses are documented as stable from ICU version 49 forward. 

ICU can be built with or without version number suffixes after the names of the API functions. dtSearch will automatically detect these suffixes so it can use ICU versions built either way. 

ICU documentation for version 63 specifies that the minumum supported Windows version is 7. ICU version 58 was the last version to support Windows XP and Windows Vista. The icuconfig.xml file provides a setting to specify the minimum Windows version required for an ICU library, so developers can control the version deployed and the platforms that ICU will be used with.

Copyright (c) 1995-2021 dtSearch Corp. All rights reserved.