Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + func DeleteRepoIssueIndexer(ctx context.Context, repo *repo_model.Repository) + func InitIssueIndexer(syncReindex bool) + func IsAvailable() bool + func SearchIssuesByKeyword(ctx context.Context, repoIDs []int64, keyword string) ([]int64, error) + func UpdateIssueIndexer(issue *issues_model.Issue) + func UpdateRepoIndexer(ctx context.Context, repo *repo_model.Repository) + type BleveIndexer struct + func NewBleveIndexer(indexDir string) *BleveIndexer + func (b *BleveIndexer) Close() + func (b *BleveIndexer) Delete(ids ...int64) error + func (b *BleveIndexer) Index(issues []*IndexerData) error + func (b *BleveIndexer) Init() (bool, error) + func (b *BleveIndexer) Ping() bool + func (b *BleveIndexer) Search(ctx context.Context, keyword string, repoIDs []int64, limit, start int) (*SearchResult, error) + type BleveIndexerData IndexerData + func (i *BleveIndexerData) Type() string + type DBIndexer struct + func (i *DBIndexer) Close() + func (i *DBIndexer) Delete(ids ...int64) error + func (i *DBIndexer) Index(issue []*IndexerData) error + func (i *DBIndexer) Init() (bool, error) + func (i *DBIndexer) Ping() bool + func (i *DBIndexer) Search(ctx context.Context, kw string, repoIDs []int64, limit, start int) (*SearchResult, error) + type ElasticSearchIndexer struct + func NewElasticSearchIndexer(url, indexerName string) (*ElasticSearchIndexer, error) + func (b *ElasticSearchIndexer) Close() + func (b *ElasticSearchIndexer) Delete(ids ...int64) error + func (b *ElasticSearchIndexer) Index(issues []*IndexerData) error + func (b *ElasticSearchIndexer) Init() (bool, error) + func (b *ElasticSearchIndexer) Ping() bool + func (b *ElasticSearchIndexer) Search(ctx context.Context, keyword string, repoIDs []int64, limit, start int) (*SearchResult, error) + type Indexer interface + Close func() + Delete func(ids ...int64) error + Index func(issue []*IndexerData) error + Init func() (bool, error) + Ping func() bool + Search func(ctx context.Context, kw string, repoIDs []int64, limit, start int) (*SearchResult, error) + type IndexerData struct + Comments []string + Content string + ID int64 + IDs []int64 + IsDelete bool + RepoID int64 + Title string + type Match struct + ID int64 + Score float64 + type MeilisearchIndexer struct + func NewMeilisearchIndexer(url, apiKey, indexerName string) (*MeilisearchIndexer, error) + func (b *MeilisearchIndexer) Close() + func (b *MeilisearchIndexer) Delete(ids ...int64) error + func (b *MeilisearchIndexer) Index(issues []*IndexerData) error + func (b *MeilisearchIndexer) Init() (bool, error) + func (b *MeilisearchIndexer) Ping() bool + func (b *MeilisearchIndexer) Search(ctx context.Context, keyword string, repoIDs []int64, limit, start int) (*SearchResult, error) + type SearchResult struct + Hits []Match + Total int64