public class JsonSplitter extends Object implements DocumentSplitter
| Constructor and Description |
|---|
JsonSplitter() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildContent(Map<String,Object> jsonData)
构建内容
|
protected Map<String,Object> |
buildMetadata(Map<String,Object> jsonData)
构建元数据
|
JsonSplitter |
contentSelector(String... keys)
内容选择器
|
JsonSplitter |
metadataMapper(Function<Map<String,Object>,Map<String,Object>> mapper)
元数据映射器(将内容数据转为元数据)
|
List<Document> |
split(List<Document> documents)
分割
|
protected List<Document> |
splitDocument(Document in,
List<Document> outs)
分割文档
|
protected List<Document> |
splitJson(String josn)
分割 json text
|
protected void |
splitJsonNode(org.noear.snack.ONode oNode,
List<Document> docs)
分割 json node
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsplitpublic JsonSplitter contentSelector(String... keys)
public JsonSplitter metadataMapper(Function<Map<String,Object>,Map<String,Object>> mapper)
public List<Document> split(List<Document> documents)
DocumentSplittersplit in interface DocumentSplitterdocuments - 文档protected void splitJsonNode(org.noear.snack.ONode oNode,
List<Document> docs)
Copyright © 2025. All rights reserved.