我使用Elasticsearch 5.2,并不能看到index creation time用http://localhost:9200/_cat/indices?v.
只是想知道index creation time每个指数会显示哪些选项.
我有一个像
{
"_id" : ObjectId("5738cb363bb56eb8f76c2ba8"),
"records" : [
{
"Name" : "Joe",
"Salary" : 70000,
"Department" : "IT"
}
]
},
{
"_id" : ObjectId("5738cb363bb56eb8f76c2ba9"),
"records" : [
{
"Name" : "Henry",
"Salary" : 80000,
"Department" : "Sales"
},
{
"Name" : "Jake",
"Salary" : 40000,
"Department" : "Sales"
}
]
},
{
"_id" : ObjectId("5738cb363bb56eb8f76c2baa"),
"records" : [
{
"Name" : "Sam",
"Salary" : 90000,
"Department" : "IT"
},
{
"Name" : "Tom",
"Salary" : 50000,
"Department" : "Sales" …Run Code Online (Sandbox Code Playgroud) 只是使用两种简单的方法来迭代Go中的字符串.第一种似乎是正确的,但第二种方式是从-97开始的减号.有人知道为什么吗?
func main() {
str := "abc"
for i := 0; i < len(str) ; i++ {
println(str[i] - 'a')
}
for x := range str {
println(x - 'a')
}
}
Run Code Online (Sandbox Code Playgroud)
结果是 -
0
1
2
-97
-96
-95
Run Code Online (Sandbox Code Playgroud)