FogBugz Plugin Interfaces > Search > IPluginSearchAxis, IPluginFullTextIndexBug
Introduction
This article will demonstrate a simple FogBugz plugin that implements the IPluginSearchAxis and IPluginFullTextIndexBug interfaces contained in the FogCreek.FogBugz.Plugins.Interfaces class library.
This builds upon Implementing IPluginGridColumn which joins a table to the Bug table to add two fields and then displays the fields in the grid view with sorting ability. If you haven't reviewed it yet, it might be helpful.
As with any action that takes place during periodic maintenance, plugin code which updates the search index should use .IgnorePermissions on any entities to make sure it has access to the entities. For more information, see Entity Member Security.
Note: FogBugz adds case information to the full text index upon creation of the case. To back-fill data for existing cases, you must reset the search index by going to Settings -> Search. The next time heartbeat is hit, FogBugz will re-index all cases.
Functionality
This plugin builds upon the Implementing IPluginGridColumn example to implement the IPluginSearchAxis and IPluginFullTextIndexBug interfaces to allow the user to search by kiwi name and kiwi birthdate. To simplify things, the interface for adding kiwis to cases has been omitted. The database must be pre-populated with kiwis. Sample cases, some with kiwi names and birthdates defined:
An example search on the "kiwiname" axis:
An example search on the "kiwibirth" axis:
Compile and Install It On Your Own
Download the source file: IPluginSearchAxis_Example.cs
Then follow these instructions to create a functioning plugin assembly: Compiling and Installing a FogBugz Plugin