Documentation ¶
Index ¶
Constants ¶
View Source
const ( INDEX = "index" VENDOR_ELASTIC = "elastic" VENDOR_BLEVE = "bleve" )
Variables ¶
This section is empty.
Functions ¶
func CreateElasticClient ¶
Types ¶
type BleveEngine ¶
type BleveEngine struct { }
func (*BleveEngine) BatchIndex ¶
func (be *BleveEngine) BatchIndex(documents []*Document) (int64, error)
func (*BleveEngine) Delete ¶
func (be *BleveEngine) Delete() error
func (*BleveEngine) Search ¶
func (be *BleveEngine) Search(query string) (interface{}, error)
func (*BleveEngine) SetKVStore ¶
func (be *BleveEngine) SetKVStore(storeName string) error
type ElasticEngine ¶
type ElasticEngine struct {
Client *elastic.Client
}
func (*ElasticEngine) BatchIndex ¶
func (es *ElasticEngine) BatchIndex(documents []*Document) (int64, error)
func (*ElasticEngine) Delete ¶
func (es *ElasticEngine) Delete() error
func (*ElasticEngine) Search ¶
func (es *ElasticEngine) Search(query string) (interface{}, error)
type SearchEngine ¶
type SearchEngine interface { BatchIndex(documents []*Document) (int64, error) Index(document *Document) (int64, error) Search(query string) (interface{}, error) Delete() error }
func GetSearchEngine ¶
func GetSearchEngine(url *string, vendor *string, KVStore string) (SearchEngine, error)
Click to show internal directories.
Click to hide internal directories.