Error defining Analysis in Template

I define a custom analyzer in my template: https://gist.github.com/2764547

but when I make a call to create an index based on the template:

I get the following:

$ ./create_business_location_index.sh
{"error":"MapperParsingException[mapping [location]]; nested:
MapperParsingExcep
tion[Analyzer [skedulerAnalyzer1] not found for field
[business_location-name]];
","status":400}

Should this work? If so, am I configuring it correctly?

(Comments on the custom analysis welcome but be warned, it might not be
sensible as I'm just starting to play around with it)

Thanks!

Michael Sick

The analysis section should go under settings, it should work then...

On Mon, May 21, 2012 at 10:50 PM, Michael Sick <
michael.sick@serenesoftware.com> wrote:

I define a custom analyzer in my template:
ElasticSearch Template with Analysis · GitHub

but when I make a call to create an index based on the template:
Creating an index from the template · GitHub

I get the following:

$ ./create_business_location_index.sh
{"error":"MapperParsingException[mapping [location]]; nested:
MapperParsingExcep
tion[Analyzer [skedulerAnalyzer1] not found for field
[business_location-name]];
","status":400}

Should this work? If so, am I configuring it correctly?

(Comments on the custom analysis welcome but be warned, it might not be
sensible as I'm just starting to play around with it)

Thanks!

Michael Sick


Thanks Shay! Will test.

On Wed, May 23, 2012 at 6:48 PM, Shay Banon kimchy@gmail.com wrote:

The analysis section should go under settings, it should work then...

On Mon, May 21, 2012 at 10:50 PM, Michael Sick <
michael.sick@serenesoftware.com> wrote:

I define a custom analyzer in my template:
ElasticSearch Template with Analysis · GitHub

but when I make a call to create an index based on the template:
Creating an index from the template · GitHub

I get the following:

$ ./create_business_location_index.sh
{"error":"MapperParsingException[mapping [location]]; nested:
MapperParsingExcep
tion[Analyzer [skedulerAnalyzer1] not found for field
[business_location-name]];
","status":400}

Should this work? If so, am I configuring it correctly?

(Comments on the custom analysis welcome but be warned, it might not be
sensible as I'm just starting to play around with it)

Thanks!

Michael Sick


hi

I created a template like

{
"template_1": {
"template": "temp*",
"settings": {
"analysis": {
"filter": {
"gram_stemmer": {
"type": "stemmer",
"name": "english"
}
},
"analyzer": {
"auto_analyzer": {
"type": "pattern",
"pattern": "[{}()|\ ]+",
"filter": "lowercase"
}
}
}
},
"mappings": {
"type1": {
"properties": {
"sources": {
"type": "string",
"analyzer": "auto_analyzer"
}
}
}
}
}
}

===================================================
but when I entered
$ curl -XPUT localhost:9200/temp1

I still got
"error":"MapperParsingException[mapping [type1]]; nested: MapperParsingException
Analyzer [auto_analyzer] not found for field [sources]]; ","status":400}

Did I have sth wrong? Thanks very much

Ran into the same problem today. The solution is you're missing the "index" between the "setting" and the "analysis".

So the json should be:

template_1": {
"template": "temp*",
"settings": {
"index" : {
"analysis": {

I found the answer in this thread: https://groups.google.com/forum/#!searchin/elasticsearch/index$20template$20mapping$20analyzer$20not$20found/elasticsearch/X_YRiaV6zLg/7967m7AOEGQJ