I have a use case in which I want to index my document in a separate index based on a certain condition.
For example, I want to store an invoice document to an index with department name suffixed with it.
@Document(indexName="store_{department}", indexStoreType="invoice")
public class InvoiceES{
// fields
@Id
private String id;
@Field
private String department;
}
Is it possible to achieve this using Spring Data?
If not, is it planned in a coming release of Spring Data?
indexNamein this case) in code is not a good idea, not sure why Spring folks took this decision.