ElasticSearch is an integral component of Altis, enabling enhanced search and relevancy as well as powering the analytics data query layer.
Local Server provides Kibana out of the box, a powerful tool for viewing indexes, creating and debugging queries and more.
Kibana is available at
Adding Index Patterns
Before you can get started querying in Kibana you'll need to add some index patterns at
Enter an index pattern into the field (available indexes are shown below) using wildcards if you wish to work across multiple indexes at a time. You will then be prompted to choose a date field to use for time series filters, make your selection, for example
post_date, and save your index pattern to start analysing your data.
You can add additional index patterns from the Kibana Management page in future.
Note: When adding an index pattern for the
analytics index choose "I don't want to use the Time Filter" from the dropdown on the next screen. Analytics event timestamps are stored in milliseconds and Kibana's time filter does not currently work with this by default.
Developing & Debugging Queries
Use the Dev Tools tab at
/kibana/app/kibana#/dev_tools/console to enter and run queries. This provides useful features including autocomplete based on your data and linting.
Viewing & Understanding Data
The easiest way to view your data is in the Discover tab at
/kibana/app/kibana#/discover. Here you can create basic queries, select and sort by columns as well drill down into the indexed data to see it's structure and data types.
Accessing ElasticSearch Directly
The ElasticSearch hostname is not directly exposed however you can find the dynamic port and IP to connect to by running
composer server status | grep elasticsearch.
You should see output similar to this:
project_elasticsearch_1 /elastic-entrypoint.sh ela ... Up (healthy) 0.0.0.0:32871->9200/tcp, 9300/tcp
Copy the mapped IP and port (highlighted in bold above) and use it to query ElasticSearch directly:
curl -XGET http://0.0.0.0:32871