I would like to be able to set up some sort of mapping using the NEST2 client so that different types are automatically put in a defined index. Is this possible?
I've tried to map types like this:
client.Map<A>(m => m.Index("index1"));
client.Map<B>(m => m.Index("index2"));
And then index them like this:
client.Index(new SomethingThatGoesToTheDefaultIndex());
client.Index(new A());//Should end up in index1
client.Index(new B());//Should end up in index2
But everything ends up in the default index and not the set index. Do I need to give the required index every time I store data, or is it possible to set up a defined index per type?