-
Notifications
You must be signed in to change notification settings - Fork 0
TARILIO Plugins
Use the TARILIO Plugin Architecture to index data that TARILIO cannot index out of the box, such as custom databases and data from external API's.
- Clone the S3 Plugin Repository.
- Open the solution in Visual Studio 2022 or later
- Create a new .NET 8.0+ Class Library Project in the Solution for your Plugin.
- Add a reference to the
eSearch.InteropAssembly. A copy can be found in the S3 Plugin Project Folder.
Create a new PluginInformation class that implements IPluginManifest. Use this to provide TARILIO with the Author, Name and Description of your plugin.
The interface requires the method RequiresESearchVersion to be implemented - Set this to the build of TARILIO your plugin has been tested against. TARILIO will prevent users from installing your plugin on earlier versions of the software to prevent compatibility issues.
To supply data to be indexed to TARILIO you will need to implement a IPluginDataSourceManager and IDataSource.
An example implementation can be seen in the S3 Sample Plugin.
Create a class which implements IPluginDataSource.
Use the method UseIndexTaskLog to receive TARILIO's logger. Use this logger to provide logging information to TARILIO.
For the description method, It is recommended to provide a non-static Description which describes the configuration of the individual data source. For example, if you made an SQL Plugin, you might supply the name of the table the user elected to index in this data source.
Use the GetNextDoc method to supply data to be indexed to TARILIO. TARILIO will continuously call this method during indexing.
Supply documents to TARILIO by creating a class that implements IDocument.
If your data-source needs time to discover data, return a null document and set isDiscoveryComplete to false. TARILIO will wait a brief amount of time before calling the method again.
Return document = null and isDiscoveryComplete= true to signal to TARILIO that there are no more documents to be indexed in this data-source.
The Rewind Method is called by TARILIO when it needs to ensure it is starting fresh from the first document.
If your data-source retrieves Filesystem documents that you would like TARILIO to parse, implement IRequiresESearchFileParser . TARILIO will pass an IESearchFileParser which your plugin can use to parse file system documents using TARILIO's parsers.
Your Plugin must take care of tracking which data sources belong to which indexes.
The InvokeDataSourceConfigurator method is called by TARILIO when the user either creates or modifies an instance of your data source from TARILIO when creating or modifying an index.
TARILIO will await your task. Use this as an opportunity to invoke any UI you wish to present the user with to configure your data source. Then you must persist the IndexID and any configuration data associated with the data source.
Once the method completes, TARILIO will call GetConfiguredDataSources to update the list of data sources associated with your plugin. Supply the data you persisted for the given index in this method.
To allow your Plugin to be installed on TARILIO, it must be packaged as an .esplugin. We include a PluginBuilder project which can do this for you.
In the Plugin Builder project, edit PluginConfig.json
-
mainDLLSet this to the filename of the main Plugin DLL your Plugin Project Creates -
zipNameThis will be the name portion of the .esplugin file that will be created.
Inside Visual Studio, for the Plugin Builder project:
- Go to the project properties -> Debug page
- Open the Launch Profiles UI
- Set the Working Directory to where your Plugin files have been built.
Eg.
...\MyPlugin\bin\Debug\net8.0
Finally, run the Builder Project. The builder will create an .esplugin file which can be installed into TARILIO!