Setting up the full text search server

To set up and configure the full text search capabilities, you must configure an Elasticsearch server, the Kafka framework, MDM metadata, and the SearchGuard plugin.

About this task

Note: Elasticsearch is no longer packaged as part of InfoSphere® MDM. You can continue to use full text searches that leverage Elasticsearch in your InfoSphere MDM solution, but you must deploy and configure your own Elasticsearch server. For more information about Elasticsearch and to get started with a free trial, see the Elasticsearch web site.

This procedure configures Elasticsearch with the elasticsearch.yml file, starts the Elasticsearch server, creates an index to synchronize your MDM data, and changes the tokenizer so that users can include special characters in their full text searches.

Procedure

  1. Browse to the Elasticsearch installation location.
  2. Open the configuration file elasticsearch.yml for editing.
  3. Provide values, specific to your deployment instance, for the following properties:
    • cluster.name - a descriptive name for the cluster.
    • node.name - a descriptive name for the node.
    • network.host - the bind address for a specific IP address (IPv4 or IPv6).
      Note: To be able to run Elasticsearch REST APIs from another machine, set this value to network.host: 0.0.0.0.
    • http.port - a custom port for HTTP.
    • discovery.zen.ping.unicast.hosts - An initial list of hosts to perform discovery on when a new node starts.
  4. If the Elasticsearch server will run on a separate host from web applications that will run full text searches (such as the Consent UI), then enable CORS (Cross Origin Resource Sharing) on the Elasticsearch server by adding the following lines to elasticsearch.yml:
    http.cors.enabled : true
    http.cors.allow-origin : "*"
    http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
    http.cors.allow-headers : Authorization,X-Requested-With,X-Auth-Token,Content-Type, Content-Length
    
    Tip: Alternatively, to be more restrictive, replace the "*" value of http.cors.allow-origin with the host name of your web application server.
  5. Start Elasticsearch:
    1. Browse to ELASTICSEARCH_INSTALL_HOME\elasticsearch-6.2.4\bin.
    2. Start the Elasticsearch service:
      • On Microsoft Windows systems, run elasticsearch.bat.
      • On Linux® or UNIX systems, run elasticsearch.
    3. Ensure that the service starts correctly.
  6. Create the search index with the name "collection":
    curl -XPUT "http://localhost:9200/collection/"
    Note: Do not change the index name. There are references to it from the provided Kafka scripts that synchronize data.
  7. Enable the full text search service to handle special characters:
    1. Close the search index before changing settings:
      curl -XPOST "http://localhost:9200/collection/_close"
    2. Change the search settings to use white space as a tokenizer:
      curl -XPUT "http://localhost:9200/collection/_settings" -H "Content-Type: application/json" -d '{
        "analysis" : {
          "search_quote_analyzer":{
           "content":{
              "type":"custom",
              "tokenizer":"whitespace"
            }
          }
        }
      }'
      
    3. Reopen the index:
      curl -XPOST "http://localhost:9200/collection/_open"