If you are using FogBugz On Demand then please contact us.  This guide is meant for Licensed FogBugz.

Problem: Filters or ad hoc searches do not seem to show all of the cases they should

Description: Despite poring over the FogBugz search documentation, your carefully crafted filters return mostly what you are looking for, except for a few cases! If you check the index statistics (Admin > Site Configuration > Search), you might see less than 100% of cases/wikis are indexed. Resetting the search index (ideally over the weekend), doesn’t resolve the problem. In Licensed FogBugz, this can often be a symptom of a corrupt or fragmented search index.

If this is affecting you, please follow the steps below, and then contact us with the results.

Determine Index Location

The FogBugz Search Index can be stored either in the database (the default) or on disk. The location is controlled by the fStoreIndexInDatabase setting. For Windows installations, the setting is stored in the registry on the FogBugz web server under HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\FogBugz\. If the key is missing, then the default setting applies. On Unix servers, the setting is stored in the application.data file, by default located at /opt/fogbugz/Accessories. In your email to us, let us know the value of this setting (or if it is not set).

Check the Integrity of your Database

Follow the steps outline in the “integrity” section of the Data Quality help doc. MySQL users should also compare their settings to our suggested settings. Let us know if there are any integrity issues or settings mismatches, and we can help resolve them.

Check for Fragmented Index

Occasionally, the FogBugz Search Index can fragment into multiple files, rendering unreachable the cases indexed in all but one of the files. To check the number of fragments, run the appropriate query for your database. Let us know the return value of the query. If it is greater than 1, we’ll help you repair your fragmented index.

Microsoft SQL Server

SELECT COUNT(*) FROM IndexFile
WHERE sFilename = 'segments'
AND ixLastGeneration >= (
SELECT max(CAST(sValue AS int))
FROM Setting
WHERE sKey = 'ixIndexGeneration');

MySQL

SELECT COUNT(*) FROM IndexFile
WHERE sFilename = 'segments'
AND ixLastGeneration >= (
SELECT max(CAST(sValue AS SIGNED INTEGER))
FROM Setting
WHERE sKey = 'ixIndexGeneration');