Package org.elasticsearch.ingest
Class TestIngestDocument
java.lang.Object
org.elasticsearch.ingest.TestIngestDocument
Construct ingest documents for testing purposes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IngestDocument
Create an empty ingest document for testing.static long
static IngestDocument
withDefaultVersion
(Map<String, Object> sourceAndMetadata) Create anIngestDocument
withDEFAULT_VERSION
as the _version metadata, if _version is not already present.static IngestDocument
Create anIngestDocument
from the given sourceAndMetadata and ingestMetadata and a version validator that allows null _versions.
-
Field Details
-
DEFAULT_VERSION
public static final long DEFAULT_VERSION- See Also:
-
-
Constructor Details
-
TestIngestDocument
public TestIngestDocument()
-
-
Method Details
-
withDefaultVersion
public static IngestDocument withDefaultVersion(Map<String, Object> sourceAndMetadata, Map<String, Object> ingestMetadata) Create anIngestDocument
from the given sourceAndMetadata and ingestMetadata and a version validator that allows null _versions. Normally null _version is not allowed, but many tests don't care about that invariant. -
withDefaultVersion
Create anIngestDocument
withDEFAULT_VERSION
as the _version metadata, if _version is not already present. -
emptyIngestDocument
Create an empty ingest document for testing.Adds the required
"_version"
metadata key with valueDEFAULT_VERSION
. -
randomMetadata
-
randomVersion
public static long randomVersion()
-