curl -X PUT "localhost:9200/my-index-000001?pretty" -H 'Content-Type: application/json' -d'
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
'
curl -X PUT "localhost:9200/my-index-000001/_doc/1?pretty" -H 'Content-Type: application/json' -d'
{
"text": "Geopoint as an object with .000",
"location": {
"lat": 41.000,
"lon": -71.000
}
}
'
$ curl -sS 'localhost:9200/my-index-000001/_search?q=*' | jq .
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1,
"hits": [
{
"_index": "my-index-000001",
"_type": "_doc",
"_id": "1",
"_score": 1,
"_source": {
"text": "Geopoint as an object with .000",
"location": {
"lat": 41,
"lon": -71
}
}
}
]
}
}
"POOL BEFORE FIRST CONNECT: #<Net::HTTP::Persistent::Pool:0x000055ccfb778850 @size=256, @timeout=5, @available=#<Net::HTTP::Persistent::TimedStackMulti:0x000055ccfb778558 @create_block=#<Proc:0x000055ccfb778530 /home/deployer/.rvm/gems/ruby-2.7.0@persistent/gems/net-http-persistent-4.0.0/lib/net/http/persistent.rb:493>, @created=0, @que=[], @max=256, @mutex=#<Thread::Mutex:0x000055ccfb7784e0>, @resource=#<Thread::ConditionVariable:0x000055ccfb7784b8>, @shutdown_block=nil, @enqueued=0, @ques={}, @lru={}, @key=:\"connection_args-680\">, @key=\"current-680\", @key_count=:\"pool-660-count\">"
"POOL AFTER FIRST CONNECT: #<Net::HTTP::Persistent::Pool:0x000055ccfb778850 @size=256, @timeout=5, @available=#<Net::HTTP::Persistent::TimedStackMulti:0x000055ccfb778558 @create_block=#<Proc:0x000055ccfb778530 /home/deployer/.rvm/gems/ruby-2.7.0@persistent/gems/net-http-persistent-4.0.0/lib/net/http/persistent.rb:493>, @created=1, @que=[], @max=256, @mutex=#<Thread::Mutex:0x000055ccfb7784e0>, @resource=#<Thread::ConditionVariable:0x000055ccfb7784b8>, @shutdown_block=nil, @enqueued=1, @ques={[\"webservices.sabre.com\", 443, nil, nil, nil, nil]=>[#<Net::HTTP::Persistent::Connection:0x000055cd1d699818 @http=#<Net::HTTP webservices.sabre.com:443 open=true>, @ssl_generation=0, @last_use=2020-11-19 17:38:50.198540791 +0300, @requests=1>]}, @lru={[\"webservices.sabre.com\", 443, nil, nil, nil, nil]=>true}, @key=:\"connection_args-680\">, @key=\"current-680\", @key_count=:\"pool-660-count\">"