/** * Extract the Apache Geode key from a lucene document */ public static Object getKey(Document doc) { IndexableField field = doc.getField(KEY_FIELD); if (field.stringValue() != null) { return field.stringValue(); } else { return keyFromBytes(field.binaryValue()); } }