I have fat ElasticSearch index with plenty of fields. I'd like to enrich this index with another field containing arrays of 1024 dimensionality. However, I find it way too much.
Thus, I'm curious if it is possible to perform queries on both of indices as if they were single index effectively. It is important to notice that both of supposed indices do not have the same mappings but could be joined via user_id field.
Or is there better solution to deal with broad indices?
CodePudding user response:
Currently there are no JOINs in Elasticsearch (though this might change to some degree — more runtime lookups than full-blown JOINs).
The closest thing right now are index-time lookups, but that won't solve your issue. So I'm afraid you'll need application-side JOINs.
PS: "I find it way too much" is for diskspace or what is too much around index-time enrichments?
CodePudding user response:
Maybe what you are you looking for is an Elasticsearch alias.
Aliases allow you to effectively join two indices at search which behaves like if you have only one. This can be useful to search something accross two indices when you have a common field in two of them.