File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
klass-api/src/main/java/no/ssb/klass/api/services Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,16 @@ public class IndexServiceImpl implements IndexService {
5858 private final ClassificationSeriesRepository classificationRepository ;
5959 private final OpenSearchRestTemplate elasticsearchOperations ;
6060 private final DocumentMapper documentMapper ;
61+ private final IndexService self ;
6162
6263 @ Autowired
6364 public IndexServiceImpl (
6465 ClassificationSeriesRepository classificationRepository ,
65- OpenSearchRestTemplate elasticsearchOperations ) {
66+ OpenSearchRestTemplate elasticsearchOperations , IndexService self ) {
6667 this .classificationRepository = classificationRepository ;
6768 this .elasticsearchOperations = elasticsearchOperations ;
6869 this .documentMapper = new DocumentMapper ();
70+ this .self = self ;
6971 }
7072
7173 private IndexCoordinates getIndexCoordinates () {
@@ -160,7 +162,7 @@ public void indexAsync(Long classificationSeriesId) {
160162 try {
161163 ClassificationSeries classification =
162164 classificationRepository .getOne (classificationSeriesId );
163- indexSync (classification );
165+ self . indexSync (classification );
164166 } catch (Exception e ) {
165167 log .warn (
166168 "Failed to index classification {}: {}" ,
You can’t perform that action at this time.
0 commit comments