$ cat test.sh
curl
1003.es.dip.sina.com.cn:9200/logstash-mweibo-nginx-2015.04.03/v5nginx/_search?q=_id:AUx-QvSBS-dhpiB8_1f1\&pretty
-d '{
    "fields": ["request_time"],
    "script_fields" : {
        "test1" : {
            "script" : "doc[\"request_time\"].value"
        },
        "test2" : {
            "script" : "doc[\"request_time\"].value * 1000"
        }
    }
}'

$ sh test.sh
{
  "took" : 7,
  "timed_out" : false,
  "_shards" : {
    "total" : 56,
    "successful" : 56,
    "failed" : 0
  },
  "hits" : {
    "total" : 1,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "logstash-mweibo-nginx-2015.04.03",
      "_type" : "v5nginx",
      "_id" : "AUx-QvSBS-dhpiB8_1f1",
      "_score" : 1.0,
      "fields" : {
        "test2" : [ -8646911284551352000 ],
        "test1" : [ 4603039107142836552 ],
        "request_time" : [ 0.54 ]
      }
    } ]
  }
}

WHY?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CABwsoojyVwcf%2BuyG8TuWXEFSwj20L3FFyEKqJVyf8F02oy_4Zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to