Commit c1c755f1 authored by Matija Obreza's avatar Matija Obreza

ES: Set createdBy, lastModifiedBy to not_analyzed string type

parent ee06c75b
......@@ -29,6 +29,7 @@ import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;
import org.springframework.data.elasticsearch.annotations.FieldType;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
......@@ -41,7 +42,7 @@ public abstract class AuditedModel extends BasicModel {
@CreatedBy
@JsonSerialize(converter = JsonSidConverter.class)
@Field(index = FieldIndex.no)
@Field(type = FieldType.String, index = FieldIndex.not_analyzed)
@JsonProperty(access = Access.READ_ONLY)
private Long createdBy;
......@@ -51,7 +52,7 @@ public abstract class AuditedModel extends BasicModel {
@LastModifiedBy
@JsonSerialize(converter = JsonSidConverter.class)
@Field(index = FieldIndex.no)
@Field(type = FieldType.String, index = FieldIndex.not_analyzed)
@JsonProperty(access = Access.READ_ONLY)
private Long lastModifiedBy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment