Home
Home
German Version
Support
Impressum
25.3 Release ►

Start Chat with Collection

    Main Navigation

    • Preparation
      • Connectors
      • Create an InSpire VM on Hyper-V
      • Initial Startup for G7 appliances
      • Setup InSpire G7 primary and Standby Appliances
    • Datasources
      • Configuration - Atlassian Confluence Connector
      • Configuration - Best Bets Connector
      • Configuration - Box Connector
      • Configuration - COYO Connector
      • Configuration - Data Integration Connector
      • Configuration - Database Connector
      • Configuration - Documentum Connector
      • Configuration - Dropbox Connector
      • Configuration - Egnyte Connector
      • Configuration - GitHub Connector
      • Configuration - Google Drive Connector
      • Configuration - GSA Adapter Service
      • Configuration - HL7 Connector
      • Configuration - IBM Connections Connector
      • Configuration - IBM Lotus Connector
      • Configuration - Jira Connector
      • Configuration - JVM Launcher Service
      • Configuration - LDAP Connector
      • Configuration - Microsoft Azure Principal Resolution Service
      • Configuration - Microsoft Dynamics CRM Connector
      • Configuration - Microsoft Exchange Connector
      • Configuration - Microsoft File Connector (Legacy)
      • Configuration - Microsoft File Connector
      • Configuration - Microsoft Graph Connector
      • Configuration - Microsoft Loop Connector
      • Configuration - Microsoft Project Connector
      • Configuration - Microsoft SharePoint Connector
      • Configuration - Microsoft SharePoint Online Connector
      • Configuration - Microsoft Stream Connector
      • Configuration - Microsoft Teams Connector
      • Configuration - Salesforce Connector
      • Configuration - SCIM Principal Resolution Service
      • Configuration - SemanticWeb Connector
      • Configuration - ServiceNow Connector
      • Configuration - Web Connector
      • Configuration - Yammer Connector
      • Data Integration Guide with SQL Database by Example
      • Indexing user-specific properties (Documentum)
      • Installation & Configuration - Atlassian Confluence Sitemap Generator Add-On
      • Installation & Configuration - Caching Principal Resolution Service
      • Installation & Configuration - Mindbreeze InSpire Insight Apps in Microsoft SharePoint On-Prem
      • Mindbreeze InSpire Insight Apps in Microsoft SharePoint Online
      • Mindbreeze Web Parts for Microsoft SharePoint
      • User Defined Properties (SharePoint 2013 Connector)
      • Whitepaper - Mindbreeze InSpire Insight Apps in Salesforce
      • Whitepaper - Web Connector - Setting Up Advanced Javascript Usecases
    • Configuration
      • CAS_Authentication
      • Configuration - Alerts
      • Configuration - Alternative Search Suggestions and Automatic Search Expansion
      • Configuration - Back-End Credentials
      • Configuration - Chinese Tokenization Plugin (Jieba)
      • Configuration - CJK Tokenizer Plugin
      • Configuration - Collected Results
      • Configuration - CSV Metadata Mapping Item Transformation Service
      • Configuration - Entity Recognition
      • Configuration - Exporting Results
      • Configuration - External Query Service
      • Configuration - Filter Plugins
      • Configuration - GSA Late Binding Authentication
      • Configuration - Identity Conversion Service - Replacement Conversion
      • Configuration - InceptionImageFilter
      • Configuration - Index-Servlets
      • Configuration - InSpire AI Chat and Insight Services for Retrieval Augmented Generation
      • Configuration - Item Property Generator
      • Configuration - Japanese Language Tokenizer
      • Configuration - Kerberos Authentication
      • Configuration - Management Center Menu
      • Configuration - Metadata Enrichment
      • Configuration - Metadata Reference Builder Plugin
      • Configuration - Mindbreeze Proxy Environment (Remote Connector)
      • Configuration - Personalized Relevance
      • Configuration - Plugin Installation
      • Configuration - Principal Validation Plugin
      • Configuration - Profile
      • Configuration - Reporting Query Logs
      • Configuration - Reporting Query Performance Tests
      • Configuration - Request Header Session Authentication
      • Configuration - Shared Configuration (Windows)
      • Configuration - Vocabularies for Synonyms and Suggest
      • Configuration of Thumbnail Images
      • Cookie-Authentication
      • Documentation - Mindbreeze InSpire
      • I18n Item Transformation
      • Installation & Configuration - Outlook Add-In
      • Installation - GSA Base Configuration Package
      • JWT Authentication
      • Language detection - LanguageDetector Plugin
      • Mindbreeze Personalization
      • Mindbreeze Property Expression Language
      • Mindbreeze Query Expression Transformation
      • SAML-based Authentication
      • Trusted Peer Authentication for Mindbreeze InSpire
      • Using the InSpire Snapshot for Development in a CI_CD Scenario
      • Whitepaper - AI Chat
      • Whitepaper - Create a Google Compute Cloud Virtual Machine InSpire Appliance
      • Whitepaper - Create a Microsoft Azure Virtual Machine InSpire Appliance
      • Whitepaper - Create AWS 10M InSpire Appliance
      • Whitepaper - Create AWS 1M InSpire Appliance
      • Whitepaper - Create AWS 2M InSpire Appliance
      • Whitepaper - Create Oracle Cloud 10M InSpire Application
      • Whitepaper - Create Oracle Cloud 1M InSpire Application
      • Whitepaper - MMC_ Services
      • Whitepaper - Natural Language Question Answering (NLQA)
      • Whitepaper - SSO with Microsoft AAD or AD FS
      • Whitepaper - Text Classification Insight Services
    • Operations
      • Adjusting the InSpire Host OpenSSH Settings - Set LoginGraceTime to 0 (Mitigation for CVE-2024-6387)
      • app.telemetry Statistics Regarding Search Queries
      • CIS Level 2 Hardening - Setting SELinux to Enforcing mode
      • Configuration - app.telemetry dashboards for usage analysis
      • Configuration - Usage Analysis
      • Deletion of Hard Disks
      • Handbook - Backup & Restore
      • Handbook - Command Line Tools
      • Handbook - Distributed Operation (G7)
      • Handbook - Filemanager
      • Handbook - Indexing and Search Logs
      • Handbook - Updates and Downgrades
      • Index Operating Concepts
      • Inspire Diagnostics and Resource Monitoring
      • Provision of app.telemetry Information on G7 Appliances via SNMPv3
      • Restoring to As-Delivered Condition
      • Whitepaper - Administration of Insight Services for Retrieval Augmented Generation
    • User Manual
      • Browser Extension
      • Cheat Sheet
      • iOS App
      • Keyboard Operation
    • SDK
      • api.chat.v1beta.generate Interface Description
      • api.v2.alertstrigger Interface Description
      • api.v2.export Interface Description
      • api.v2.personalization Interface Description
      • api.v2.search Interface Description
      • api.v2.suggest Interface Description
      • api.v3.admin.SnapshotService Interface Description
      • Debugging (Eclipse)
      • Developing an API V2 search request response transformer
      • Developing Item Transformation and Post Filter Plugins with the Mindbreeze SDK
      • Development of a Query Expression Transformer
      • Development of Insight Apps
      • Embedding the Insight App Designer
      • Java API Interface Description
      • OpenAPI Interface Description
    • Release Notes
      • Release Notes 20.1 Release - Mindbreeze InSpire
      • Release Notes 20.2 Release - Mindbreeze InSpire
      • Release Notes 20.3 Release - Mindbreeze InSpire
      • Release Notes 20.4 Release - Mindbreeze InSpire
      • Release Notes 20.5 Release - Mindbreeze InSpire
      • Release Notes 21.1 Release - Mindbreeze InSpire
      • Release Notes 21.2 Release - Mindbreeze InSpire
      • Release Notes 21.3 Release - Mindbreeze InSpire
      • Release Notes 22.1 Release - Mindbreeze InSpire
      • Release Notes 22.2 Release - Mindbreeze InSpire
      • Release Notes 22.3 Release - Mindbreeze InSpire
      • Release Notes 23.1 Release - Mindbreeze InSpire
      • Release Notes 23.2 Release - Mindbreeze InSpire
      • Release Notes 23.3 Release - Mindbreeze InSpire
      • Release Notes 23.4 Release - Mindbreeze InSpire
      • Release Notes 23.5 Release - Mindbreeze InSpire
      • Release Notes 23.6 Release - Mindbreeze InSpire
      • Release Notes 23.7 Release - Mindbreeze InSpire
      • Release Notes 24.1 Release - Mindbreeze InSpire
      • Release Notes 24.2 Release - Mindbreeze InSpire
      • Release Notes 24.3 Release - Mindbreeze InSpire
      • Release Notes 24.4 Release - Mindbreeze InSpire
      • Release Notes 24.5 Release - Mindbreeze InSpire
      • Release Notes 24.6 Release - Mindbreeze InSpire
      • Release Notes 24.7 Release - Mindbreeze InSpire
      • Release Notes 24.8 Release - Mindbreeze InSpire
      • Release Notes 25.1 Release - Mindbreeze InSpire
      • Release Notes 25.2 Release - Mindbreeze InSpire
      • Release Notes 25.3 Release - Mindbreeze InSpire
    • Security
      • Known Vulnerablities
    • Product Information
      • Product Information - Mindbreeze InSpire - Standby
      • Product Information - Mindbreeze InSpire
    Home

    Path

    Sure, you can handle it. But should you?
    Let our experts manage the tech maintenance while you focus on your business.
    See Consulting Packages

    Mindbreeze InSpire SDK Plugins
    Mindbreeze Item Transformation and Post Filter Plugins


    PreparationPermanent link for this heading

    For building and deploying the examples from this document, the following third-party Software is needed:

    • Java SE Development Kit: Version 1.8 or newer
    • Eclipse IDE for Java Developers

    Installation of the Mindbreeze Software Development ToolkitPermanent link for this heading

    If you are using Microsoft Windows: install the Mindbreeze SDK by executing MesSDKSetup.exe .

    If you are using Linux or OSX: extract the mes-devel-<version>.zip to a folder of your choice and add the SDK/bin folder from the archive to your Path variable.

    Generating a Mindbreeze Plugin ProjectPermanent link for this heading

    The Mindbreeze Software Development Toolkit contains a tool for generating Mindbreeze Plugin Projects: mesjavaplugin.bat for Microsoft Windows installations and mesjavaplugin.sh for Unix-based systems. The tool can be used for generating the following Mindbreeze extension types:

    datasource: Crawler, context and authorization plugin for a given data source.

    filter: Filter plugin for a given data type.

    postfilter: Post filter transformation plugin.

    itemtransformer: Item transformation plugin.

    Called without parameter the mesjavaplugin tool displays its usage with examples:

    The parameter <name> is the name of the plugin. The project will be generated in a folder with the name of this parameter lowercased in the current path.

    The parameter <base package> is the java package where the source files will be generated.

    Example 1: A Post Filter Transformation PluginPermanent link for this heading

    Please follow these steps to generate and deploy a post filter transformation plugin for editing or adding custom metadata:

    1. Create the plugin project: mesjavaplugin.sh postfilter MetadataProcessor com.myorganization
    1. Navigate to the metadataprocessor folder in your current path.
    1. Import the newly created project into your Eclipse IDE:

    1. After successfully importing the project, you will find a stub implementation of the plugin in the file MetadataProcessorPostFilter.java:

    Note: The name of the Java file is <name>PostFilter.java whereas <name> is the plugin name parameter from the previous step.

    1. Extend the source code according to your needs. For example, the following implementation would add the metadata “meta” with a string value of “value”:

    private void processRequest(FilterAndIndexRequest.Builder request) {

        // Clone the request

        Metadata.Builder metadataBuilder = request.getContentBuilder().getMetadataBuilder();

        

        NamedValue.Builder namedValueBuilder = NamedValue.newBuilder();

        namedValueBuilder.setName("meta");

        namedValueBuilder.addValue(ValueHelper.newBuilder("value"));

        metadataBuilder.addMetadatum(namedValueBuilder)

    }

    1. Build the plugin archive by executing the script build.bat on Windows Systems or build.sh on Unix in the project directory. If the process was successful, an archive with the name <name>-postfilter.zip should be produced. Again, <name> is the plugin name parameter that was specified previously.
    1. The plugin is ready to be installed in the tab “Plugins” in the Management Center:

    1. After the successful installation, the plugin can be activated for any filter service:

    Example 2: An Item Transformation PluginPermanent link for this heading

    Please follow these steps to generate an item transformer plugin for editing or adding custom metadata:

    1. Create the plugin project: mesjavaplugin.sh itemtransformer MetadataProcessor com.myorganization
    1. Navigate to the folder metadataprocessor in your current path.
    1. Import the newly created project into your Eclipse IDE (As in the previous example).
    1. After successfully importing the project, you will find a stub implementation of the plugin in the file MetadataProcessorItemTransformerService.java:

    1. Extend the code according to your needs. This example again adds a metadata named “meta” with the value “value”:

        private void processItem(Item.Builder itemBuilder) {

        itemBuilder.addProperty(

        NamedValue.newBuilder()

        .setName("meta")

        .addValue(ValueHelper.newBuilder("value"))

        );

    }

    1. Build the plugin archive by executing the script build.bat on Windows Systems or build.sh on Unix in the project directory. If the process was successful, an archive with the name <name>-postfilter.zip should have been produced. Again, <name> is the plugin name parameter that was previously specified.
    1. The plugin is ready to be installed in the tab “Plugins” in the Management Center:

    1. After the successful installation, the plugin is available for all Index Services.

    Plugin ConfigurationPermanent link for this heading

    As you could see in both examples, it is possible to define properties for the installed plugins from the configuration interface by adding custom plugin properties.

    These configuration properties are accessible in the plugin source code from the properties map:

    Map<String, List<String>> properties = null;

    The init method that is retrieving the configuration properties is called automatically if the plugin implements the com.mindbreeze.enterprisesearch.mesapi.Initializable interface.

    The previous example of an Item Transformer plugin now setting a metadata value to a configuration parameter named “meta” looks like:

        private void processItem(Item.Builder itemBuilder) {

        if (properties != null && properties.containsKey("meta")) {

        List<String> values = properties.get("meta");

        if (values != null && !values.isEmpty()) {

        String value = values.get(0);

        if (value != null) {

        itemBuilder.addProperty(

                NamedValue.newBuilder()

                .setName("meta")

                .addValue(ValueHelper.newBuilder(value))

                );

        }

        }

        }

        }

    Plugin Descriptor Configuration SectionPermanent link for this heading

    The Plugin Descriptor plugins.xml describes the plugins available in the archive. The main outline is as follows:

    version

    plugins

    Plugin

    id

    kind

    extension

    code

    if kind is CODE

    properties  

    for predefined properties that are passed to the Plugin

    config_options

    • The element config_options itself is a language for describing configuration user interface elements and therefore allows the plugin developer to extend the Mindbreeze InSpire configuration interface. As an example, the following configuration extends the configuration user interface with the “meta” property.  As of this writing the configuration interface supports English translations only. Supported input types are TEXT, NUMBER, BOOLEAN, TEXTAREA, SELECT, PASSWORD, CREDENTIAL. Default values can be added via default_string or default_numeric. Select options can be defined using the select_option element.

          <config_option>

            <Group>

              <label>

                <LangString>

                  <lang>en</lang>

                  <value>Base Configuration</value>

                </LangString>

              </label>

              <level>DEFAULT_LEVEL</level>

              <option>

                <Option>

                  <name>meta</name>

                  <input>TEXT</input>

                  <hint>The value that is added as the meta property.</hint>

                  <label>

                    <LangString>

                      <lang>en</lang>

                      <value>meta property value</value>

                    </LangString>

                  </label>

                  <option />

                </Option>            

              </option>

            </Group>

          </config_option>

          

    Download PDF

    • Developing Item Transformation and Post Filter Plugins with the Mindbreeze SDK

    Content

    • Preparation
    • Installation of the Mindbreeze Software Development Toolkit
    • Generating a Mindbreeze Plugin Project
    • Example 1: A Post Filter Transformation Plugin
    • Example 2: An Item Transformation Plugin
    • Plugin Configuration

    Download PDF

    • Developing Item Transformation and Post Filter Plugins with the Mindbreeze SDK