Previously, I used the NEST library to use Elasticsearch. This is now deprecated. I have implemented the recommended Elastic.Client.Elasticsearch. However, this library does not recognise the Attachment class.
How do I deal with this problem?
using System;
//using Nest;
using Elastic.Clients.Elasticsearch;
namespace Contracts
{
public class ElasticDocument
{
public int ID { get; set; }
public string Name { get; set; } = string.Empty;
public int Date { get; set; }
public DateTime Modified { get; set; }
public string Content { get; set; } = string.Empty;
// class Attachment is unknown in Elastic.Clients.Elasticsearch
public Attachment Attachment { get; set; }
}
}