Documentation ¶
Index ¶
- type Index
- func (i *Index) ContainsQuery(q query.Query, verbose int) ([]index.Document, int, error)
- func (i *Index) Create() error
- func (i *Index) Delete() error
- func (i *Index) DocumentCount() int64
- func (i *Index) Drop() error
- func (i *Index) FullTextQuerySingleField(q query.Query, verbose int) ([]index.Document, int, error)
- func (i *Index) GetName() string
- func (i *Index) Index(docs []index.Document, opts interface{}) error
- func (i *Index) PrefixQuery(q query.Query, verbose int) ([]index.Document, int, error)
- func (i *Index) SuffixQuery(q query.Query, verbose int) ([]index.Document, int, error)
- func (i *Index) WildCardQuery(q query.Query, verbose int) ([]index.Document, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is an ElasticSearch index
func NewIndex ¶
func NewIndex(addr, name, typ string, disableCache bool, md *index.Metadata, user, pass string, shardCount, replicaCount, indexerNumCPUs int, tlsSkipVerify bool, bulkIndexerFlushIntervalSeconds int, bulkIndexerRefresh string) (*Index, error)
NewIndex creates a new elasticSearch index with the given address and name. typ is the entity type
func (*Index) ContainsQuery ¶ added in v0.1.5
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html
func (*Index) DocumentCount ¶ added in v0.1.3
func (*Index) FullTextQuerySingleField ¶
Search searches the index for the given query, and returns documents, the total number of results, or an error if something went wrong https://www.elastic.co/guide/en/elasticsearch/reference/current/full-text-queries.html
func (*Index) PrefixQuery ¶
Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html
func (*Index) SuffixQuery ¶ added in v0.1.5
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html