Connecting to Elasticsearch
Prerequisites
- PuppyGraph version 1.3.0 or higher.
- Every configured Elasticsearch host is accessible over the network from the PuppyGraph instance.
Configuration
| Configuration | Explanation |
|---|---|
| Username | The username used to authenticate with the Elasticsearch cluster |
| Password | The password of the user |
| Server Hosts | One or more Elasticsearch HTTP endpoints, e.g. http://es-node1:9200. Add one entry per node, or a single entry pointing at a load balancer in front of the cluster. Both http and https endpoints are supported. |
Authentication
PuppyGraph authenticates to Elasticsearch with basic authentication (username and password). Other Elasticsearch authentication mechanisms, such as API keys, service account tokens, and client certificates (PKI), are not currently supported.
Leave Username and Password empty only if the cluster runs with security disabled.
TLS
To connect over TLS, use https:// endpoints in Server Hosts. No further TLS configuration is required: PuppyGraph does not require the cluster's certificate to be issued by a publicly trusted authority, so clusters using self-signed or private-CA certificates work without importing a CA certificate into PuppyGraph.
Mutual TLS (client certificate authentication) is not supported; see Authentication for the supported mechanism.
How Indices Are Mapped
Elasticsearch has no databases or tables, so PuppyGraph presents every index of the cluster as a table under a single database named default_db. Each document becomes a row, and each mapped field becomes a column. When selecting data for nodes and edges, use default_db as the schema and the index name as the table.
Demo
See Querying Elasticsearch Data as a Graph for a complete demo for Elasticsearch. The demo includes setting up the connection to an Elasticsearch instance.
Data Type Mapping
| Elasticsearch Type | PuppyGraph Type | Description |
|---|---|---|
boolean |
Boolean |
True or false |
byte |
Byte |
8-bit signed integers |
short |
Short |
16-bit signed integers |
integer |
Int |
32-bit signed integers |
long |
Long |
64-bit signed integers |
unsigned_long |
HugeInt |
Unsigned 64-bit integers |
half_float |
Float |
Half-precision 16-bit floating point |
float |
Float |
32-bit IEEE 754 floating point |
double |
Double |
64-bit IEEE 754 floating point |
scaled_float |
Double |
Floating point scaled by a fixed factor |
keyword |
String |
Exact-value strings for filtering and identifiers |
text |
String |
Analyzed full-text strings |
wildcard |
String |
Strings optimized for wildcard matching |
ip |
String |
IPv4 and IPv6 addresses |
date |
DateTime |
Timestamps |
object |
JSON |
Nested JSON objects |
nested |
JSON |
Arrays of objects indexed as separate documents |
geo_point |
String |
Latitude and longitude pairs |
Use keyword fields (rather than text) for document identifiers and the fields that connect nodes and edges, since these are matched by exact value.