Analyzer not found

Hello,

I've defined an analyzer in my settings and updated the index with
this new settings:

{"settings": {
"analysis" :{
"analyzer": {
"exact_analyzer": {
"type": "custom",
"tokenizer":"my_pattern_tokenizer",
"filter":[]
}
},
"tokenizer": {
"my_pattern_tokenizer": {
"type":"pattern",
"pattern":"$^"
}
},
"filter": {
}
}
}
}

If I do a get for my settings (curl -XGET 'http://xxx:9200/_settings'), I see the following result

{"yellow_listings":{"settings":
{"index.number_of_shards":"5","index.number_of_replicas":"0","index.version.created":"190199","index.settings.analysis.tokenizer.my_pattern_tokenizer.pattern":"$^","index.settings.analysis.analyzer.exact_analyzer.type":"custom","index.settings.analysis.tokenizer.my_pattern_tokenizer.type":"pattern","index.settings.analysis.analyzer.exact_analyzer.tokenizer":"my_pattern_tokenizer"}}}

So this looks ok. But when I try to create a mapping for my fields
using this analyzer I get the error:

Exception in thread "main"
org.elasticsearch.index.mapper.MapperParsingException: Analyzer
[exact_analyzer] not found for field [exactCategory]

My mapping for this field:
"category":{"type":"multi_field", "fields":{
"category" : {"type" : "string"},
"exactCategory" : {"type" : "string", "store": "yes",
"analyzer":"exact_analyzer"}
}
},

Any idea's?

thanks,
Bert

This seem to work: gist:2437609 · GitHub. If you still can't get
it to work, post a full recreation. Btw, why do you store the field?

On Fri, Apr 20, 2012 at 4:05 PM, bert gossey bgossey@hotmail.com wrote:

Hello,

I've defined an analyzer in my settings and updated the index with
this new settings:

{"settings": {
"analysis" :{
"analyzer": {
"exact_analyzer": {
"type": "custom",
"tokenizer":"my_pattern_tokenizer",
"filter":
}
},
"tokenizer": {
"my_pattern_tokenizer": {
"type":"pattern",
"pattern":"$^"
}
},
"filter": {
}
}
}
}

