Last active
May 3, 2017 20:52
-
-
Save mapcentia/90f5637bb9c9620253eb to your computer and use it in GitHub Desktop.
AWS new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -XDELETE 'http://eu1.mapcentia.com/api/v1/elasticsearch/delete/dk/aws4' -d 'key=260013f0dd79cead7d630ea93ba5bced' | |
| curl -X POST "http://eu1.mapcentia.com/api/v1/elasticsearch/create/dk/aws4" -d 'key=260013f0dd79cead7d630ea93ba5bced&map={ | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "str_search_analyzer": { | |
| "type" : "custom", | |
| "tokenizer": "whitespace", | |
| "filter": [ | |
| "lowercase" | |
| ] | |
| }, | |
| "str_index_analyzer": { | |
| "type" : "custom", | |
| "tokenizer": "whitespace", | |
| "filter": [ | |
| "lowercase", | |
| "substring" | |
| ] | |
| } | |
| }, | |
| "filter": { | |
| "substring": { | |
| "type": "edgeNGram", | |
| "min_gram": 1, | |
| "max_gram": 255 | |
| } | |
| } | |
| } | |
| } | |
| }' | |
| curl -X PUT "http://eu1.mapcentia.com/api/v1/elasticsearch/map/dk/aws4/adresse" -d 'key=260013f0dd79cead7d630ea93ba5bced&map={ | |
| "adresse" : { | |
| "properties" : { | |
| "properties.string" : { | |
| "type" : "string", | |
| "search_analyzer" : "str_search_analyzer", | |
| "index_analyzer" : "str_index_analyzer" | |
| }, | |
| "properties.sort_string" : { | |
| "type" : "string", | |
| "index": "not_analyzed" | |
| } | |
| } | |
| } | |
| }' | |
| curl -X PUT "http://eu1.mapcentia.com/api/v1/elasticsearch/map/dk/aws4/vejnavn" -d 'key=260013f0dd79cead7d630ea93ba5bced&map={ | |
| "vejnavn" : { | |
| "properties" : { | |
| "properties.string" : { | |
| "type" : "string", | |
| "search_analyzer" : "str_search_analyzer", | |
| "index_analyzer" : "str_index_analyzer" | |
| }, | |
| "properties.sort_string" : { | |
| "type" : "string", | |
| "index": "not_analyzed" | |
| } | |
| } | |
| } | |
| }' | |
| curl -X PUT "http://eu1.mapcentia.com/api/v1/elasticsearch/map/dk/aws4/bynavn" -d 'key=260013f0dd79cead7d630ea93ba5bced&map={ | |
| "bynavn" : { | |
| "properties" : { | |
| "properties.string" : { | |
| "type" : "string", | |
| "search_analyzer" : "str_search_analyzer", | |
| "index_analyzer" : "str_index_analyzer" | |
| }, | |
| "properties.sort_string" : { | |
| "type" : "string", | |
| "index": "not_analyzed" | |
| } | |
| } | |
| } | |
| }' | |
| curl -X PUT "http://eu1.mapcentia.com/api/v1/elasticsearch/map/dk/aws4/vejnavn_bynavn" -d 'key=260013f0dd79cead7d630ea93ba5bced&map={ | |
| "vejnavn_bynavn" : { | |
| "properties" : { | |
| "properties.string" : { | |
| "type" : "string", | |
| "search_analyzer" : "str_search_analyzer", | |
| "index_analyzer" : "str_index_analyzer" | |
| }, | |
| "properties.sort_string" : { | |
| "type" : "string", | |
| "index": "not_analyzed" | |
| } | |
| } | |
| } | |
| } | |
| }' | |
| curl -XPOST "http://eu1.mapcentia.com/api/v1/elasticsearch/bulk/dk/aws4/vejnavn_bynavn/string" -d "q=select vejnavn||', '||postnrnavn as string, vejnavn||', '||postnrnavn as sort_string, kommunekode, regionskode from adresse.adgang4 group by vejnavn,postnrnavn,kommunekode,regionskode&key=260013f0dd79cead7d630ea93ba5bced" | |
| curl -XPOST "http://eu1.mapcentia.com/api/v1/elasticsearch/bulk/dk/aws4/bynavn/string" -d "q=select postnrnavn||', '||postnr as string, postnrnavn||', '||postnr as sort_string, kommunekode, regionskode from adresse.adgang4 group by postnrnavn,kommunekode,regionskode,postnr&key=260013f0dd79cead7d630ea93ba5bced" | |
| curl -XPOST "http://eu1.mapcentia.com/api/v1/elasticsearch/bulk/dk/aws4/vejnavn/id" -d "q=select vejnavn||kommunekode as id, vejnavn as string, vejnavn as sort_string, kommunekode,regionskode from adresse.adgang4 group by vejnavn,kommunekode,regionskode&key=260013f0dd79cead7d630ea93ba5bced" | |
| curl -XPOST "http://eu1.mapcentia.com/api/v1/elasticsearch/bulk/dk/aws4/adresse/gid/" -d "q=select gid, vejnavn||' '||husnr||', '||postnr||' '||postnrnavn as string, vejnavn||' '||husnr||', '||postnr||' '||postnrnavn as sort_string, kommunekode,regionskode from adresse.adgang4&key=260013f0dd79cead7d630ea93ba5bced" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment