예제 #1
0
func initialize() *MemSearch {
	ms := new(MemSearch)
	ms.Init()

	testx.AddDocs(ms)
	return ms
}
예제 #2
0
func initialize() *Elastic {
	addr := os.Getenv("ELASTICSEARCH_PORT_9200_TCP_ADDR")
	if len(addr) == 0 {
		return nil
	}

	es := new(Elastic)
	es.Init("http://" + addr + ":9200")
	es.DropIndex()
	testx.AddDocs(es)
	return es
}