client.updateTimestampBoost(docId, userTimestamp);
client.updateCategories(docId, categories);
} else {
//System.out.println("Adding docid:" + docId);
if (boostedDocument.getDocument().asMap().size() > 0) {
Document doc = new Document();
doc.set_fields(boostedDocument.getDocument().asMap());
client.addDoc(docId, doc, userTimestamp, doubleBoosts);
} else {
client.updateBoost(docId, doubleBoosts);
}
client.updateCategories(docId, categories);