Hi Team,
I kept the following settings for an index facebook..
PUT /facebook
{
"settings" : {
"analysis": {
"analyzer": {
"wordAnalyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"word_delimiter_for_phone"
]
}
},
"filter": {
"word_delimiter_for_phone": {
"type": "word_delimiter",
"catenate_all": true,
"generate_number_parts ": false,
"split_on_case_change": false,
"generate_word_parts": false,
"split_on_numerics": false,
"preserve_original": true
}
}
}
},
"mapping":{
"face": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
I would like to retrieve the data by preserving the special characters in
the search term as it is, which is having special characters like -, /, ( ,
) ,
for this I have used the above analyzer and filter settings.
When am using query :
GET facebook/face/_search
{
"query": {
"bool": {
"must": [
{
"query_string": {
"fields": [
"id","name"
],
"query": "a/",
"analyzer":"wordAnalyzer"
}
}
]
}
}
}
Showing error as:
"error": "SearchPhaseExecutionException[Failed to execute phase [query],
all shards failed; shardFailures {[0IYtu1aLQ2qxfwLnbCFTHg][facebook][0]:
SearchParseException[[facebook][0]: from[-1],size[-1]: Parse Failure
[Failed to parse source ....................................
I would like to preserve the special characters while searching how can I
achieve this? do I need to change my query (or ) may I get any query to
search the term in different fields by preserving the special characters.
--
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/eb395416-f991-45c7-b24b-960438f2d625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.