indexing

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkFiles

type ChunkFiles struct {
	// contains filtered or unexported fields
}

ChunkFiles creates fixed-size text chunks from commit files.

func NewChunkFiles

func NewChunkFiles(
	repoStore repository.RepositoryStore,
	enrichmentStore enrichment.EnrichmentStore,
	associationStore enrichment.AssociationStore,
	lineRangeStore chunk.LineRangeStore,
	fileStore repository.FileStore,
	fileContent FileContentSource,
	documentText DocumentTextSource,
	params chunking.ChunkParams,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
) *ChunkFiles

NewChunkFiles creates a new ChunkFiles handler. When documentText is nil, document files are skipped.

func (*ChunkFiles) Execute

func (h *ChunkFiles) Execute(ctx context.Context, payload map[string]any) error

Execute processes the EXTRACT_SNIPPETS_FOR_COMMIT task using fixed-size text chunking.

type CreateBM25Index

type CreateBM25Index struct {
	// contains filtered or unexported fields
}

CreateBM25Index creates BM25 keyword index for commit enrichments.

func NewCreateBM25Index

func NewCreateBM25Index(
	bm25Service *domainservice.BM25,
	enrichmentStore enrichment.EnrichmentStore,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
	subtype enrichment.Subtype,
) *CreateBM25Index

NewCreateBM25Index creates a new CreateBM25Index handler. The subtype parameter controls which enrichments to index (e.g. SubtypeSnippet or SubtypeChunk).

func (*CreateBM25Index) Execute

func (h *CreateBM25Index) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_BM25_INDEX_FOR_COMMIT task.

type CreateCodeEmbeddings

type CreateCodeEmbeddings struct {
	// contains filtered or unexported fields
}

CreateCodeEmbeddings creates vector embeddings for commit enrichments.

func NewCreateCodeEmbeddings

func NewCreateCodeEmbeddings(
	codeIndex handler.VectorIndex,
	enrichmentStore enrichment.EnrichmentStore,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
	subtype enrichment.Subtype,
) (*CreateCodeEmbeddings, error)

NewCreateCodeEmbeddings creates a new CreateCodeEmbeddings handler. The subtype parameter controls which enrichments to embed (e.g. SubtypeSnippet or SubtypeChunk).

func (*CreateCodeEmbeddings) Execute

func (h *CreateCodeEmbeddings) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_CODE_EMBEDDINGS_FOR_COMMIT task.

type CreateSummaryEmbeddings

type CreateSummaryEmbeddings struct {
	// contains filtered or unexported fields
}

CreateSummaryEmbeddings creates vector embeddings for snippet summary enrichments.

func NewCreateSummaryEmbeddings

func NewCreateSummaryEmbeddings(
	textIndex handler.VectorIndex,
	enrichmentStore enrichment.EnrichmentStore,
	associationStore enrichment.AssociationStore,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
) (*CreateSummaryEmbeddings, error)

NewCreateSummaryEmbeddings creates a new CreateSummaryEmbeddings handler.

func (*CreateSummaryEmbeddings) Execute

func (h *CreateSummaryEmbeddings) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_SUMMARY_EMBEDDINGS_FOR_COMMIT task.

type DocumentTextSource added in v1.2.0

type DocumentTextSource interface {
	Text(path string) (string, error)
}

DocumentTextSource extracts text from binary document files.

type FileContentSource

type FileContentSource interface {
	FileContent(ctx context.Context, localPath string, commitSHA string, filePath string) ([]byte, error)
}

FileContentSource reads file content at a specific commit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL