gitea: code.gitea.io/gitea/modules/indexer Index | Files | Directories

package indexer

import "code.gitea.io/gitea/modules/indexer"

Index

Package Files

indexer.go repo.go

Constants

const (
    // RepoIndexerOpUpdate add/update a file's contents
    RepoIndexerOpUpdate = iota

    // RepoIndexerOpDelete delete a file
    RepoIndexerOpDelete
)

func DeleteRepoFromIndexer Uses

func DeleteRepoFromIndexer(repoID int64) error

DeleteRepoFromIndexer delete all of a repo's files from indexer

func InitRepoIndexer Uses

func InitRepoIndexer(populateIndexer func() error)

InitRepoIndexer initialize repo indexer

func RepoIndexerBatch Uses

func RepoIndexerBatch() rupture.FlushingBatch

RepoIndexerBatch batch to add updates to

type RepoIndexerData Uses

type RepoIndexerData struct {
    RepoID  int64
    Content string
}

RepoIndexerData data stored in the repo indexer

func (*RepoIndexerData) Type Uses

func (d *RepoIndexerData) Type() string

Type returns the document type, for bleve's mapping.Classifier interface.

type RepoIndexerOp Uses

type RepoIndexerOp int

RepoIndexerOp type of operation to perform on repo indexer

type RepoIndexerUpdate Uses

type RepoIndexerUpdate struct {
    Filepath string
    Op       RepoIndexerOp
    Data     *RepoIndexerData
}

RepoIndexerUpdate an update to the repo indexer

func (RepoIndexerUpdate) AddToFlushingBatch Uses

func (update RepoIndexerUpdate) AddToFlushingBatch(batch rupture.FlushingBatch) error

AddToFlushingBatch adds the update to the given flushing batch.

type RepoSearchResult Uses

type RepoSearchResult struct {
    RepoID     int64
    StartIndex int
    EndIndex   int
    Filename   string
    Content    string
}

RepoSearchResult result of performing a search in a repo

func SearchRepoByKeyword Uses

func SearchRepoByKeyword(repoIDs []int64, keyword string, page, pageSize int) (int64, []*RepoSearchResult, error)

SearchRepoByKeyword searches for files in the specified repo. Returns the matching file-paths

Directories

PathSynopsis
issues

Package indexer imports 14 packages (graph) and is imported by 6 packages. Updated 2019-08-25. Refresh now. Tools for package owners.