Return documents that matches : Filter nested record with Max Start date and match a keyword : Search for candidate having last job with a keyword

Hi, After all tries I am here to seek help.

I have following structure of the document:

"candidate_id" : 1234,
"location" : {
"city" : "NY", "country" : "US"
"age" : 32, 
"highest_education" : "Graduate",
"job_history" : [
"start_date" : "01-01-2019",
"title" : "software engineer"
"start_date" : "01-09-2021",
"title" : "Project Manager"

I want to search for all candidates which have the latest job title as "Project Manager"
along with added filters .

I have tried using nested aggregations but couldn't achieve the results , in documentations also I couldn't find such queries.

Is there an alternatives apart from querying inside the nested array objects ?

Thanks in advance

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.