ElasticsearchQuery

Enterprise Edition

Labels: :IA_Function:IA_ElasticsearchQuery
Inherits from: Function

The ElasticsearchQuery Function executes a query in Elasticsearch (if available).

Function parameters

Key Description Default value Possible values
query The inline.query part of an Elasticsearch Search Template request. object
params The parameters and their values to fill into {{placeholders}} in the query. object
size The number of results to return. number
store The Elasticsearch store to run the query on. string

Note: The Search Template of ElasticSearch 5.x replaced the Template Query of earlier Elasticsearch versions. The ElasticsearchQuery Function can work with both, without any adaptation of parameters.

Outgoing triggers

Type: success

Occurrence: When the user clicks an event.

Additional event properties (besides the inherited properties):

Key Description Possible values
elasticsearch The raw Elasticsearch results from the Search API object
processed Corresponding Neo4j nodes and relations retrieved from the Elasticsearch result. object
processed.nodes Neo4j nodes Array
processed.relations Neo4j relations Array
meta.store Elasticsearch store the query was run on string
meta.neo4jStore Neo4j store the nodes and relations were retrieved from. string

Consider the following ElasticsearchQuery:

{
  	"$query.query_string.query": "{{myPlaceholder}}",
  	"$size": "40",
  	"name": "Quick Search",
}

The query parameter implements a very simple Query String, allowing intuitive fulltext search.

In order to execute the query this AND that OR thus, the Trigger to the ElasticsearchQuery should fill in the search parameter for the template:

{
	"$params.myPlaceholder": "this AND that OR thus"
}