How can I add a new type to an existing index using Elasticsearch 6.x high level java REST API?
I am using a PutMappingRequest , it adds the first type when I am trying to add the second type it says
Rejecting mapping update to [db] as the final mapping would have more than 1 type
Any help on this?
Elasticsearch 6.x only supports a single type per index, so you can not do this. A workaround may be to add the type as a normal field and then filter on this.
I am trying to index around 5 modules in my application, which may or may not have same properties. And I am trying to implement a global search here, like if I search for a word I want to return the results from all the 5 modules. Which will be a better approach for me? Having a custom type property and keeping everything in a single index or having separate indices for each modules