public class PlainIndexableObject extends Object implements IndexableObject, org.elasticsearch.common.xcontent.ToXContent, Comparable<IndexableObject>
| Constructor and Description |
|---|
PlainIndexableObject() |
| Modifier and Type | Method and Description |
|---|---|
String |
build()
Build a string that can be used for indexing.
|
protected boolean |
checkCollapsedMapLength(Map<String,Object> map)
Check if the map is empty, after optional null value removal.
|
int |
compareTo(IndexableObject o) |
boolean |
equals(Object o) |
int |
hashCode() |
String |
id()
Get the ID
|
IndexableObject |
id(String id)
Set the ID
|
IndexableObject |
ignoreNull(boolean ignorenull) |
String |
index()
Get the index
|
IndexableObject |
index(String index)
Set the index
|
boolean |
isEmpty() |
String |
meta(String key) |
IndexableObject |
meta(String key,
String value)
Set meta data of this indexable object
|
String |
optype()
Get the operation type
|
IndexableObject |
optype(String optype)
Set the operation type, either "index", "create", or "delete"
|
Map<String,Object> |
source() |
IndexableObject |
source(Map<String,Object> source) |
String |
toString() |
org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params) |
protected org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params,
List list) |
protected org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params,
Map<String,Object> map)
Recursive method to build XContent from a key/value map of Values
|
String |
type()
Get the type
|
IndexableObject |
type(String type)
Set the type
|
public PlainIndexableObject()
public IndexableObject ignoreNull(boolean ignorenull)
ignoreNull in interface IndexableObjectpublic IndexableObject optype(String optype)
IndexableObjectoptype in interface IndexableObjectoptype - the operaion typepublic String optype()
IndexableObjectoptype in interface IndexableObjectpublic IndexableObject index(String index)
IndexableObjectindex in interface IndexableObjectindex - the indexpublic String index()
IndexableObjectindex in interface IndexableObjectpublic IndexableObject type(String type)
IndexableObjecttype in interface IndexableObjecttype - the typepublic String type()
IndexableObjecttype in interface IndexableObjectpublic IndexableObject id(String id)
IndexableObjectid in interface IndexableObjectid - the IDpublic String id()
IndexableObjectid in interface IndexableObjectpublic IndexableObject meta(String key, String value)
IndexableObjectmeta in interface IndexableObjectkey - the meta data keyvalue - the meta data valuepublic String meta(String key)
meta in interface IndexableObjectpublic IndexableObject source(Map<String,Object> source)
source in interface IndexableObjectpublic String build() throws IOException
build in interface IndexableObjectIOException - when build gave an errorpublic org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
toXContent in interface org.elasticsearch.common.xcontent.ToXContentIOExceptionprotected org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params, Map<String,Object> map) throws IOException
builder - the buildermap - the mapIOException - when method gave an errorprotected boolean checkCollapsedMapLength(Map<String,Object> map)
map - the map to checkprotected org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params, List list) throws IOException
IOExceptionpublic boolean isEmpty()
isEmpty in interface IndexableObjectpublic int compareTo(IndexableObject o)
compareTo in interface Comparable<IndexableObject>elasticsearch-river-jdbc