What's required to get Lycan connected with an Elasticsearch instance
Improve Docs

Requirements

We can host an ES search instance for you or you can host your own ES instance which will give you a lot more flexibility in the long run. Elastic themselves provide cloud based service.

An instance/machine with 2GB RAM, 30GB HDD space and a decent CPU is recommended for anything from 0 - 100,000 properties. Since ES is Java based it takes up a fair bit of memory.

Config Changes

ES also supports scripting to create complex filters or computed values. Their own langauge is called Painless and we have created a couple of scripts that will allow you to filter your property set based on their currently availability.

Unfortunately, Painless does not have a native split() function which we need, so currently we use the regex split() in Painless which requires a config option to be enabled.

Assuming ES will be installed on a Linux instance:

In /etc/elasticsearch/elasticsearch.yml the following needs to be added/modified:

Add script.painless.regex.enabled: true

Once Painless supports a native split method, we’ll update the scripts this method can be removed.

Pre-loaded Scripts

These scripts can be inlined when executing a query but it is not recommended. If you are hosting your own instance, you should store them using the ES API and reference them. This allows you to ban inline queries stopping a potential vector for malicious activities.

See https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html#modules-scripting-stored-scripts for storing scripts.

Security Considerations

It is important to note that having an ES instance open to the public can cause a few problems. It is reccommended that you lock down permissions to perform any action other than GET requests for pulling property data without credentials or have a guest credential set.

Please read https://www.elastic.co/blog/found-elasticsearch-security for a comprehensive write up on the matter.

See https://www.elastic.co/guide/en/elastic-stack-overview/current/xpack-security.html for locking down the instance.

If you are using one of our instances, this will all be configured beforehand and the required credentials provided.

Tags: admin