Open topic with navigation

# Configure Entity Search

Entity searches allow users to run an additional entity search against a special IDOL Content component.

When you configure entity search, users can select text in the Find user interface and it opens a dialog box with search results from the entity Content. You can also configure an Answer Server, in which case the dialog box includes a question input field.

You configure entity search by adding the `entitySearch` section to your `config.json` configuration file, with details of the search components to use, and any custom fields.

To configure entity search

1. Go to the Find home directory.
2. Open `config.json` in a text editor.

3. Find or add the `entitySearch` section.

4. Set the `enabled` property to true to enable entity search.

5. Add a `server` property to set the details for your entity search component. This property is an object, which accepts the subproperties described in the following table. In most cases, you must change at least `host` and `port` to the appropriate values for your IDOL Content component.

   `host` | (String) The host name or IP address of the component to use for entity search. The default value is `localhost`.
   `port` | (Integer) The port of the component to use for entity search. The default value is `9050`.
   `protocol` | (String) The protocol to use to connect to the IDOL Content component. The default value is `HTTP`.

6. To enable an Answer Server to use for entity search, add an `answerServer` property. This property is an object.

   To enable Answer Server, set the `enabled` subproperty to true and add a `server` subproperty to set the details for your entity search Answer Server.

   This `server` object contains the same subproperties as for the main entity search component (see Step 5), with the following default values:

       "server": {
          "protocol": "HTTP",
          "host": "localhost",
          "port": 7700
       }

   In most cases, you must change at least `host` and `port` to the appropriate values for your Answer Server.

   In the `answerServer` object, you can optionally also set `systemNames` to an array of Answer Server systems that you want to query. By default, Find uses all systems.

7. Set any additional optional parameters in the `entitySearch` object. The following table lists the available parameters.

   `absWeight` | (Boolean) Set to true to use the `AbsWeight` parameter in the entity search, to return result weighting as absolute values rather than percentages. The default value is false. For more information about `AbsWeight`, refer to the IDOL Server Reference.
   `agentBooleanField` | (String) A field in your entity search index that contains AgentBoolean expressions. For more information, refer to the IDOL Server Reference.
   `combine` | (String) The combine option to use in queries to the entity search Content. For more information, refer to the IDOL Server Reference.
   `databaseChoices` | (Object) The database options to provide to users to control the databases that Find searches when a user highlights text for entity search. The `databaseChoices` object contains a property for each option that you want to display in the database group list. The key (the name of the property) is the display name to use in Find. Set the property to an array of the IDOL databases to use for this option. For example, `"Places" : ["Places", "PlacesExtended"]` creates a Places database option in the Find user interface and maps it to the `Places` and `PlacesExtended` IDOL databases. TIP: In your HTML, you can control the database group to use when a user highlights the text in a particular HTML element, by using the `data-entity-search-database-group` HTML attribute. This attribute sets a default database group to use for a particular element. For example, if you have an element that displays place names, you might set the attribute `data-entity-search-database-group="Places"`. If the user has selected a database group, their explicit selection takes precedence. You can use this option in a custom template (see Configure Templates).
   `databaseChoicesVisible` | (Boolean) Whether to display a menu in the user interface to allow users to explicitly choose a database group.
   `idolPrintFields` | (Array, strings) A list of fields from your IDOL documents to display in the entity search results.

8. Save the file, and then restart Find to apply your configuration changes.

For example:

    "entitySearch" : {
       "server" : {
          "protocol" : "HTTP",
          "host" : "entitycontent.example.com",
          "port" : 9000
       },
       "enabled" : true,
       "agentBooleanField" : "AGENTBOOL",
       "combine" : "FieldCheck",
       "idolPrintFields" : [ "WIKIPEDIA_ENG", "WIKIPEDIA_IMAGE", "PERSON_DATE_OF_BIRTH", "PERSON_DATE_OF_DEATH", "PERSON_PROFESSION", "WIKIPEDIA_IMAGE", "LAT", "LON", "PLACE_COUNTRY_CODE", "PLACE_REGION1", "PLACE_POPULATION", "PLACE_TIMEZONE", "WIKIPEDIA_IMAGE", "URL_HOMEPAGE", "COMPANY_GOOGLE" ],
       "databaseChoices" : {
          "All": ["*"],
          "People" : ["People"],
          "Companies" : ["Companies"],
          "Places" : ["Places", "PlacesExtended"]
       },
       "databaseChoicesVisible": true,
       "answerServer": {
          "server": {
             "protocol": "HTTP",
             "host": "10.2.21.210",
             "port": 16000
          },
          "systemNames": ["FactBank", "PassageExtractor"],
          "enabled": true
       }
    }

After you configure entity search, you might also want to configure a custom template to display entity search results. See Configure Templates.

© Copyright 2015-2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm