indexing

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 18 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 sourcelocation.Store,
	fileStore repository.FileStore,
	fileContent FileContentSource,
	documentText DocumentTextSource,
	extractors *extraction.Extractors,
	textRenderers *extraction.TextRendererRegistry,
	params chunking.ChunkParams,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
) *ChunkFiles

NewChunkFiles creates a new ChunkFiles handler. When documentText is nil, document files are skipped. When textRenderers is non-nil, document text is extracted per-page so that each chunk records the page it came from.

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 CreatePageImageEmbeddings added in v1.3.0

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

CreatePageImageEmbeddings rasterizes page-image enrichments and stores their vision embeddings in a dedicated vector store.

func NewCreatePageImageEmbeddings added in v1.3.0

func NewCreatePageImageEmbeddings(
	repoStore repository.RepositoryStore,
	enrichmentStore enrichment.EnrichmentStore,
	associationStore enrichment.AssociationStore,
	sourceLocStore sourcelocation.Store,
	fileStore repository.FileStore,
	rasterizers *rasterization.Registry,
	embedder search.Embedder,
	store search.EmbeddingStore,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
) (*CreatePageImageEmbeddings, error)

NewCreatePageImageEmbeddings creates a new CreatePageImageEmbeddings handler.

func (*CreatePageImageEmbeddings) Execute added in v1.3.0

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

Execute processes page-image enrichments for a commit: rasterize each page, embed the resulting image, and persist the vision embedding.

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 ExtractPageImages added in v1.3.0

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

ExtractPageImages creates one enrichment per renderable page of each document file that the rasterization registry supports.

func NewExtractPageImages added in v1.3.0

func NewExtractPageImages(
	repoStore repository.RepositoryStore,
	enrichmentStore enrichment.EnrichmentStore,
	associationStore enrichment.AssociationStore,
	sourceLocStore sourcelocation.Store,
	fileStore repository.FileStore,
	rasterizers *rasterization.Registry,
	trackerFactory handler.TrackerFactory,
	logger zerolog.Logger,
) *ExtractPageImages

NewExtractPageImages creates a new ExtractPageImages handler. When rasterizers is nil, Execute returns immediately (no documents to rasterize).

func (*ExtractPageImages) Execute added in v1.3.0

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

Execute processes the EXTRACT_PAGE_IMAGES_FOR_COMMIT task.

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