If I do a get for my settings (curl -XGET 'http://xxx:9200/
_settings'), I see the following result

{"yellow_listings":{"settings":

{"index.number_of_shards":"5","index.number_of_replicas":"0","index.version.created":"190199","index.settings.analysis.tokenizer.my_pattern_tokenizer.pattern":"$^","index.settings.analysis.analyzer.exact_analyzer.type":"custom","index.settings.analysis.tokenizer.my_pattern_tokenizer.type":"pattern","index.settings.analysis.analyzer.exact_analyzer.tokenizer":"my_pattern_tokenizer"}}}

So this looks ok. But when I try to create a mapping for my fields
using this analyzer I get the error:

Exception in thread "main"
org.elasticsearch.index.mapper.MapperParsingException: Analyzer
[exact_analyzer] not found for field [exactCategory]

My mapping for this field:
"category":{"type":"multi_field", "fields":{
"category" : {"type" : "string"},
"exactCategory" : {"type" :
"string", "store": "yes",
"analyzer":"exact_analyzer"}
}
},

Any idea's?

thanks,
Bert

Hi,

Thanks for your answer. I was creating and updating the settings,
using the java API. I tried your version (using the REST API) and that
seems to work. I need to check what I did wrong in my java code.

The store is simply something I took from an example I was using. What
does store exactly mean?

thank,
Bert

On Apr 21, 5:05 pm, Shay Banon kim...@gmail.com wrote:

This seem to work:gist:2437609 · GitHub. If you still can't get
it to work, post a full recreation. Btw, why do you store the field?

On Fri, Apr 20, 2012 at 4:05 PM, bert gossey bgos...@hotmail.com wrote:

Hello,

I've defined an analyzer in my settings and updated the index with
this new settings:

{"settings": {
"analysis" :{
"analyzer": {
"exact_analyzer": {
"type": "custom",
"tokenizer":"my_pattern_tokenizer",
"filter":
}
},
"tokenizer": {
"my_pattern_tokenizer": {
"type":"pattern",
"pattern":"$^"
}
},
"filter": {
}
}
}
}

If I do a get for my settings (curl -XGET 'http://xxx:9200/
_settings'), I see the following result

{"yellow_listings":{"settings":

{"index.number_of_shards":"5","index.number_of_replicas":"0","index.version .created":"190199","index.settings.analysis.tokenizer.my_pattern_tokenizer. pattern":"$^","index.settings.analysis.analyzer.exact_analyzer.type":"custo m","index.settings.analysis.tokenizer.my_pattern_tokenizer.type":"pattern", "index.settings.analysis.analyzer.exact_analyzer.tokenizer":"my_pattern_tok enizer"}}}

So this looks ok. But when I try to create a mapping for my fields
using this analyzer I get the error:

Exception in thread "main"
org.elasticsearch.index.mapper.MapperParsingException: Analyzer
[exact_analyzer] not found for field [exactCategory]

My mapping for this field:
"category":{"type":"multi_field", "fields":{
"category" : {"type" : "string"},
"exactCategory" : {"type" :
"string", "store": "yes",
"analyzer":"exact_analyzer"}
}
},

Any idea's?

thanks,
Bert

Store effectively means store this field value on its own. By default
though, _source is stored, and if you specify a field "path", it will
automatically load, parse and extract it from source for you if the field
itself is not stored.

On Sun, Apr 22, 2012 at 1:01 PM, bert gossey bgossey@hotmail.com wrote:

Hi,

Thanks for your answer. I was creating and updating the settings,
using the java API. I tried your version (using the REST API) and that
seems to work. I need to check what I did wrong in my java code.

The store is simply something I took from an example I was using. What
does store exactly mean?

thank,
Bert

On Apr 21, 5:05 pm, Shay Banon kim...@gmail.com wrote:

This seem to work:gist:2437609 · GitHub. If you still can't
get
it to work, post a full recreation. Btw, why do you store the field?

On Fri, Apr 20, 2012 at 4:05 PM, bert gossey bgos...@hotmail.com
wrote:

Hello,

I've defined an analyzer in my settings and updated the index with
this new settings:

{"settings": {
"analysis" :{
"analyzer": {
"exact_analyzer": {
"type": "custom",
"tokenizer":"my_pattern_tokenizer",
"filter":
}
},
"tokenizer": {
"my_pattern_tokenizer": {
"type":"pattern",
"pattern":"$^"
}
},
"filter": {
}
}
}
}

If I do a get for my settings (curl -XGET 'http://xxx:9200/
_settings'), I see the following result

{"yellow_listings":{"settings":

{"index.number_of_shards":"5","index.number_of_replicas":"0","index.version
.created":"190199","index.settings.analysis.tokenizer.my_pattern_tokenizer.
pattern":"$^","index.settings.analysis.analyzer.exact_analyzer.type":"custo
m","index.settings.analysis.tokenizer.my_pattern_tokenizer.type":"pattern",
"index.settings.analysis.analyzer.exact_analyzer.tokenizer":"my_pattern_tok
enizer"}}}

So this looks ok. But when I try to create a mapping for my fields
using this analyzer I get the error:

Exception in thread "main"
org.elasticsearch.index.mapper.MapperParsingException: Analyzer
[exact_analyzer] not found for field [exactCategory]

My mapping for this field:
"category":{"type":"multi_field", "fields":{
"category" : {"type" :
"string"},
"exactCategory" : {"type" :
"string", "store": "yes",
"analyzer":"exact_analyzer"}
}
},

Any idea's?

thanks,
Bert

I would add that I ran into the same issue with the analyzer not found.

I was adding analyzers inthe elasticsearch.yml config file. I overlooked however adding the same analyzer config in another node's config file.

So when I then tried to reference the analyzer when PUTting a mapping - I got the analyzer not found.

I suspect if I had used the REST API for _settings to add the analyzer - that wouldnt have happened.