Documentation
¶
Index ¶
- Constants
- type ElasticV6
- func (e *ElasticV6) Close() error
- func (e *ElasticV6) DeleteCollection(ids ...string) error
- func (e *ElasticV6) DeleteItem(ids ...string) error
- func (e *ElasticV6) DeleteLink(ids ...string) error
- func (e *ElasticV6) DeleteResource(ids ...string) error
- func (e *ElasticV6) DeleteVersion(ids ...string) error
- func (e *ElasticV6) InsertCollection(id string, in *wyc.Collection) error
- func (e *ElasticV6) InsertItem(id string, in *wyc.Item) error
- func (e *ElasticV6) InsertLink(id string, in *wyc.Link) error
- func (e *ElasticV6) InsertResource(id string, in *wyc.Resource) error
- func (e *ElasticV6) InsertVersion(id string, in *wyc.Version) error
- func (e *ElasticV6) QueryCollection(limit, offset int, in ...*wyc.QueryDesc) ([]string, error)
- func (e *ElasticV6) QueryItem(limit, offset int, in ...*wyc.QueryDesc) ([]string, error)
- func (e *ElasticV6) QueryLink(limit, offset int, in ...*wyc.QueryDesc) ([]string, error)
- func (e *ElasticV6) QueryResource(limit, offset int, in ...*wyc.QueryDesc) ([]string, error)
- func (e *ElasticV6) QueryVersion(limit, offset int, in ...*wyc.QueryDesc) ([]string, error)
- func (e *ElasticV6) UpdateCollection(id string, doc *wyc.Collection) error
- func (e *ElasticV6) UpdateItem(id string, doc *wyc.Item) error
- func (e *ElasticV6) UpdateLink(id string, doc *wyc.Link) error
- func (e *ElasticV6) UpdateResource(id string, doc *wyc.Resource) error
- func (e *ElasticV6) UpdateVersion(id string, doc *wyc.Version) error
- type Searchbase
- type Settings
Constants ¶
const ( // Driver name strings DriverElastic = "elastic" DriverBleve = "bleve" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticV6 ¶
type ElasticV6 struct {
// contains filtered or unexported fields
}
func (*ElasticV6) DeleteCollection ¶
Delete collections by ID(s)
func (*ElasticV6) DeleteItem ¶
Delete items by ID(s)
func (*ElasticV6) DeleteLink ¶
Delete links by ID(s)
func (*ElasticV6) DeleteResource ¶
Delete resources by ID(s)
func (*ElasticV6) DeleteVersion ¶
Delete versions by ID(s)
func (*ElasticV6) InsertCollection ¶
func (e *ElasticV6) InsertCollection(id string, in *wyc.Collection) error
Insert collection using the given id
func (*ElasticV6) InsertItem ¶
Insert collection using the given id
func (*ElasticV6) InsertLink ¶
Insert link using the given id
func (*ElasticV6) InsertResource ¶
Insert resource using the given id
func (*ElasticV6) InsertVersion ¶
Insert version using the given id
func (*ElasticV6) QueryCollection ¶
Query for collections
int: 'limit' results to at most int (where 0 indicates there is no limit) int: 'from' what number to start returning results from ...QueryDes: description(s) of what to search for
Ids will be returned for any doc matching all of the fields of any of the given QueryDesc
func (*ElasticV6) QueryItem ¶
Query for items
int: 'limit' results to at most int (where 0 indicates there is no limit) int: 'from' what number to start returning results from ...QueryDes: description(s) of what to search for
Ids will be returned for any doc matching all of the fields of any of the given QueryDesc
func (*ElasticV6) QueryLink ¶
Query for links
int: 'limit' results to at most int (where 0 indicates there is no limit) int: 'from' what number to start returning results from ...QueryDes: description(s) of what to search for
Ids will be returned for any doc matching all of the fields of any of the given QueryDesc
func (*ElasticV6) QueryResource ¶
Query for resources
int: 'limit' results to at most int (where 0 indicates there is no limit) int: 'from' what number to start returning results from ...QueryDes: description(s) of what to search for
Ids will be returned for any doc matching all of the fields of any of the given QueryDesc
func (*ElasticV6) QueryVersion ¶
Query for versions
int: 'limit' results to at most int (where 0 indicates there is no limit) int: 'from' what number to start returning results from ...QueryDes: description(s) of what to search for
Ids will be returned for any doc matching all of the fields of any of the given QueryDesc
func (*ElasticV6) UpdateCollection ¶
func (e *ElasticV6) UpdateCollection(id string, doc *wyc.Collection) error
Update collection with given id
func (*ElasticV6) UpdateItem ¶
Update item with given id
func (*ElasticV6) UpdateLink ¶
Update link with given id
func (*ElasticV6) UpdateResource ¶
Update resource with given id
type Searchbase ¶
type Searchbase interface { // Kill connection to remote host(s) Close() error // Insert collection into the sb with the given Id InsertCollection(string, *wyc.Collection) error // Insert item into the sb with the given Id InsertItem(string, *wyc.Item) error // Insert version into the sb with the given Id InsertVersion(string, *wyc.Version) error // Insert resource into the sb with the given Id InsertResource(string, *wyc.Resource) error // Insert link into the sb with the given Id InsertLink(string, *wyc.Link) error // Update the facets of the collection with the given id with the given facets UpdateCollection(string, *wyc.Collection) error // Update the facets of the resource with the given id with the given facets UpdateResource(string, *wyc.Resource) error // Update the facets of the link with the given id with the given facets UpdateLink(string, *wyc.Link) error // Update the facets of the item with the given id with the given facets UpdateItem(string, *wyc.Item) error // Update the facets of the version with the given id with the given facets UpdateVersion(string, *wyc.Version) error // Delete collection search data by Id(s) // Note that deleting something and making it unavailable to search for effectively means // that the server will never return the data for it, even if it still exists in the database. DeleteCollection(...string) error // Delete item search data by Id(s) DeleteItem(...string) error // Delete version search data by Id(s) DeleteVersion(...string) error // Delete resource search data by Id(s) DeleteResource(...string) error // Delete link search data by Id(s) DeleteLink(...string) error // Query for collections // int: 'limit' results to at most int (where 0 indicates there is no limit) // int: 'from' what number to start returning results from // ...QueryDes: description(s) of what to search for // Ids will be returned for any doc matching all of the fields of any of the given QueryDesc QueryCollection(int, int, ...*wyc.QueryDesc) ([]string, error) // Query for items // int: 'limit' results to at most int (where 0 indicates there is no limit) // int: 'from' what number to start returning results from // ...QueryDes: description(s) of what to search for // Ids will be returned for any doc matching all of the fields of any of the given QueryDesc QueryItem(int, int, ...*wyc.QueryDesc) ([]string, error) // Query for versions // int: 'limit' results to at most int (where 0 indicates there is no limit) // int: 'from' what number to start returning results from // ...QueryDes: description(s) of what to search for // Ids will be returned for any doc matching all of the fields of any of the given QueryDesc QueryVersion(int, int, ...*wyc.QueryDesc) ([]string, error) // Query for resources // int: 'limit' results to at most int (where 0 indicates there is no limit) // int: 'from' what number to start returning results from // ...QueryDes: description(s) of what to search for // Ids will be returned for any doc matching all of the fields of any of the given QueryDesc QueryResource(int, int, ...*wyc.QueryDesc) ([]string, error) // Query for links // int: 'limit' results to at most int (where 0 indicates there is no limit) // int: 'from' what number to start returning results from // ...QueryDes: description(s) of what to search for // Ids will be returned for any doc matching all of the fields of any of the given QueryDesc QueryLink(int, int, ...*wyc.QueryDesc) ([]string, error) }
Interface to a data store whose primary goal is running search queries rather than storage.
func Connect ¶
func Connect(settings *Settings) (Searchbase, error)
Return a connect function for the given settings, or err if it can't be found