Troubleshooting hit highlighting problems (dtSearch Engine)

Last Reviewed: June 7, 2012

Article: DTS0208

Applies to: dtSearch Engine 6, dtSearch Engine 7

Symptoms

After a search, dtSearch highlights the wrong words in a retrieved file.

Possible Causes

Troubleshooting Steps

1.  Try to duplicate the problem in dtSearch Desktop.  

To access the index in dtSearch Desktop, click Index > Index Manager > Recognize Index, select any of the *.ix files in the index folder, and click OK.   This will add the index to the list of indexes that you can search in dtSearch.

If you are able to duplicate the problem in dtSearch Desktop, please see this article for troubleshooting steps:

Troubleshooting hit highlighting problems

2.  Verify that FileConverter is begin set up correctly.

To ensure that FileConverter is being set up correctly, check that you are using FileConverter.SetInputItem() to tell it which item in search results will be displayed.   SetInputItem ensures that all necessary information to highlight hits correctly is transferred from SearchResults to the FileConverter.  

3.  Check for a version conflict.

Check that the version of the dtSearch Engine being used to index the data is exactly the same as the version being used for searching and hit highlighting.  To determine which version(s) of dtSearch were used to update the index, open the history.ix file in the index folder in notepad.  The history.ix file will also include the option settings in effect when the document was indexed, so you can compare these with what you are using during a search.

4.  Check that the documents are not changing.

dtSearch can cache documents in the index so hit highlighting can be done from the cached version of the document.  Caching documents can help with troubleshooting hit highlighting problems because it lets you see at search time exactly what the indexer processed when the index was built.  For more information on caching documents in indexes, see: Caching Documents in the dtSearch Engine API Reference (dtSearchApiRef.chm).  Caching can be especially helpful when the data is generated dynamically during indexing or passed via the DataSource API.

To use caching,
(1) Modify your application to create its index using the dtsIndexCacheOriginalFile flag when the index is created.

(2) Either use dtSearch Desktop to search the index (it will automatically use the cached documents) or set the flag dtsConvertGetFromCache in FileConverter when you highlight hits.

5.  Use the dtsConvertAutoUpdateSearch flag when you highlight hits

The dtsConvertAutoUpdateSearch flag, which is set in FileConverter, tells dtSearch to check for the conditions that can cause mis-highlighting and to update the hit offsets in the file to automatically correct any problems that are found.  

Related Articles

Troubleshooting hit highlighting problems

Troubleshooting PDF hit highlighting (dtSearch Engine)

Troubleshooting PDF hit highlighting problems in dtSearch Desktop