1

I am getting the following error when I try and use a template search on an AWS elasticsearch cluster using the query

"match": { "title": "copyright" }

Parse Failure [Failed to parse source [{\"match\"{\"title\":\"copyright\"}}]]]; 
nested: Parse Failure [No parser for element [match]]];

The query is failing during the search phase, whilst trying to parse the query.

Why is the Parse failing?

My query works fine for a localhost elasticsearch instance.

Here is my mapping for the index type:

properties: {
  title: { type: 'string' },
  toc: {
    type: 'nested',
    properties: {
      title:  { type: 'string' },
    },
  },
},
alexwlchan
  • 5,699
  • 7
  • 38
  • 49
Ryan White
  • 2,366
  • 1
  • 22
  • 34

1 Answers1

0

AWS Elasticsearch service supports an older version of elasticsearch to the one I was using, 1.5.2, compared to 2.1. This older version supports a different syntax for template searches, where the template attribute is used instead of the inline attribute to supply your template, show here

Ryan White
  • 2,366
  • 1
  • 22
  • 34