Skip to content

set @query_dsl parameter directly , without using query_template file #114

@al-ah

Description

@al-ah

i need set @query_dsl parameter directly , without using query_template
like this :

elasticsearch {    
		hosts => "localhost:9200"
		index => ".ml-anomalies-*"
	        query_dsl => '{
                 "size": 20, 
		  "query": {
		    "bool": {
		      "filter": [
		        {
		          "range": {
		            "record_score": {
		              "gte": %{[my_field]}
		            }
		          }
		        },
		        .
		        .
		        .
		        .
		      ]
		    }
		  },
		  "sort": [
		    {
		      "record_score": {
		        "order": "desc"
		      }
		    }
		  ],
		  "_source": [
		    "job_id",
		    .
		    .
		    .
		  ]
                }'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions