You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
890 B
Java

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);
}
}
}