if (filter.getField() != null && filter.getFieldValue() != null) {
node.put("field", QNameConverter.toJson(filter.getField(), namespaces));
ValueType valueType = repository.getTypeManager().getFieldTypeByName(filter.getField()).getValueType();
JsonNode valueAsJson = RecordWriter.INSTANCE.valueToJson(filter.getFieldValue(), valueType,
new WriteOptions(), namespaces, repository);
node.put("fieldValue", valueAsJson);
node.putObject("value");
}