版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
http://localhost:9200/blog put方式
{
"mappings":{
"hello":{
"properties":{
"id":{
"type":"long",
"store":true
},
"title":{
"type":"text",
"store":true,
"analyzer":"ik_smart"
},
"content":{
"type":"text",
"store":true,
"analyzer":"ik_smart"
}
}
}
}
}
查询
http://localhost:9200/blog/hello/_search post方式
{
"query":{
"query_string":{
"default_field":"content",
"query":"小米是中国的"
}
}
}