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) CreateCollection(context.Context, *tsApi.CollectionSchema) error
- func (n *NoopStore) DeleteDocuments(context.Context, string, string) 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) CreateCollection ¶
func (*NoopStore) DeleteDocuments ¶
func (*NoopStore) DropCollection ¶
func (*NoopStore) IndexDocuments ¶
func (*NoopStore) UpdateCollection ¶
type Store ¶
type Store interface { 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.