Attibute mapping not working with 2 POCO classes es 5.5

Hi Everyone,

I have a case where index has 2 type and i am using nest to create index with the help of attribute mapping.
The attribute mapping works fine when i used it with 1 poco class as soon as i add another poco class it dosen't map the properties with attribute as desired for eg

CLass1::

[keyword]
public int prop1{get; set;} // works fine if i only use this class to map to a index

CLass2::

public int prop2{get; set;}

Now when i try to create a index it will not create mapping as desired ::
When using class1 only mapping will be:
"prop1" : {
"type" : "keyword"
}

When using class1 & class2 mapping will be:
"prop1" : {
"type" : "long"
}

code i am using to create index

esConnection.CreateIndex("index", c => c
.InitializeUsing(indexConfig)
.Mappings(m => m.Map(x => x.AutoMap())
.Map(x => x.AutoMap())
)
);

Any help would be appreciated.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.