To use the Glimpse search, the Glimpse index must be built based on files in the ProductDir, or wherever the files to be searched will be located. If the catalog is in /var/lib/interchange/foundation, the command line to build the index for the products file would be:
chdir /var/lib/interchange/foundation/products glimpseindex -b -H . products.txt
There are several ways to improve search speed for large catalogs. One method that works well for large products.txt files is to split the products.txt file into small index files (in the example, 100 lines) with the split(1) UNIX/POSIX command. Then, index it with Glimpse:
split -100 products.txt index.txt. glimpseindex -H /var/lib/interchange/foundation/products index.txt.*
This will dramatically increase search speeds for large catalogs, at least if the search term is relatively unique. If it is a common string, in a category search, for example, it is better to use the text-based search.
To search for numbers, add the -n option to the Glimpse command line.
Note: A large catalog is one of more than several thousand items; smaller ones have acceptable speed in any of the search modes.
If the Glimpse executable is not found at Interchange startup, the Glimpse search will be disabled and the regular text-based search used instead.
There are several things to watch for while using Glimpse, and a liberal dose of the Glimpse documentation is suggested. In particular, the spelling error capability will not work in combination with the field-specific search. Glimpse selects the line, but Interchange's text-based search routines disqualify it when checking to see if the search string is within one of the specified fields.
To use field-specific searching on Glimpse, tell it what the field names are. If the search is on the products database (file), nothing is needed for the default is to use the field names from the products database. If it is some other field layout, specify the file to get the field names from with mv_field_file (ff).