6.5.3 Pattern
이 문서의 허가되지 않은 무단 복제나 배포 및 출판을 금지합니다. 본 문서의 내용 및 도표 등을 인용하고자 하는 경우 출처를 명시하고 김종민([email protected])에게 사용 내용을 알려주시기 바랍니다.
PUT pat_tokenizer
{
"settings": {
"analysis": {
"tokenizer": {
"my_pat_tokenizer": {
"type": "pattern",
"pattern": "/"
}
}
}
}
}GET pat_tokenizer/_analyze
{
"tokenizer": "my_pat_tokenizer",
"text": "/usr/share/elasticsearch/bin"
}{
"tokens" : [
{
"token" : "usr",
"start_offset" : 1,
"end_offset" : 4,
"type" : "word",
"position" : 0
},
{
"token" : "share",
"start_offset" : 5,
"end_offset" : 10,
"type" : "word",
"position" : 1
},
{
"token" : "elasticsearch",
"start_offset" : 11,
"end_offset" : 24,
"type" : "word",
"position" : 2
},
{
"token" : "bin",
"start_offset" : 25,
"end_offset" : 28,
"type" : "word",
"position" : 3
}
]
}Last updated