From 48f348c9521594ae3b3deb0c837a17b5810b02f3 Mon Sep 17 00:00:00 2001 From: MartinMikita Date: Tue, 27 Sep 2016 17:16:50 +0200 Subject: [PATCH] Removed sample.tsv from repository. Use smaller planet-latest-100k.tsv.gz from GitHub releases. --- Dockerfile | 1 - sample.tsv | 7 ------- sphinx-reindex.sh | 8 +++++--- 3 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 sample.tsv diff --git a/Dockerfile b/Dockerfile index 57d390a..7679f16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,6 @@ COPY conf/nginx/nginx.conf /etc/nginx/sites-available/default COPY supervisor/*.conf /etc/supervisor/conf.d/ COPY supervisord.conf /etc/supervisor/supervisord.conf COPY web /usr/local/src/websearch -COPY sample.tsv / COPY sphinx-reindex.sh / ENV SPHINX_PORT=9312 \ diff --git a/sample.tsv b/sample.tsv deleted file mode 100644 index c7572f7..0000000 --- a/sample.tsv +++ /dev/null @@ -1,7 +0,0 @@ -name class type lon lat place_rank importance street city county state country country_code display_name west south east north wikipedia -Brno boundary administrative 16.582676561077353 49.20213481689629 16 0.6553486004994107 Brno Jihomoravský kraj Jihovýchod Czech Republic cz Brno, Jihomoravský kraj, Jihovýchod, Česko 16.427989797383816 49.10987952534557 16.727834529962536 49.2943707462507 cs.wikipedia.org/wiki/Brno -Höfnerstrasse street residential 8.576204867763238 47.106907085942126 26 0.09999999999999998 Höfnerstrasse Unterägeri " " Zug Switzerland ch Höfnerstrasse, Unterägeri, Zug, Schweiz, Suisse, Svizzera, Svizra 8.573325935480227 47.105989938096904 8.58524014028913 47.13735317575351 " " -Grand Canyon place hamlet -112.09849416541023 36.096560363352694 19 0.275 " " Coconino County Arizona United States of America us Grand Canyon, Coconino County, Arizona, United States of America -112.09849416541023 36.096560363352694 -112.09849416541023 36.096560363352694 " " -Grand Canyon South Entrance place village 118.1608959896813 30.133162730525886 19 0.275 " " Huangshan District Anhui China cn Grand Canyon South Entrance, Huangshan District, Huangshan City, Anhui, China 118.1608959896813 30.133162730525886 118.1608959896813 30.133162730525886 " " -Paris boundary administrative 2.3200309826175882 48.85881000934286 12 0.868934599321907 " " Paris Ile-de-France France fr Paris, Ile-de-France, France 2.224121956250343 48.81557548222165 2.4697601666346714 48.90215593195728 fr.wikipedia.org/wiki/Paris -Old Railroad Grade Road track track -113.727879439548 41.42158311090525 26 0.47062929320074587 Old Railroad Grade Road " " Box Elder County Utah United States of America us Old Railroad Grade Road, Box Elder County, Utah, United States of America -113.89638037725891 41.35571811907272 -113.5592687811614 41.48707335445678 en.wikipedia.org/wiki/First_Transcontinental_Railroad \ No newline at end of file diff --git a/sphinx-reindex.sh b/sphinx-reindex.sh index c88871e..139890f 100755 --- a/sphinx-reindex.sh +++ b/sphinx-reindex.sh @@ -2,10 +2,12 @@ set -e -# Copy sample file if missing -if [ ! -f /data/input/data.tsv ]; then +# Download sample 100k file if missing +if [ ! -f /data/input/data.tsv -a ! -f /data/input/data.tsv.gz ]; then mkdir -p /data/input/ - cp /sample.tsv /data/input/data.tsv + curl -L -s https://github.com/OSMNames/OSMNames/releases/download/v1.1/planet-latest-100k.tsv.gz \ + -o /data/input/planet-latest-100k.tsv.gz + ln /data/input/planet-latest-100k.tsv.gz /data/input/data.tsv.gz fi # Index files, only if not exists, or forced by the script