Skip to content

Instantly share code, notes, and snippets.

@CGenie
Last active December 11, 2015 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CGenie/5ca45633dede9cc8dc1c to your computer and use it in GitHub Desktop.
Save CGenie/5ca45633dede9cc8dc1c to your computer and use it in GitHub Desktop.
Mapping creation:
curl -XPUT 'http://localhost:9200/structure_index/region_test/_mapping' -d '
{
"region_test":
{"properties": {
"boundaries": {"type": "geo_shape"}
}
}
}'
curl -XPUT http://localhost:9200/structure_index/region_test/3 -d '{"boundaries": {"type": "multipolygon", "coordinates": [[[-74.0137499999999, 40.728304], [-74.0137349999999, 40.728302], [-74.0137429999999, 40.7282450000001], [-74.013888, 40.728258], [-74.0138789999999, 40.7283140000001], [-74.0137779999999, 40.7283060000001], [-74.0137649999999, 40.7283990000001], [-74.0142372369999, 40.728437516], [-74.0148929999999, 40.7284910000001], [-74.0149139999999, 40.7285120000001], [-74.0150269999999, 40.7276820000001], [-74.0151999999999, 40.7266050000001], [-74.0152469999999, 40.726364], [-74.0152479999999, 40.7263320000001], [-74.0152299999999, 40.7263110000001], [-74.0148019999999, 40.7262670000001], [-74.0142372369999, 40.726211418], [-74.0138951719999, 40.7261777530001], [-74.0133489999999, 40.7261240000001], [-74.0126629999999, 40.7260550000001], [-74.0126510099999, 40.7260538580001], [-74.0123689999999, 40.726027], [-74.0121169999999, 40.725986], [-74.0117979999999, 40.7258980000001], [-74.0116929999999, 40.7258550000001], [-74.0107731139999, 40.725773733], [-74.0107238649999, 40.7257693820001], [-74.0106315979999, 40.725702342], [-74.0104850019999, 40.725595829], [-74.0099576479999, 40.7252126650001], [-74.0097399279999, 40.725019929], [-74.0094972229999, 40.7248521770001], [-74.008954705, 40.7244488580001], [-74.0079599999999, 40.7236930000001], [-74.0069009999999, 40.7229250000001], [-74.0057539999999, 40.7221050000001], [-74.0053299069999, 40.7218090910001], [-74.0050889999999, 40.721641], [-74.0041099999999, 40.7209570000001], [-74.0030409999999, 40.7201880000001], [-74.0023009999999, 40.7196470000001], [-74.0019789999999, 40.71943], [-74.0019052909999, 40.7193763120001], [-74.0012389999999, 40.718891], [-74.0007029999999, 40.718509], [-74.0005549999999, 40.7184080000001], [-74.0003549999999, 40.7182710000001], [-73.9999839999999, 40.7179870000001], [-73.999681, 40.7183610000001], [-73.9991119999999, 40.719047], [-73.9986809999999, 40.719567], [-73.9979959999999, 40.7203720000001], [-73.9977469999999, 40.7207010000001], [-73.9976759999999, 40.720804], [-73.9976439999999, 40.7208640000001], [-73.99761, 40.7209300000001], [-73.9975679999999, 40.721054], [-73.9973769999999, 40.7215370000001], [-73.9971539999999, 40.7221070000001], [-73.9970439999999, 40.7224760000001], [-73.996934, 40.7228190000001], [-73.9967969999999, 40.7231830000001], [-73.9966689999999, 40.7234480000001], [-73.9965449999999, 40.7236290000001], [-73.9961839999999, 40.7240620000001], [-73.9953789999999, 40.7250500000001], [-73.9955199999999, 40.7250940000001], [-73.9959239999999, 40.7252000000001], [-73.9966549999999, 40.7253690000001], [-73.9968, 40.7254060000001], [-73.9969509999999, 40.7254550000001], [-73.9970869999999, 40.7255060000001], [-73.9980999999999, 40.726005], [-73.9992289999999, 40.7265620000001], [-74.0001909999999, 40.7270340000001], [-74.0011709999999, 40.7275190000001], [-74.0023199999999, 40.7281110000001], [-74.0026269999999, 40.7282650000001], [-74.0027479999999, 40.7283110000001], [-74.0028199999999, 40.7283320000001], [-74.0028579999999, 40.7283380000001], [-74.002946, 40.7283530000001], [-74.0031299999999, 40.7283750000001], [-74.0034109999999, 40.7284070000001], [-74.0050419999999, 40.7285600000001], [-74.0068129999999, 40.7287140000001], [-74.0102272539999, 40.729040125], [-74.0107179999999, 40.729087], [-74.0108129999999, 40.7281710000001], [-74.0114249999999, 40.728212], [-74.0119499999999, 40.7282530000001], [-74.0119579999999, 40.7281940000001], [-74.0119399999999, 40.728192], [-74.0119439999999, 40.7281560000001], [-74.0119529999999, 40.7281570000001], [-74.0119579999999, 40.7281140000001], [-74.0120139999999, 40.7281180000001], [-74.0120109999999, 40.7281630000001], [-74.0120209999999, 40.7281630000001], [-74.012019, 40.7281740000001], [-74.012244, 40.72819], [-74.0122409999999, 40.7282080000001], [-74.0120159999999, 40.728192], [-74.0120139999999, 40.7282000000001], [-74.0119789999999, 40.7281970000001], [-74.0119709999999, 40.728256], [-74.0128229999999, 40.728323], [-74.0128279999999, 40.7282870000001], [-74.013212, 40.7283190000001], [-74.0132069999999, 40.7283550000001], [-74.0137359999999, 40.728394], [-74.0137499999999, 40.728304]]]}, "_id": 3}'
This throws:
{"error":"MapperParsingException[Failed to parse [boundary]]; nested: NullPointerException; ","status":400}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment