Documentation
¶
Index ¶
- type Index
- func (i *Index) AddTerms(terms ...index.Suggestion) error
- func (i *Index) Create() error
- func (i *Index) Delete() error
- 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) Suggest(prefix string, num int, fuzzy bool) ([]index.Suggestion, 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) AddTerms ¶
func (i *Index) AddTerms(terms ...index.Suggestion) error
AddTerms add suggestion terms to the suggester index
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
Click to show internal directories.
Click to hide internal directories.