Source:
private XContentBuilder buildJsonContentFromProperty(IndexInfo indexInfo, Property property) throws IOException { XContentBuilder jsonBuilder; jsonBuilder = XContentFactory.jsonBuilder() .startObject(); Object propertyValue = property.getValue(); String propertyName = getConfig().getNameSubstitutionStrategy().deflate(property.getName()); if (propertyValue != null && shouldIgnoreType(propertyValue.getClass())) { return null; } else if (propertyValue instanceof GeoPoint) { convertGeoPoint(jsonBuilder, property, (GeoPoint) propertyValue); } else if (propertyValue instanceof GeoCircle) { convertGeoCircle(jsonBuilder, property, (GeoCircle) propertyValue); } else if (propertyValue instanceof StreamingPropertyValue) { StreamingPropertyValue streamingPropertyValue = (StreamingPropertyValue) propertyValue; if (!streamingPropertyValue.isSearchIndex()) { return null; } PropertyDefinition propertyDefinition = indexInfo.getPropertyDefinitions().get(propertyName); if (propertyDefinition != null && !propertyDefinition.getTextIndexHints().contains(TextIndexHint.FULL_TEXT)) { return null; } Class valueType = streamingPropertyValue.getValueType(); if (valueType == String.class) { InputStream in = streamingPropertyValue.getInputStream(); propertyValue = StreamUtils.toString(in); jsonBuilder.field(property.getName(), propertyValue); } else { throw new VertexiumException("Unhandled StreamingPropertyValue type: " + valueType.getName()); } } else if (propertyValue instanceof String) { PropertyDefinition propertyDefinition = indexInfo.getPropertyDefinitions().get(propertyName); if (propertyDefinition == null || propertyDefinition.getTextIndexHints().contains(TextIndexHint.EXACT_MATCH)) { jsonBuilder.field(propertyName + EXACT_MATCH_PROPERTY_NAME_SUFFIX, propertyValue); } if (propertyDefinition == null || propertyDefinition.getTextIndexHints().contains(TextIndexHint.FULL_TEXT)) { jsonBuilder.field(propertyName, propertyValue); } } else { if (propertyValue instanceof DateOnly) { propertyValue = ((DateOnly) propertyValue).getDate(); } jsonBuilder.field(propertyName, propertyValue); } jsonBuilder.field(VISIBILITY_FIELD_NAME, property.getVisibility().getVisibilityString()); return jsonBuilder; }

Target:
private XContentBuilder buildJsonContentFromProperty(IndexInfo indexInfo, Property property) throws IOException { XContentBuilder jsonBuilder; jsonBuilder = XContentFactory.jsonBuilder() .startObject(); Object propertyValue = property.getValue(); String propertyName = this.nameSubstitutionStrategy.deflate(property.getName()); if (propertyValue != null && shouldIgnoreType(propertyValue.getClass())) { return null; } else if (propertyValue instanceof GeoPoint) { convertGeoPoint(jsonBuilder, property, (GeoPoint) propertyValue); } else if (propertyValue instanceof GeoCircle) { convertGeoCircle(jsonBuilder, property, (GeoCircle) propertyValue); } else if (propertyValue instanceof StreamingPropertyValue) { StreamingPropertyValue streamingPropertyValue = (StreamingPropertyValue) propertyValue; if (!streamingPropertyValue.isSearchIndex()) { return null; } PropertyDefinition propertyDefinition = indexInfo.getPropertyDefinitions().get(propertyName); if (propertyDefinition != null && !propertyDefinition.getTextIndexHints().contains(TextIndexHint.FULL_TEXT)) { return null; } Class valueType = streamingPropertyValue.getValueType(); if (valueType == String.class) { InputStream in = streamingPropertyValue.getInputStream(); propertyValue = StreamUtils.toString(in); jsonBuilder.field(property.getName(), propertyValue); } else { throw new VertexiumException("Unhandled StreamingPropertyValue type: " + valueType.getName()); } } else if (propertyValue instanceof String) { PropertyDefinition propertyDefinition = indexInfo.getPropertyDefinitions().get(propertyName); if (propertyDefinition == null || propertyDefinition.getTextIndexHints().contains(TextIndexHint.EXACT_MATCH)) { jsonBuilder.field(propertyName + EXACT_MATCH_PROPERTY_NAME_SUFFIX, propertyValue); } if (propertyDefinition == null || propertyDefinition.getTextIndexHints().contains(TextIndexHint.FULL_TEXT)) { jsonBuilder.field(propertyName, propertyValue); } } else { if (propertyValue instanceof DateOnly) { propertyValue = ((DateOnly) propertyValue).getDate(); } jsonBuilder.field(propertyName, propertyValue); } jsonBuilder.field(VISIBILITY_FIELD_NAME, property.getVisibility().getVisibilityString()); return jsonBuilder; }