Documentation ¶
Overview ¶
Package dao abstract the indexation engine and provides a bleve-based implementation.
Package bleve implements the search engine using a Bleve indexer.
Index ¶
- Variables
- func NewDAO(dao dao.DAO) dao.DAO
- func NewQueryCodec(indexDAO dao.IndexDAO, values configx.Values, metaProvider *meta.NsProvider) dao.IndexCodex
- type Batch
- type BatchOptions
- type SearchEngine
- type Server
- func (s *Server) ClearIndex(ctx context.Context) error
- func (s *Server) Close() error
- func (s *Server) DeleteNode(c context.Context, n *tree.Node) error
- func (s *Server) IndexNode(c context.Context, n *tree.Node, reloadCore bool, excludes map[string]struct{}) error
- func (s *Server) SearchNodes(c context.Context, queryObject *tree.Query, from int32, size int32, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IndexPath = "" BatchSize = 2000 )
Functions ¶
func NewQueryCodec ¶
func NewQueryCodec(indexDAO dao.IndexDAO, values configx.Values, metaProvider *meta.NsProvider) dao.IndexCodex
Types ¶
type Batch ¶
Batch avoids overflowing bleve index by batching indexation events (index/delete)
func NewBatch ¶
func NewBatch(ctx context.Context, nsProvider *meta.NsProvider, options BatchOptions) *Batch
func (*Batch) Index ¶
func (b *Batch) Index(i *tree.IndexableNode)
func (*Batch) LoadIndexableNode ¶
func (b *Batch) LoadIndexableNode(indexNode *tree.IndexableNode, excludes map[string]struct{}) error
type BatchOptions ¶
type BatchOptions struct {
IndexContent bool
}
type SearchEngine ¶
type SearchEngine interface { IndexNode(context.Context, *tree.Node, bool, map[string]struct{}) error DeleteNode(context.Context, *tree.Node) error SearchNodes(context.Context, *tree.Query, int32, int32, chan *tree.Node, chan *tree.SearchFacet, chan bool) error ClearIndex(ctx context.Context) error Close() error }
Click to show internal directories.
Click to hide internal directories.