Documentation ¶
Index ¶
- Constants
- Variables
- func IsSearchError(err error) bool
- func NewSearchError(httpCode int, code ErrCode, msg string, args ...interface{}) error
- type ErrCode
- type Error
- type IndexDocumentsOptions
- type NoopStore
- func (n *NoopStore) AllCollections(context.Context) (map[string]*tsApi.CollectionResponse, error)
- func (n *NoopStore) CreateCollection(context.Context, *tsApi.CollectionSchema) error
- func (n *NoopStore) DeleteDocuments(context.Context, string, string) error
- func (n *NoopStore) DescribeCollection(context.Context, string) (*tsApi.CollectionResponse, error)
- func (n *NoopStore) DropCollection(context.Context, string) error
- func (n *NoopStore) IndexDocuments(context.Context, string, io.Reader, IndexDocumentsOptions) error
- func (n *NoopStore) Search(context.Context, string, *qsearch.Query, int) ([]tsApi.SearchResult, error)
- func (n *NoopStore) UpdateCollection(context.Context, string, *tsApi.CollectionUpdateSchema) error
- type Store
Constants ¶
View Source
const StreamContentType = "application/x-json-stream"
Variables ¶
View Source
var ( ErrDuplicateEntity = NewSearchError(http.StatusConflict, ErrCodeDuplicate, "entity already exists") ErrNotFound = NewSearchError(http.StatusNotFound, ErrCodeNotFound, "not found") )
Functions ¶
func IsSearchError ¶
Types ¶
type IndexDocumentsOptions ¶
type NoopStore ¶
type NoopStore struct{}
func (*NoopStore) AllCollections ¶
func (*NoopStore) CreateCollection ¶
func (*NoopStore) DeleteDocuments ¶
func (*NoopStore) DescribeCollection ¶
func (*NoopStore) DropCollection ¶
func (*NoopStore) IndexDocuments ¶
func (*NoopStore) UpdateCollection ¶
type Store ¶
type Store interface { AllCollections(ctx context.Context) (map[string]*tsApi.CollectionResponse, error) DescribeCollection(ctx context.Context, name string) (*tsApi.CollectionResponse, error) CreateCollection(ctx context.Context, schema *tsApi.CollectionSchema) error UpdateCollection(ctx context.Context, name string, schema *tsApi.CollectionUpdateSchema) error DropCollection(ctx context.Context, table string) error IndexDocuments(ctx context.Context, table string, documents io.Reader, options IndexDocumentsOptions) error DeleteDocuments(ctx context.Context, table string, key string) error Search(ctx context.Context, table string, query *qsearch.Query, pageNo int) ([]tsApi.SearchResult, error) }
func NewStoreWithMetrics ¶
func NewStoreWithMetrics(config *config.SearchConfig) (Store, error)
Click to show internal directories.
Click to hide internal directories.