在elasticsearch-py文档中,我找不到注册映射的示例,该示例执行这些REST API 文档所说的内容:
put mapping API允许为特定类型注册特定的映射定义.
$ curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "store" : true }
}
}
}
'
Run Code Online (Sandbox Code Playgroud)
对索引执行任何操作都涉及Indices API.PUTing映射也是许多Indices API之一.它们可以在Python客户端文档的Indices下一节中找到API Documentation.
你需要这个:put_mapping(*args,**kwargs).
| 归档时间: |
|
| 查看次数: |
4406 次 |
| 最近记录: |