|
|
@ -209,16 +209,8 @@ public class WeaviateService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getFieldValue(String fields,Object object) { |
|
|
|
private String getFieldValue(String fields,Object object) { |
|
|
|
Class clazz = object.getClass(); |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(object)); |
|
|
|
return Func.toStrList(",", fields).stream().map(field -> { |
|
|
|
return Func.toStrList(",", fields).stream().map(field -> jsonObject.getString(field)).collect(Collectors.joining(" ")); |
|
|
|
try { |
|
|
|
|
|
|
|
Field declaredField = clazz.getDeclaredField(field); |
|
|
|
|
|
|
|
declaredField.setAccessible(true); |
|
|
|
|
|
|
|
return declaredField.get(object).toString(); |
|
|
|
|
|
|
|
} catch (NoSuchFieldException | IllegalAccessException e) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).collect(Collectors.joining(" ")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|