How can I store two entities: PayEntity, CheckEntity (only common fields from each) into one index (paylist-index)?
I tried with two index classes (PayIndex
and CheckIndex
) both pointing to the same OpenSearch index (paylist-index
) with no success.
when i go to opensearch index: http://localhost:9200/paylist-index/_search
I see only similar to:
{
“took”: 27,
“timed_out”: false,
“_shards”: {
“total”: 1,
“successful”: 1,
“skipped”: 0,
“failed”: 0
},
“hits”: {
“total”: {
“value”: 1,
“relation”: “eq”
},
“max_score”: 1,
“hits”: [
{
“_index”: “paylist-index”,
“_id”: "CheckList.“0198ee6e-9e9a-705f-a31e-9c4b1b016735"”,
“_score”: 1,
“_source”: {
“_instance_name”: “..*.CheckList-0198ee6e-9e9a-705f-a31e-9c4b1b016735 [detached]”
}
}
]
}
}
How to make fields are actually being indexed (and not just _instance_name
)?
One of index class:
@JmixEntitySearchIndex(indexName = “paylist-index”, entity = CheckEntity.class)
public class CheckIndex {
private UUID id;
private String number;
private LocalDate date;
private TypeEnum type;
private String name;
private BigDecimal sum;
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public TypeEnum getType() {
return type;
}
public void setType(TypeEnumtype) {
this.type = type;
}
public String getName() {
return payerName;
}
public void setName(String payerName) {
this.payerName = payerName;
}
public BigDecimal getSum() {
return sum;
}
public void setSum(BigDecimal sum) {
this.sum = sum;
}
}
Jmix version:
Jmix version: 2.6.1
Jmix Studio Plugin Version: 2.6.2-251
IntelliJ version: IntelliJ IDEA 2025.1.2 (Ultimate Edition)
build.gradle:
implementation ‘io.jmix.search:jmix-search-flowui-starter’
implementation ‘io.jmix.search:jmix-search-starter’
implementation ‘io.jmix.search:jmix-search-opensearch-starter’
opensearch:
{
“name” : “ecc49399e008”,
“cluster_name” : “docker-cluster”,
“cluster_uuid” : “v2rik1GWTeSRXcg0171mng”,
“version” : {
“distribution” : “opensearch”,
“number” : “3.2.0”,
“build_type” : “tar”,
“build_hash” : “6adc0bf476e1624190564d7fbe4aba00ccf49ad8”,
“build_date” : “2025-08-12T03:55:01.226522683Z”,
“build_snapshot” : false,
“lucene_version” : “10.2.2”,
“minimum_wire_compatibility_version” : “2.19.0”,
“minimum_index_compatibility_version” : “2.0.0”
},
“tagline” : “The OpenSearch Project: https://opensearch.org/”
}