search

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TsLayout = "2006-01-02T15:04:05.000Z"
	TopTen   = 10
)

Variables

View Source
var EsHostPort = "http://127.0.0.1:9200"
View Source
var EsIndex = "unifiedbeat-*"
View Source
var MaxSearchResults = 100

Functions

func Configure

func Configure(s Elasticsearch)

func EsClient

func EsClient() (*elastic.Client, error)

func EsGetId

func EsGetId(client *elastic.Client,
	esIndex string, esId string) (*elastic.GetResult, error)

func EsMaxSearchResults

func EsMaxSearchResults() int

func EsPing

func EsPing(client *elastic.Client) (*elastic.PingResult, int, error)

func EsQuery

func EsQuery(
	client *elastic.Client, docType string, q string,
	sortBy string, sortAsc bool) (*elastic.SearchResult, error)

func EsTermsAgg

func EsTermsAgg(
	client *elastic.Client, maxAggResults int,
	term string) (*elastic.AggregationBucketKeyItems, error)

Types

type Elasticsearch

type Elasticsearch struct {
	EsHostPort       string `json:"EsHostPort"`
	EsIndex          string `json:"EsIndex"`
	MaxSearchResults int    `json:"MaxSearchResults"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL