Elasticsearch 是一个应用非常广泛的搜索引擎。它可以对文字进行分词,从而实现全文搜索。在实际的使用中,我们会发现有一些文字中包含一些表情符号,比如笑脸,动物等等,那么我们该如何对这些表情符号来进行搜索呢?
🏻 => 🏻, light skin tone, skin tone, type 1–2
🏼 => 🏼, medium-light skin tone, skin tone, type 3
🏽 => 🏽, medium skin tone, skin tone, type 4
🏾 => 🏾, medium-dark skin tone, skin tone, type 5
🏿 => 🏿, dark skin tone, skin tone, type 6
♪ => ♪, eighth, music, note
♭ => ♭, bemolle, flat, music, note
♯ => ♯, dièse, diesis, music, note, sharp
😀 => 😀, face, grin, grinning face
😃 => 😃, face, grinning face with big eyes, mouth, open, smile
😄 => 😄, eye, face, grinning face with smiling eyes, mouth, open, smile
😁 => 😁, beaming face with smiling eyes, eye, face, grin, smile
😆 => 😆, face, grinning squinting face, laugh, mouth, satisfied, smile
😅 => 😅, cold, face, grinning face with sweat, open, smile, sweat
🤣 => 🤣, face, floor, laugh, rofl, rolling, rolling on the floor laughing, rotfl
😂 => 😂, face, face with tears of joy, joy, laugh, tear
🙂 => 🙂, face, slightly smiling face, smile
🙃 => 🙃, face, upside-down
😉 => 😉, face, wink, winking face
🐅 => 🐅, tiger
🐆 => 🐆, leopard
🐴 => 🐴, face, horse
🐎 => 🐎, equestrian, horse, racehorse, racing
🦄 => 🦄, face, unicorn
🦓 => 🦓, stripe, zebra
🦌 => 🦌, deer
在上面,我们可以看到各种各样的 emoji 符号。比如我们想搜索 grin,那么它就把含有 😀 emoji 符号的文档也找出来。在今天的文章中,我们来展示如何实现对 emoji 符号的进行搜索。
————————————————
版权声明:本文为CSDN博主「Elastic 中国社区官方博客」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:
https://blog.csdn.net/UbuntuTo ... 61636