Nested Query not working

 public class Calendars
 {
     public decimal? NightlyPrice { get; set; }
     public bool? Availability { get; set; }
     public List<CalendarDates> Dates{ get; set; }
 }
 public class CalendarDates
{
    public DateTime? FromDate { get; set; }
    public DateTime? ToDate { get; set; }
}

This is my dto, and I have nested mapping for CalendarDates model
I have written query below to fetch data but no result out

DateTime sdate = new DateTime(2025, 03, 03);
DateTime edate = new DateTime(2025, 03, 04);
int[] searchTerm = [7515];
var response = await _elasticClient.SearchAsync<Calendars>(s => s
    .Index(indexName)
    .From(0)
    .Size(1200)
    .Query(q => q
        .Bool(b => b
            .Must(m => m
                .Terms(ts => ts
                    .Field(f => f.PropertyId)
                    .Terms(BuildTermsQueryField(searchTerm))
                )
            ).Filter(f => f
                .Nested(n => n
                    .Path(p => p.BookingPalCalendarDates)
                        .Query(q => q
                            .Bool(b => b
                                .Must(m => m.Range(rr => rr
                                    .DateRange(dr => dr
                                    .Field("CalendarDates.FromDate") // assumes StartDate is of type DateTime
                                        .Gte(sdate)  // specify your lower bound
                                            .Lte(edate)
                                            )
                                    )
                                )
                                )
                            )
                        )
                )
            )
        )
    );

Welcome!

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Have a look at the Elastic Stack and Solutions Help · Forums and Slack | Elastic page. It contains also lot of useful information on how to ask for help.