Tungsten Search and Matching Server Search Filters
Filtering functionality similar to the ASE database filtering was added to the KSMS database. This filtering functionality provides the ability to restrict the fuzzy search algorithm by a set of records that have to match defined constraints. During production, the filtering constraints have to be defined in the database object before a fuzzy search get performed. A filter constraint forces the returned records to contain an exact value in at least one database field or column.
First the KSMS database needs to be configured for filtering. This is done in the Database Import window. In this window, enable what database fields or columns will be used for filtering. It is also possible to configure whether the constraint value should be case sensitive or not. The second step is to configure the project to define the filtering constraint(s) for production. This is possible via scripting using these new functions available for CscDatabase class.
- void AddFilteringItem(string FieldName, string filterText);
- void RemoveFilteringItem(string FieldName);
- void GetFilteringItem(uint Index, out string pFieldName, out string pFilterText);
- int GetFilteringItemCount();
- void ClearFilteringItems();
Here is a script example that sets the filtering constraints and items before each document is processed.
From Tungsten TotalAgility 7.5.0.11 onward, it is possible to map a filtered database field to a value or variable within the KSMS Fuzzy Search action. This action can be linked to a button.