I have 2 entities and I want to store them under the same Index but their fields are different. I tried to rename their fields in order for them to be store identically (and to facilitate querying) but when I try to do that to a field with faceting the faceting isn't apply anymore and the mapping in ElasticSearch is totally absent. Without field renaming
@Column(name = "H_DOCUMENTDATE")
@Temporal(TemporalType.TIMESTAMP)
@Field(analyze = Analyze.NO)
@DateBridge(resolution = Resolution.YEAR)
@Facet
private Date documentDate;
...
"documentDate": {
"type": "date",
"fields": {
"documentDate__HSearch_Facet": {
"type": "date"
}
}
with field renaming
@Column(name = "H_DOCUMENTDATE")
@Temporal(TemporalType.TIMESTAMP)
@Field(analyze = Analyze.NO, name = "entityDate")
@DateBridge(resolution = Resolution.YEAR)
@Facet
private Date documentDate;
...
"entityDate": {
"type": "date",
}
I've tried to name the facet with the same name but no luck.. is it a bug ? did I miss something ? |