This was my QueryContainer
which was working fine
QueryContainer orderFilterQuery = null;
if (request.Filters != null && request.Filters.Count > 0)
{
foreach (var filter in request.Filters)
{
orderFilterQuery |= new MultiMatchQuery
{
//All fields are string
Fields = Infer.Fields<Order>(
f => f.Destination.City,
f => f.Destination.State,
f => f.Destination.Name,
f => f.Origin.City,
f => f.Origin.State,
f => f.Origin.Name,
f => f.CarrierName,
f => f.Items.Select(x => x.Name)),
Query = filter,
};
}
}
After adding this line of code to filtering fields, it just stopped working
f => f.OrderNumber // long
One solution is checking whether the input is numeric or not if so, adding to filtering fields. But I was wondering why it is not working, however, the input query surely exists in other fields
Using:
- .NET6.0
- NEST 7.17.5