Documentation ¶
Index ¶
- type DB
- func (p *DB[T]) Close() error
- func (p *DB[T]) Load(docs ...T) (err error)
- func (p *DB[T]) LoadByID(ids ...uint64) (docs []T, err error)
- func (p *DB[T]) Match(value string) (docs []T, err error)
- func (p *DB[T]) Query(values map[string]string) (docs []T, err error)
- func (p *DB[T]) Save(docs ...T) (err error)
- type Document
- type Field
- type FieldType
- type IndexService
- func (p *IndexService[T]) Close() error
- func (p *IndexService[T]) Index(docs []T) (err error)
- func (p *IndexService[T]) Match(value string) (ids []uint64, err error)
- func (p *IndexService[T]) Parse(doc Document) *bluge.Document
- func (p *IndexService[T]) Query(values map[string]string) (ids []uint64, err error)
- type LevelService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document interface { GetId() uint64 ProtoReflect() protoreflect.Message }
type IndexService ¶
type IndexService[T Document] struct { // contains filtered or unexported fields }
IndexService 索引服务.
func NewIndexService ¶
func NewIndexService[T Document](dir string) *IndexService[T]
NewIndexService 新建索引服务.
func (*IndexService[T]) Close ¶
func (p *IndexService[T]) Close() error
type LevelService ¶
type LevelService[T Document] struct { // contains filtered or unexported fields }
func NewLevelService ¶
func NewLevelService[T Document](dir string) *LevelService[T]
func (*LevelService[T]) Close ¶
func (p *LevelService[T]) Close() error
func (*LevelService[T]) Load ¶
func (p *LevelService[T]) Load(docs []T) (err error)
func (*LevelService[T]) Save ¶
func (p *LevelService[T]) Save(docs []T) (err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.