Documentation ¶
Index ¶
- type Index
- func (i *Index) ContainsQuery(q query.Query, verbose int) (docs []index.Document, total int, err error)
- func (i *Index) Create() error
- func (i *Index) DocumentCount() (count int64)
- func (i *Index) Drop() (err error)
- func (i *Index) FullTextQuerySingleField(q query.Query, verbose int) (docs []index.Document, total int, err error)
- func (i *Index) GetName() string
- func (i *Index) Index(docs []index.Document, options interface{}) error
- func (i *Index) PrefixQuery(q query.Query, verbose int) (docs []index.Document, total int, err error)
- func (i *Index) SuffixQuery(q query.Query, verbose int) (docs []index.Document, total int, err error)
- func (i *Index) WildCardQuery(q query.Query, verbose int) (docs []index.Document, total int, err error)
- type IndexingOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
Index is an interface to redisearch's redis connads
func NewIndex ¶
func NewIndex(addrs []string, pass string, temporary int, name string, md *index.Metadata, mode string, withSuffixTrie bool) *Index
NewIndex creates a new index connecting to the redis host, and using the given name as key prefix
func (*Index) ContainsQuery ¶ added in v0.1.5
func (*Index) DocumentCount ¶ added in v0.1.3
func (*Index) FullTextQuerySingleField ¶
func (i *Index) FullTextQuerySingleField(q query.Query, verbose int) (docs []index.Document, total int, err error)
Search searches the index for the given query, and returns documents, the total number of results, or an error if something went wrong
func (*Index) Index ¶
Index indexes multiple documents on the index, with optional IndexingOptions passed to options
func (*Index) PrefixQuery ¶
func (*Index) SuffixQuery ¶ added in v0.1.5
type IndexingOptions ¶
type IndexingOptions struct { // the language of the document, for stemmer analysis Language string // whether we should use stemming on the document. NOT SUPPORTED BY THE ENGINE YET! Stemming bool // If set, we will not save the documents contents, just index them, for fetching ids only NoSave bool NoFieldFlags bool NoScoreIndexes bool NoOffsetVectors bool Prefix string }
IndexingOptions are flags passed to the the abstract Index call, which receives them as interface{}, allowing for implementation specific options
Click to show internal directories.
Click to hide internal directories.