Documentation ¶
Overview ¶
Index objects that implement the Indexable interface. All in memory right now, but the possibility is open to later saving the index to disk for later use if a full solr installation (with the attendant improved functionality, admittedly) is not needed.
Index ¶
- func CreateNewCollection(idxName string)
- func DeleteCollection(idxName string) error
- func DeleteItemFromCollection(idxName string, doc string) error
- func Endpoints() []string
- func IndexObj(object Indexable)
- func SearchIndex(idxName string, term string, notop bool) (map[string]*IdxDoc, error)
- func SearchRange(idxName string, field string, start string, end string, inclusive bool) (map[string]*IdxDoc, error)
- func SearchText(idxName string, term string, notop bool) (map[string]*IdxDoc, error)
- type IdxCollection
- type IdxDoc
- type Index
- type Indexable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewCollection ¶
func CreateNewCollection(idxName string)
Create an index for data bags when they are created, rather than when the first data bag item is uploaded
func DeleteCollection ¶
Delete a collection from the index. Useful only for data bags.
func DeleteItemFromCollection ¶
Delete an item from a collection
func SearchIndex ¶
Search for a string in the given index. Returns a slice of names of matching objects, or an error on failure.
func SearchRange ¶
Types ¶
type IdxCollection ¶
type IdxCollection struct {
// contains filtered or unexported fields
}
type IdxDoc ¶
type IdxDoc struct {
// contains filtered or unexported fields
}
func (*IdxDoc) RangeSearch ¶
Click to show internal directories.
Click to hide internal directories.