package at.procon.dip.search.service; import at.procon.ted.config.TedProcessorProperties; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; @Component @RequiredArgsConstructor @Slf4j public class SearchLexicalIndexStartupRunner implements ApplicationRunner { private final TedProcessorProperties properties; private final DocumentLexicalIndexService lexicalIndexService; @Override public void run(ApplicationArguments args) { int updated = lexicalIndexService.backfillMissingVectors(properties.getSearch().getStartupLexicalBackfillLimit()); if (updated > 0) { log.info("Search lexical index startup backfill updated {} representations", updated); } } }