Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + var ErrWrappedIndexerClosed = fmt.Errorf("Indexer closed before ready") + func Init() + func IsAvailable() bool + func PerformSearch(ctx context.Context, repoIDs []int64, language, keyword string, ...) (int, []*Result, []*SearchResultLanguages, error) + func UpdateRepoIndexer(repo *repo_model.Repository) + type BleveIndexer struct + func NewBleveIndexer(indexDir string) (*BleveIndexer, bool, error) + func (b *BleveIndexer) Close() + func (b *BleveIndexer) Delete(repoID int64) error + func (b *BleveIndexer) Index(ctx context.Context, repo *repo_model.Repository, sha string, ...) error + func (b *BleveIndexer) Ping() bool + func (b *BleveIndexer) Search(ctx context.Context, repoIDs []int64, language, keyword string, ...) (int64, []*SearchResult, []*SearchResultLanguages, error) + type ElasticSearchIndexer struct + func NewElasticSearchIndexer(url, indexerName string) (*ElasticSearchIndexer, bool, error) + func (b *ElasticSearchIndexer) Close() + func (b *ElasticSearchIndexer) Delete(repoID int64) error + func (b *ElasticSearchIndexer) Index(ctx context.Context, repo *repo_model.Repository, sha string, ...) error + func (b *ElasticSearchIndexer) Ping() bool + func (b *ElasticSearchIndexer) Search(ctx context.Context, repoIDs []int64, language, keyword string, ...) (int64, []*SearchResult, []*SearchResultLanguages, error) + type Indexer interface + Close func() + Delete func(repoID int64) error + Index func(ctx context.Context, repo *repo_model.Repository, sha string, ...) error + Ping func() bool + Search func(ctx context.Context, repoIDs []int64, language, keyword string, ...) (int64, []*SearchResult, []*SearchResultLanguages, error) + type IndexerData struct + RepoID int64 + type RepoIndexerData struct + CommitID string + Content string + Language string + RepoID int64 + UpdatedAt time.Time + func (d *RepoIndexerData) Type() string + type Result struct + Color string + CommitID string + Filename string + FormattedLines string + Language string + LineNumbers []int + RepoID int64 + UpdatedUnix timeutil.TimeStamp + type SearchResult struct + Color string + CommitID string + Content string + EndIndex int + Filename string + Language string + RepoID int64 + StartIndex int + UpdatedUnix timeutil.TimeStamp + type SearchResultLanguages struct + Color string + Count int + Language string