0
解决管道“|”问题弹性搜索中的字符。当记录有任何特殊字符时没有结果数据。下面我查询ElasticSearch解析特殊字符
{
"query": {
"bool": {
"must": [
{
"term": {
"username": "john|[email protected]"
}
}
],
"must_not": [],
"should": []
}
},
我尝试使用"tokenizer":"uax_url_email"
,但没有工作
你能提供一个例子文件,该文件应匹配的确切字词('约翰| DOE @ group.net') ? – avr
我有数据库表,其中包含像john|[email protected]用户名,我需要通过上述查询使用elasticsearh选择此。那就是所有 –
如果你使用ES 5.x和默认映射字段'username',那么用'“username.keyword”替换这一行'“用户名”:“john|[email protected]”':“john | doe @ group.net“'并尝试它应该工作。 – avr