Skip to content

onuragtas/go_elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Install

go get github.com/onuragtas/go_elasticsearch

#Usage

import (
	"github.com/onuragtas/go_elasticsearch"
	v7 "github.com/onuragtas/go_elasticsearch/adapters/v7"
)
func TestSearchV7(t *testing.T) {
	adapter := v7.NewElasticSearch("http://localhost:9200", "epa", "_doc", 0, 100)
	operation := go_elasticsearch.NewOperation(adapter)

	mainQuery := go_elasticsearch.Main{}
	mainQuery.Query.Bool.Must = operation.AddToTerm(mainQuery.Query.Bool.Must, "id", 99516062)

	result, err := operation.Search(mainQuery)
	log.Println(result, err)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages