Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Opensearch nested multi_match query not working properly

I'm trying to run a multi_match nested query using javascript and opensearch. Here is what the query looks like:

const { body } = await client.search({
        index,
        body: {
            size: 25,
            query: {
                nested: {
                    path: "questions",
                    query: {
                        multi_match: {
                            query: searchText,
                            fields: ["question", "comments", "label", "user_answer"],
                        },
                    },
                },
            },
        },
    });

and here is my schema:

 questions: {
    type: "nested",
    properties: {
        question: { type: "text" },
        comments: { type: "text" },
        label: { type: "text" },
        user_answer: { type: "text" },
    },
}

I have other queries that are working properly and the actual search is just returning no hits, so I know the problem isn't with opensearch and the setup. It seems that I just am doing the query wrong? Any help on this would be greatly appreciated, I can't find examples on SO that work in my case and the documentation isn't helping me much with this issue.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!