Query malformed, no start_object after query name

My data looks like this:

[
  ...
  {
    title: 'My first event',
    guestlist: {
      list: [
        {
          name: 'Christoffer'
        }
      ]
    }
  }
  ...
]

And I'm trying to use this query:

  body: {
    query: {
      bool: {
        must: [
          {
            nested: {
              path: 'guestlist',
              query: {
                bool: {
                  must: [
                    {
                      path: 'list',
                      query: {
                        bool: {
                          must: [
                            {
                              match_phrase_prefix: {
                                'list.name': 'christoffer' 
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }

But I just get the error that's in the title, what am I doing wrong?

Hey,

can you provide a full reproduction case. You do not need to use nested, if you dont have it configured in the mapping, but we the information you gave does not tell this.

Can you provide a full reproduction example (index creation, mapping configuration, document indexing, full example query), plus the elasticsearch version you are using.

Thanks!

--Alex

Unfortunately I do not know what more to provide.

I am using ElasticSearch with Firebase and it's https://github.com/firebase/flashlight plugin. Perhaps you can look there to see additional info on how mapping etc is done.

Help is greatly appreciated.

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