1
36-3031.00|36-3021.00
〜36-3031.00
〜36-3021.00
の文字列を|
の区切り文字でトークン化する必要があります。弾性検索の区切り文字に基づいて文字列をトークン化
私はこのように試してみましたが、
PUT text
{
"test1": {
"settings": {
"analysis" : {
"tokenizer" : {
"pipe_tokenizer" : {
"type" : "pattern",
"pattern" : "|"
}
},
"analyzer" : {
"pipe_analyzer" : {
"type" : "custom",
"tokenizer" : "pipe_tokenizer"
}
}
}
},
"mappings": {
"mytype": {
"properties": {
"text": {
"type": "string",
"analyzer": "pipe_analyzer"
}
}
}
}
}}
しかし、それは正確な生産does't。誰でもこのユースケースを整理できますか?
GET/test1の/ _analyze { "フィールド": "のproductID"、 "テキスト": "36から3031.00 | 36〜3021.00" }それはのように分割します36,3031.00,36,3021.00 –
これは、あなたが私の指示に正確に従わなかったことを意味します。私は完全なテストで私の答えを更新しました。 –