aboutsummaryrefslogtreecommitdiffstats
path: root/docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java
diff options
context:
space:
mode:
Diffstat (limited to 'docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java')
-rw-r--r--docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java50
1 files changed, 25 insertions, 25 deletions
diff --git a/docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java b/docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java
index a55159cdaa0..657c8a161f7 100644
--- a/docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java
+++ b/docprocs/src/main/java/com/yahoo/docprocs/indexing/IndexingProcessor.java
@@ -95,56 +95,56 @@ public class IndexingProcessor extends DocumentProcessor {
return docTypeMgr;
}
- private void processDocument(DocumentPut prev, List<DocumentOperation> out) {
- DocumentType hadType = prev.getDocument().getDataType();
+ private void processDocument(DocumentPut input, List<DocumentOperation> out) {
+ DocumentType hadType = input.getDocument().getDataType();
DocumentScript script = scriptMgr.getScript(hadType);
if (script == null) {
- log.log(Level.FINE, "No indexing script for document '%s'.", prev.getId());
- out.add(prev);
+ log.log(Level.FINE, "No indexing script for document '%s'.", input.getId());
+ out.add(input);
return;
}
- log.log(Level.FINE, "Processing document '%s'.", prev.getId());
+ log.log(Level.FINE, "Processing document '%s'.", input.getId());
DocumentType wantType = docTypeMgr.getDocumentType(hadType.getName());
- Document prevDoc = prev.getDocument();
+ Document inputDocument = input.getDocument();
if (hadType != wantType) {
// this happens when you have a concrete document; we need to
// convert back to a "normal" Document for indexing of complex structures
// to work properly.
GrowableByteBuffer buffer = new GrowableByteBuffer(64 * 1024, 2.0f);
DocumentSerializer serializer = DocumentSerializerFactory.createHead(buffer);
- serializer.write(prevDoc);
+ serializer.write(inputDocument);
buffer.flip();
- prevDoc = docTypeMgr.createDocument(buffer);
+ inputDocument = docTypeMgr.createDocument(buffer);
}
- Document next = script.execute(adapterFactory, prevDoc);
- if (next == null) {
- log.log(Level.FINE, "Document '%s' produced no output.", prev.getId());
+ Document output = script.execute(adapterFactory, inputDocument);
+ if (output == null) {
+ log.log(Level.FINE, "Document '%s' produced no output.", input.getId());
return;
}
- out.add(new DocumentPut(prev, next));
+ out.add(new DocumentPut(input, output));
}
- private void processUpdate(DocumentUpdate prev, List<DocumentOperation> out) {
- DocumentScript script = scriptMgr.getScript(prev.getType());
+ private void processUpdate(DocumentUpdate input, List<DocumentOperation> out) {
+ DocumentScript script = scriptMgr.getScript(input.getType());
if (script == null) {
- log.log(Level.FINE, "No indexing script for update '%s'.", prev.getId());
- out.add(prev);
+ log.log(Level.FINE, "No indexing script for update '%s'.", input.getId());
+ out.add(input);
return;
}
- log.log(Level.FINE, "Processing update '%s'.", prev.getId());
- DocumentUpdate next = script.execute(adapterFactory, prev);
- if (next == null) {
- log.log(Level.FINE, "Update '%s' produced no output.", prev.getId());
+ log.log(Level.FINE, "Processing update '%s'.", input.getId());
+ DocumentUpdate output = script.execute(adapterFactory, input);
+ if (output == null) {
+ log.log(Level.FINE, "Update '%s' produced no output.", input.getId());
return;
}
- next.setCondition(prev.getCondition());
- out.add(next);
+ output.setCondition(input.getCondition());
+ out.add(output);
}
- private void processRemove(DocumentRemove prev, List<DocumentOperation> out) {
- log.log(Level.FINE, "Not processing remove '%s'.", prev.getId());
- out.add(prev);
+ private void processRemove(DocumentRemove input, List<DocumentOperation> out) {
+ log.log(Level.FINE, "Not processing remove '%s'.", input.getId());
+ out.add(input);
}
private Map<String, Embedder> toMap(ComponentRegistry<Embedder> embedders) {