by admin | Mar 7, 2017 | Golang + Elasticsearch
Example shows simple Elasticsearch aggregation in golang program – count distinct values for given term and show results in alphabetical order. package main import ( "log" "fmt" elastic "gopkg.in/olivere/elastic.v3" ) func main() {...
by admin | Mar 7, 2017 | Golang + Elasticsearch
Small example how to delete documents from Elasticsearch using program in golang. Query contains both term query and range query. Column “@timestamp” is unix timestamp in miliseconds. Of course on Elasticsearch 2.x you must install plugin “delete by...
by admin | Feb 16, 2017 | Golang + Elasticsearch
Before you start to feed any data into Elasticsearch you have to define Elasticsearch mapping! This is really necessary because otherwise if you try to insert decimal numbers Elasticsearch can take them as type long. To must map them as “double” before you...