Adding custom analyzer after index creation

I would like to add a new type mapping to an existing index that needs to
have a custom analyzer (ngram_analyzer) described below.

{
"index" : {
"analysis" : {
"analyzer" : {
"ngram_analyzer" : {
"type" : "custom",
"tokenizer" : "lowercase",
"filter" : ["ngram_filter"]
}
},
"filter" : {
"ngram_filter" : {
"type" : "nGram",
"min_gram" : 3,
"max_gram" : 8
}
}
}
}

I am trying to post to the setting url, but
http://localhost:9200/existing_index/_settings , but when i trying to add
the new mapping it gives me an error saying that ngram_analyzer does not
exists. the curl post returns "OK". but i think I am missing something.
Any one have a quick curl gist example on how this would work?

-Todd

--

Here is a gist on how to create analyzer and use it in mapping: https://gist.github.com/2146038

Does it help?

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 19 nov. 2012 à 23:28, Todd Gruben tgruben@gmail.com a écrit :

I would like to add a new type mapping to an existing index that needs to have a custom analyzer (ngram_analyzer) described below.

{
"index" : {
"analysis" : {
"analyzer" : {
"ngram_analyzer" : {
"type" : "custom",
"tokenizer" : "lowercase",
"filter" : ["ngram_filter"]
}
},
"filter" : {
"ngram_filter" : {
"type" : "nGram",
"min_gram" : 3,
"max_gram" : 8
}
}
}
}

I am trying to post to the setting url, but http://localhost:9200/existing_index/_settings , but when i trying to add the new mapping it gives me an error saying that ngram_analyzer does not exists. the curl post returns "OK". but i think I am missing something. Any one have a quick curl gist example on how this would work?

-Todd

--

--

that gist is setting up the custom analyzer at the time of index creation,
what I would like to do is do it when i create the mapping. I have just
opted to create a new index and all works ok.

-Todd

On Monday, November 19, 2012 4:39:31 PM UTC-6, David Pilato wrote:

Here is a gist on how to create analyzer and use it in mapping:
https://gist.github.com/2146038

Does it help?

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 19 nov. 2012 à 23:28, Todd Gruben <tgr...@gmail.com <javascript:>> a
écrit :

I would like to add a new type mapping to an existing index that needs to
have a custom analyzer (ngram_analyzer) described below.

{
"index" : {
"analysis" : {
"analyzer" : {
"ngram_analyzer" : {
"type" : "custom",
"tokenizer" : "lowercase",
"filter" : ["ngram_filter"]
}
},
"filter" : {
"ngram_filter" : {
"type" : "nGram",
"min_gram" : 3,
"max_gram" : 8
}
}
}
}

I am trying to post to the setting url, but
http://localhost:9200/existing_index/_settings , but when i trying to add
the new mapping it gives me an error saying that ngram_analyzer does not
exists. the curl post returns "OK". but i think I am missing something.
Any one have a quick curl gist example on how this would work?

-Todd

--

--