I'm using Solr 6.1 in Schemaless Mode. After creating a collection and indexing a sample data the fields created were all set to have MultiValued = true, except for unique id.
The problem is when querying this data using SolrNet it wouldn't map the result to the model correctly. The queried results is returned as an array and require all my properties in the model to be updated to ICollection type.
Is there anyway we can set these field to MultiValued = false when indexing the sample data?
An example to illustrate the problem:
1) Index a sample of the following model in Schemaless Mode:
public class TestModel
{
[SolrUniqueKey("id")]
public int Id { get; set; }
[SolrField("guid")]
public Guid Guid { get; set; }
}
2) Solr's managed-schema file will be added with the following fields
<field name="guid" type="strings"/>
<field name="id" type="string" multiValued="false" indexed="true" required="true" stored="true"/>
3) Error during querying / mapping of the model
Object of type 'System.Collections.ArrayList' cannot be converted to type