B.3. Accessing plugins

If you start Elasticsearch now that you’ve installed the elasticsearch-head plugin, you’ll see the log lines shown in the next listing.

Listing B.5. Example output starting Elasticsearch with the head plugin installed

[INFO ][node ] [Black Widow] version[1.5.1], pid[33030], build[5e38401/2015-04-09T13:41:35Z]

[INFO ][node ] [Black Widow] initializing ...

[INFO ][plugins ] [Black Widow] loaded [], sites [head]

[INFO ][node ] [Black Widow] initialized [INFO ][node ] [Black Widow] starting ...

[INFO ][transport ] [Black Widow] bound_address {inet[/

0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.0.4:9300]}

[INFO ][discovery ] [Black Widow] elasticsearch/evzmesg5QlmRjffe-

HnGIw

[INFO ][cluster.service ] [Black Widow] new_master [Black

Widow][evzmesg5QlmRjffe-HnGIw][Xanadu-2.domain][inet[/

192.168.0.4:9300]], reason: zen-disco-join (elected_as_master)

[INFO ][http ] [Black Widow] bound_address {inet[/

0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.0.4:9200]}

[INFO ][node ] [Black Widow] started

Pay close attention to the loaded [], sites [head] text. This text indicates which plugins

Elasticsearch has loaded; in this case, the empty [] means that there are no code plugins installed. The [head] text shows that the head plugin has been installed and detected correctly by Elasticsearch. If the plugin doesn’t show up in these log messages, it most likely hasn’t been installed correctly.

Once Elasticsearch has been started with a site plugin installed, you can navigate to the HTML for the plugin by going to http://localhost:9200/_plugin/head in any web browser.

Figure B.2 is an example screenshot of the elasticsearch-head plugin running.

Figure B.2. Screenshot of the elasticsearch-head plugin

To access a site plugin, visit http://localhost:9200/_plugin/<name&gt;, where <name> is the name of the plugin that you’ve installed. This works for all site plugins, but what about code plugins? Other than seeing the name of the plugin in the loaded [myplugin] log message when starting Elasticsearch, how you access a code plugin will differ depending on what the plugin is doing. A plugin that adds different analyzers for Elasticsearch will be used by specifying the new analyzer name in the mapping; a plugin that adds a new type of query will be accessed through the regular query DSL. These plugins may also require configuration via values added to the elasticsearch.yml file. Check the documentation for the plugin you’re installing to see how it should be correctly configured.