public class PipelineDocumentUtils
extends java.lang.Object
Constructor and Description |
---|
PipelineDocumentUtils() |
Modifier and Type | Method and Description |
---|---|
static SolrInputDocument |
convertPipelineDocumentToSolr(PipelineDocument doc) |
static PipelineDocument |
convertSolrInputDocumentToPipelineDocument(SolrInputDocument solrDoc) |
static PipelineDocument |
flatten(PipelineDocument doc)
Flatten the structure of document.
|
static PipelineDocument |
flatten(PipelineDocument doc,
boolean handleListsIndexNumbered)
Flatten the structure of document.
|
static PipelineDocument |
fromEventMap(java.util.Map<java.lang.CharSequence,java.lang.Object> map) |
static PipelineDocument |
fromMap(java.util.Map<?,?> map) |
static PipelineDocument |
fromMap(java.util.Map<?,?> map,
boolean handleListsIndexNumbered) |
static PipelineDocument |
fromMap(java.util.Map<?,?> map,
PipelineDocument template,
boolean handleListsIndexNumbered) |
static PipelineDocument |
fromSolrDocument(SolrDocument sd) |
static boolean |
isCommandsDocument(PipelineDocument pipelineDocument)
Return true if the given pipeline document is a special "Commands" document.
|
static PipelineDocument |
mapToPipelineDocument(java.util.Map<java.lang.String,java.lang.Object> entry) |
static java.io.InputStream |
objectToInputStream(java.lang.Object input) |
static void |
prefixPipelineDocumentFields(PipelineDocument doc,
java.lang.String prefix)
put the prefix infront of every field within the pipeline doc
|
static java.util.Map<java.lang.String,java.lang.Object> |
toMap(PipelineDocument doc) |
public static void prefixPipelineDocumentFields(PipelineDocument doc, java.lang.String prefix)
doc
- prefix
- public static PipelineDocument fromSolrDocument(SolrDocument sd)
public static java.util.Map<java.lang.String,java.lang.Object> toMap(PipelineDocument doc)
public static PipelineDocument fromEventMap(java.util.Map<java.lang.CharSequence,java.lang.Object> map)
public static PipelineDocument fromMap(java.util.Map<?,?> map)
public static PipelineDocument fromMap(java.util.Map<?,?> map, boolean handleListsIndexNumbered)
public static PipelineDocument fromMap(java.util.Map<?,?> map, PipelineDocument template, boolean handleListsIndexNumbered)
public static PipelineDocument flatten(PipelineDocument doc)
flatten(PipelineDocument, boolean)
for more infopublic static PipelineDocument flatten(PipelineDocument doc, boolean handleListsIndexNumbered)
handleListsIndexNumbered
is true then an index (starting from 0) will be appended to the field name,
and values will be further flattened recursively.
doc
- input document, possibly containing nested datahandleListsIndexNumbered
- is a flag to flatten lists into index numbered fieldspublic static PipelineDocument convertSolrInputDocumentToPipelineDocument(SolrInputDocument solrDoc)
public static SolrInputDocument convertPipelineDocumentToSolr(PipelineDocument doc)
public static boolean isCommandsDocument(PipelineDocument pipelineDocument)
pipelineDocument
- Document to check.public static java.io.InputStream objectToInputStream(java.lang.Object input)
public static PipelineDocument mapToPipelineDocument(java.util.Map<java.lang.String,java.lang.Object> entry)