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
-
Browse to the Elasticsearch installation location.
- Open the configuration file elasticsearch.yml for
editing.
- Provide values, specific to your deployment instance, for the following properties:
-
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.
- Start Elasticsearch:
- Browse to
ELASTICSEARCH_INSTALL_HOME\elasticsearch-6.2.4\bin.
- Start the Elasticsearch service:
- On Microsoft Windows systems, run
elasticsearch.bat.
- On Linux® or UNIX systems, run
elasticsearch.
- Ensure that the service starts correctly.
- 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.
- Enable the full text search service to handle special characters:
- Close the search index before changing settings:
curl -XPOST "http://localhost:9200/collection/_close"
- 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"
}
}
}
}'
- Reopen the index:
curl -XPOST "http://localhost:9200/collection/_open"