0
我是ES新手。我創建一個索引:彈性搜索:爲什麼通配符查詢不返回結果?
PUT test
{
"mappings": {
"logEvent":{
"dynamic": "false",
"properties": {
"hostName":{
"type": "keyword"
},
"message":{
"type": "text"
}
"timeStamp":{
type:"date"
}
}
}
}
}
我插入一排
"User:x;level:x1; loged in
然後我tryied運行查詢:
GET test/logEvent/_search
{
"query":{
"wildcard":{
"message": "User:*;level:x1; loged in"
}
}
}
我什麼也沒得到,從查詢返回。我在這裏做錯了什麼?
修復拼寫和代碼格式。 – phd