Documentation ¶
Index ¶
- type Indexer
- func (b *Indexer) Delete(_ context.Context, repoID int64) error
- func (b *Indexer) Index(ctx context.Context, repo *repo_model.Repository, sha string, ...) error
- func (b *Indexer) Search(ctx context.Context, repoIDs []int64, language, keyword string, ...) (int64, []*internal.SearchResult, []*internal.SearchResultLanguages, error)
- type RepoIndexerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Indexer ¶
type Indexer struct { indexer_internal.Indexer // do not composite inner_bleve.Indexer directly to avoid exposing too much // contains filtered or unexported fields }
Indexer represents a bleve indexer implementation
func NewIndexer ¶
NewIndexer creates a new bleve local indexer
func (*Indexer) Index ¶
func (b *Indexer) Index(ctx context.Context, repo *repo_model.Repository, sha string, changes *internal.RepoChanges) error
Index indexes the data
func (*Indexer) Search ¶
func (b *Indexer) Search(ctx context.Context, repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int64, []*internal.SearchResult, []*internal.SearchResultLanguages, error)
Search searches for files in the specified repo. Returns the matching file-paths
type RepoIndexerData ¶
type RepoIndexerData struct { RepoID int64 CommitID string Content string Language string UpdatedAt time.Time }
RepoIndexerData data stored in the repo indexer
func (*RepoIndexerData) Type ¶
func (d *RepoIndexerData) Type() string
Type returns the document type, for bleve's mapping.Classifier interface.
Click to show internal directories.
Click to hide internal directories.