은 definiton :아포스트로피 제거 방법 여기
아포스트로피 토큰 필터 스트립을 모든 문자 아포스트로피 자체를 포함하여 아포스트로피, 후.
아포스트로피 및 문자를 제거하려고 시도합니다. 아포스트로피가 하나만있는 경우 필터는 아무 것도 제거하지 않습니다. 또한 여러 개의 연속 된 아포스트로피가있는 경우 관련 단어 을 분할하지만 아포스트로피 뒤에 아무 것도 제거하지 않습니다. 분명히 나는 뭔가를 놓쳤을 것입니다. 단일 아포스트로피와
입력 :
POST localhost:9200/_analyze?
{
"filter": ["apostrophe"],
"text": "apple banana'orange kiwi"
}
출력 다수의 연속 아포스트로피
{
"tokens": [
{
"token": "apple",
"start_offset": 0,
"end_offset": 5,
"type": "<ALPHANUM>",
"position": 0
},
{
"token": "banana'orange",
"start_offset": 6,
"end_offset": 19,
"type": "<ALPHANUM>",
"position": 1
},
{
"token": "kiwi",
"start_offset": 20,
"end_offset": 24,
"type": "<ALPHANUM>",
"position": 2
}
]
}
입력.
{
"filter": ["apostrophe"],
"text": "apple banana''orange kiwi"
}
출력
{
"tokens": [
{
"token": "apple",
"start_offset": 0,
"end_offset": 5,
"type": "<ALPHANUM>",
"position": 0
},
{
"token": "banana",
"start_offset": 6,
"end_offset": 12,
"type": "<ALPHANUM>",
"position": 1
},
{
"token": "orange",
"start_offset": 14,
"end_offset": 20,
"type": "<ALPHANUM>",
"position": 2
},
{
"token": "kiwi",
"start_offset": 21,
"end_offset": 25,
"type": "<ALPHANUM>",
"position": 3
}
]
}
죄송 합니다만, 아포스트로피를 없애시겠습니까? 또는 그 (것)들에 의하여 나누고 그 (것)들을 제거하십시오? – Mysterion
아포스트로피와 그 뒤에 나오는 문자를 제거하고 싶습니다. 질문을 업데이트했습니다. – gunererd
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-replace-charfilter.html을 시도해보십시오. – Mysterion