Package sk.iway.iwcm.rag.service
Class SemanticIndexService
java.lang.Object
sk.iway.iwcm.rag.service.SemanticIndexService
Core service for semantic indexing of documents.
Orchestrates content extraction, chunking, embedding, and vector storage.
Processes the shared queue and delegates Markdown items to
MarkdownIndexService.-
Constructor Summary
ConstructorsConstructorDescriptionSemanticIndexService(DocDetailsContentExtractor contentExtractor, SlidingWindowChunker chunker, EmbeddingService embeddingService, VectorStore vectorStore, IndexQueueRepository queueRepository, RagEmbeddingStatService ragEmbeddingStatService, EmbeddingChunkRepository embeddingChunkRepository, MarkdownIndexService markdownIndexService) -
Method Summary
Modifier and TypeMethodDescriptionvoidProcesses queue items up to the highest ID captured at the start of the run.
-
Constructor Details
-
SemanticIndexService
@Autowired public SemanticIndexService(DocDetailsContentExtractor contentExtractor, SlidingWindowChunker chunker, EmbeddingService embeddingService, VectorStore vectorStore, IndexQueueRepository queueRepository, RagEmbeddingStatService ragEmbeddingStatService, EmbeddingChunkRepository embeddingChunkRepository, MarkdownIndexService markdownIndexService)
-
-
Method Details
-
processQueue
public void processQueue()Processes queue items up to the highest ID captured at the start of the run. Items are fetched in ascending-ID batches of 500 and attempted once per run. Entries added after the snapshot are deferred to the next run. Uses a cache-based flag to prevent concurrent execution. Failed items remain in the queue and are retried on the next run.
-