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