Documentation
¶
Index ¶
- Constants
- func OpenOrCreate(dataRoot string, force bool, options *Options) (*ReadIndex, *WriteIndex, bool, errors.E)
- type BatchError
- type DocumentMatch
- type Meta
- type Options
- type ReadIndex
- func (index *ReadIndex) Close() error
- func (index *ReadIndex) GetDocument(ctx context.Context, source *config.Source, id string) (*nix.Importable, errors.E)
- func (index *ReadIndex) GetEnabledSources() ([]string, errors.E)
- func (index *ReadIndex) LastUpdated() time.Time
- func (index *ReadIndex) Search(ctx context.Context, source *config.Source, keyword string, from int, ...) (*Result, errors.E)
- type Result
- type SourceMeta
- type WriteIndex
Constants ¶
View Source
const CurrentSchemaVersion = 5
View Source
const DefaultPageSize = 100
Variables ¶
This section is empty.
Functions ¶
func OpenOrCreate ¶
Types ¶
type BatchError ¶
func (*BatchError) Error ¶
func (e *BatchError) Error() string
type DocumentMatch ¶
type DocumentMatch struct { *search.DocumentMatch Data nix.Importable }
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
func (*Meta) GetSourceMeta ¶
func (i *Meta) GetSourceMeta(source string) *SourceMeta
func (*Meta) IsSchemaOutdated ¶
func (*Meta) LastUpdated ¶
func (*Meta) SetSourceMeta ¶
func (i *Meta) SetSourceMeta(source string, meta *SourceMeta)
type ReadIndex ¶
type ReadIndex struct {
// contains filtered or unexported fields
}
func (*ReadIndex) GetDocument ¶
func (*ReadIndex) GetEnabledSources ¶
func (*ReadIndex) LastUpdated ¶
type Result ¶
type Result struct { *bleve.SearchResult Hits iter.Seq[DocumentMatch] }
type WriteIndex ¶
type WriteIndex struct { Meta *Meta // contains filtered or unexported fields }
func (*WriteIndex) Close ¶
func (i *WriteIndex) Close() (err errors.E)
func (*WriteIndex) DeleteBySource ¶
func (i *WriteIndex) DeleteBySource(source string) errors.E
func (*WriteIndex) Flush ¶
func (i *WriteIndex) Flush(batch *bleve.Batch) errors.E
func (*WriteIndex) Import ¶
func (i *WriteIndex) Import( ctx context.Context, objects <-chan nix.Importable, ) <-chan errors.E
func (*WriteIndex) SaveMeta ¶
func (i *WriteIndex) SaveMeta() errors.E
Click to show internal directories.
Click to hide internal directories.