Documentation ¶
Index ¶
- type Client
- func (c *Client) AddIndex(dbName string, request *model.IndexDoc) error
- func (c *Client) BatchAddIndex(dbName string, documents []*model.IndexDoc) error
- func (c *Client) BatchWordCut(keywords []string) *[][]string
- func (c *Client) Create(dbName string) (*searcher.Engine, error)
- func (c *Client) Drop(dbName string) error
- func (*Client) GC()
- func (c *Client) Query(req *model.SearchRequest) (*model.SearchResult, error)
- func (c *Client) RemoveIndex(dbName string, data *model.RemoveIndexModel) error
- func (c *Client) SetAddr(addr string) *Client
- func (c *Client) SetData(dir string) *Client
- func (c *Client) Show() (map[string]*searcher.Engine, error)
- func (c *Client) Status() (map[string]interface{}, error)
- func (c *Client) WordCut(keyword string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 应该对外部屏蔽细节 尽量少的提供接口,但是又要保证功能性
func (*Client) BatchAddIndex ¶
BatchAddIndex 批次添加索引
func (*Client) BatchWordCut ¶
BatchWordCut 批量分词
func (*Client) Query ¶
func (c *Client) Query(req *model.SearchRequest) (*model.SearchResult, error)
Query 查询
func (*Client) RemoveIndex ¶
func (c *Client) RemoveIndex(dbName string, data *model.RemoveIndexModel) error
RemoveIndex 删除索引
Click to show internal directories.
Click to hide internal directories.