mapping
.entity(InternalProcessDefinition.class).indexed().indexName("process_definition")
.property("dbid", ElementType.FIELD).documentId().name(ProcessDefinitionIndex.DBID)
.entity(LightProcessDefinitionImpl.class)
.property("uuid", ElementType.FIELD).field().name(ProcessDefinitionIndex.UUID)
.bridge(UUIDFieldBridge.class)
.property("categoryNames", ElementType.METHOD).field().name(ProcessDefinitionIndex.CATEGORY_NAME)
.bridge(StringSetFieldBridge.class)
.entity(NamedElementImpl.class)
.property("name", ElementType.METHOD).field().name(ProcessDefinitionIndex.NAME)
.entity(DescriptionElementImpl.class)
.property("description", ElementType.METHOD).field().name(ProcessDefinitionIndex.DESCRIPTION)
.property("dbid", ElementType.FIELD).documentId().name(ProcessInstanceIndex.DBID)
.entity(ProcessInstanceImpl.class)
.property("commentFeed", ElementType.METHOD).indexEmbedded()
.bridge(StringSetFieldBridge.class)
.property("activities", ElementType.METHOD).indexEmbedded()
.property("lastKnownVariableValues", ElementType.METHOD).field().name("variable")
.bridge(ObjectMapFieldBridge.class)
.property("activeUsers", ElementType.METHOD).field().name(ProcessInstanceIndex.ACTIVE_USER)
.bridge(StringSetFieldBridge.class)
.entity(LightProcessInstanceImpl.class)
.property("nb", ElementType.FIELD).field().name(ProcessInstanceIndex.NB)
.property("startedBy", ElementType.METHOD).field().name(ProcessInstanceIndex.STARTED_BY)
.property("endedBy", ElementType.METHOD).field().name(ProcessInstanceIndex.ENDED_BY)
.property("startedDate", ElementType.METHOD).field().name(ProcessInstanceIndex.STARTED_DATE)
.index(Index.UN_TOKENIZED).dateBridge(Resolution.MILLISECOND)