While creating a business listing data store, so far added Business and Categories to an index.
The mappings show as:
Q1: Is this okay? And/or referring to Mapping | Elasticsearch Guide [8.1] | Elastic should I create a custom map to group based on the object (business, category etc)? Because as I add more objects to the index, this list may increase.
Q2: I am using this Java example to create a new Business.. if I need to add a "business" map, how can I add?
final BulkResponse response = client.bulk(builder -> {
for (Business business : businesses) {
builder.index(indexName)
.operations(ob -> {
if (business.getId() != null) {
ob.index(ib -> ib.document(business).id(business.getId()));
} else {
ob.index(ib -> ib.document(business));
}
return ob;
});
}
return builder;
});