I could not fix this issue.
So I decided to recreate the whole thing.
My new model looks like this:
public class ElasticSearchDocument
{
public string Id { get; set; }
public Dictionary<string, string> Properties { get; private set; }
// Constructors and methods
}
I removed all the data anotations from the properties and recreated the elasticsearch schema.
Next I updated NEST to version 1.0 (PreRelease).
Now I can search using this line:
SearchDescriptor<ElasticSearchDocument> descriptor = new SearchDescriptor<ElasticSearchDocument>();
descriptor.AllTypes();
descriptor.QueryString(term);
descriptor.Size(20);
// Search
var results = c.Search<ElasticSearchDocument>(d => d = descriptor);
Haven't had a problem for a while now. I hope that maybe this helps for somebody.