我试图在ElasticSearch中完全理解使用多种映射类型的索引。在文档中,它给出了示例代码:
PUT my_index
{
"mappings": {
"user": {
"_all": { "enabled": false },
"properties": {
"title": { "type": "string" },
"name": { "type": "string" },
"age": { "type": "integer" }
}
},
"blogpost": {
"properties": {
"title": { "type": "string" },
"body": { "type": "string" },
"user_id": {
"type": "string",
"index": "not_analyzed"
},
"created": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
}
}
}
}
}
通过这种映射,我将如何创建和搜索对象?
对于创造,它将是:
POST my_index/user/blogspot
或
POST my_index/user,blogspot
搜索它会是:
GET my_index/user/blogspot
或
GET my_index/user,blogspot
或其他什么?
具有多个映射的POST和GET的示例将真正帮助我。非常感谢你!