Modifica il tempo di retry per i documenti incorporati e aggiorna l'indice del documento nei metadati
This commit is contained in:
@@ -48,7 +48,7 @@ public class KSIngestor {
|
||||
@Value("${ksingestor.embedded.doc.batch.size:20}")
|
||||
private int embDocsBatchSize;
|
||||
|
||||
@Value("${ksingestor.embedded.doc.retry.time:20000}")
|
||||
@Value("${ksingestor.embedded.doc.retry.time:10000}")
|
||||
private int embDocRetryTime;
|
||||
|
||||
|
||||
@@ -163,10 +163,13 @@ public class KSIngestor {
|
||||
|
||||
HashMap<String, String> metadata = ingestionInfo.getMetadata();
|
||||
metadata.put("KsDocumentId",ksDocument.getId());
|
||||
docs.forEach(doc -> {
|
||||
int docIndex = 0;
|
||||
|
||||
docs.forEach(doc -> {
|
||||
List<Document> splitDocs = splitter.split(doc);
|
||||
for (Document splitDoc : splitDocs) {
|
||||
metadata.put("KsDocumentIndex",String.valueOf(docIndex));
|
||||
docIndex++;
|
||||
splitDoc.getMetadata().putAll(metadata);
|
||||
}
|
||||
|
||||
@@ -238,7 +241,7 @@ public class KSIngestor {
|
||||
|
||||
|
||||
for (Document splitDoc : splitDocs) {
|
||||
meta2.put("KsDocumentUIndex",docIndex);
|
||||
meta2.put("KsDocumentIndex",docIndex);
|
||||
splitDoc.getMetadata().putAll(meta2);
|
||||
docIndex++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user