Am using the pattern "[^@:/.!=-\w\p{L}\d]+" in sense for settings.
It is showing showing Bad string sytax error. Do I need to add anything for
this pattern inorder to accept the string in sense.
Where I would like to add special characters like'-','/','(',')' to my
pattern..
Here is my settings:
"analysis": {
"analyzer": {
"my_analyzer":
{
"type":"custom",
"tokenizer":"special_tokenizer",
"filter" : ["mynGram"]
}
},
"tokenizer": {
"special_tokenizer":
{
"type" : "pattern",
"pattern" :
"[^-/\w\p{L}\d]+" Here am
getting Bad String syntax error in sense , any other way of giving the
string
}
},
"filter": {
"mynGram" : {
"type" : "nGram",
"min_gram": 1,
"max_gram": 50
}
}
}
On Thursday, July 26, 2012 at 11:58:46 PM UTC+5:30, Praveen Kariyanahalli
wrote:
I saw many threads discuss it. I have crossed few hurdles, last one is
still bothering me. I had email address, ":", "/" in my data (which need to
be indexed and searched). Now I am able to search the email address
te...@myco.com <javascript:>, but I still cannot have the following
characters indexed: ":" "/" and "-". Any help is greatly appreciated. Is
it issue with my index_analyzer or search_analyzer?
Thanks in Advance
-Praveen
Here is my mapping:
ESINDEX = {
"number_of_shards": 1,
"analysis": {
"filter": {
"mynGram" : {
"type" : "nGram",
"min_gram": 1,
"max_gram": 50
}
},
"analyzer": {
"a1" : {
"type" :"custom",
"tokenizer":"uax_url_email",
"filter" : ["mynGram"]
}
}
}
}
ESMAPPINGS = {
"index_analyzer" : "a1",
"search_analyzer" : "whitespace",
"properties" : {
u'test_field1' : {
'index' : 'not_analyzed',
'type' : u'string',
'store' : 'yes'
},
u'testfield2' : {
'index' : 'not_analyzed',
'type' : u'string',
'store' : 'yes'
},
u'email' : {
'index': 'not_analyzed',
'type' : u'string',
'store': 'yes'
},
:::::::::::
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c431b584-a4a2-4b86-89ce-b9cce43d3e79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.