I'm using the ElasticHighLevelClient (NEST) to index data from SQL DB storage. The problem is that I don't have access to the POCO objects and that I have to filter over this data. POCO objects have nested fields, for example
class Car{
public string Id { get; set; }
public string Name { get; set; }
public string Model { get; set; }
public List<Engine> Engines { get; set; }
public List<Wheel> Wheels {get; set;}
}
class Engine {
public string Id { get; set; }
public string EngineModel { get; set; }
public TypeEnum Type { get; set; }
public List<Maker> Makers { get; set; }
}
class Wheel {
public string Id { get; set; }
public string Name { get; set; }
}
class Maker {
public string Id { get; set; }
public string CompanyName { get; set; }
}
I found this question Bulk Indexing in Elasticssearch using the ElasticLowLevelClient client but i have several problems with it: 'PostData.PostData(string) is inaccessible due to its protection level. I changed it to new PostData.Serializable(stringJson)); but i've got "cannot resolve symbol 'Serializible'" error.
So, can anybody help me with next moments:
1) How can I index Car object without having access to the POCO objects?
2) How can I setup filtering with nested objects for example all cars that have an Engine.Type = “petrol” and Engine.Maker = “ltd”?
Thanks!