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