I have an field of type ObjectId (MongoDB.Bson) in my model, and when I index it elastic search server, it looks like following structure in Elastic Search:
My question is, how can query (using NEST client) to match this field? For example, if it was a string field, I would do something like:
_elasticClient.Search<LineItem>(x => x
.Index("lineitems")
.Query(q => q
.Term(p => p.ClaimId, "xyzClaimId")
)
);
But ClaimId field is actually ObjectId type. How can i modify my query to get matched result?