You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConcreteTypeConverter.GetConcreteTypeUsingSelector can return null for type if the as the typeDict can contain null values for the type and that case isn't handled.
I think it would make sense to check if the type is null otherwise return the baseType
Here is the the required code to reproduce the issue:
the search document class:
// indexed typepublicclassProduct{publicstringCode{get;set;}}publicclassMultiSearchThrowsWhenTypeIsSpecified{staticvoidMain(string[]args){varnest=newElasticClient(newConnectionSettings(newUri("http://localhost:9200")));varindexName="multisearch-with-type-name-error";vartypeName="product";nest.IndexMany(new[]{newProduct{Code="1234"},newProduct{Code="5678"}},indexName,typeName,newSimpleBulkParameters{Refresh=true});varsearchName="products";varresult=nest.MultiSearch(descriptor =>descriptor.Search<Product>(searchName,
b =>b.Index(indexName)// I think the issue is that the type name is specified.Type(typeName)));result.GetResponse<Product>(searchName);}}
The text was updated successfully, but these errors were encountered:
ConcreteTypeConverter.GetConcreteTypeUsingSelector can return null for type if the as the typeDict can contain null values for the type and that case isn't handled.
I think it would make sense to check if the type is null otherwise return the baseType
Here is the the required code to reproduce the issue:
the search document class:
The text was updated successfully, but these errors were encountered: