slion
(Gan Wei Shi)
June 1, 2016, 2:59am
1
DELETE test
PUT /test
{
"settings": {
"analysis": {
"analyzer": {
"whitespace": {
"type": "pattern",
"pattern": "\s+"
}
}
}
}
}
GET /test/_analyze?analyzer=whitespace&text=foo,bar baz
"foo,bar", "baz"
But actually it outputs "foo", "bar", "baz", how to output "foo,bar", "baz"?
Any help is welcome.
warkolm
(Mark Walkom)
June 1, 2016, 3:02am
2
Is that this one - https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-analyzer.html#_whitespace_tokenizer ?
It seems that your post formatting may have lost some of the code, use the </>
button to format things
slion
(Gan Wei Shi)
June 1, 2016, 3:10am
3
Thanks for your instant reply. Please see the url: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-analyzer.html
, what I need is an analyzer which could output terms "foo,bar", "baz" for input "foo,bar;baz"? Could you help me ?
slion
(Gan Wei Shi)
June 1, 2016, 3:13am
4
My data like this: "Jack,Ma;Mary Wu;", I just want it to be tokenized by semicolon, so it should bring out "Jack,Ma", "Mary Wu".