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":"小米是中国的"
}
}
}