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
function(doc){ | |
index("default", doc._id); | |
if(doc.min_length){ | |
index("min_length", doc.min_length, {"store": "yes"}); | |
} | |
if(doc.diet){ | |
index("diet", doc.diet, {"store": "yes"}); | |
} | |
if (doc['class']){ | |
index("class", doc.['class'], {"store": "yes"}); |
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
# encoding: utf-8 | |
""" | |
Quick script to dump out the long/lat of most of the capital cities in the world (I removed ones with unicode characters). | |
""" | |
import csv | |
import json | |
cities = u"""Bulgaria,Sofia,42.40N 023.18E | |
Czech Republic,Prague,50.06N 014.26E |
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
{"latitude": "42.40N", "country": "Bulgaria", "longitude": "023.18E", "city": "Sofia"} | |
{"latitude": "50.06N", "country": "Czech Republic", "longitude": "014.26E", "city": "Prague"} | |
{"latitude": "15.20N", "country": "Eritrea", "longitude": "038.58E", "city": "Asmera"} | |
{"latitude": "59.22N", "country": "Estonia", "longitude": "024.48E", "city": "Tallinn"} | |
{"latitude": "18.08S", "country": "Fiji", "longitude": "178.25E", "city": "Suva"} | |
{"latitude": "60.08N", "country": "Finland", "longitude": "025.00E", "city": "Helsinki"} | |
{"latitude": "06.09N", "country": "Iceland", "longitude": "021.51W", "city": "Reykjavik"} | |
{"latitude": "28.37N", "country": "India", "longitude": "077.13E", "city": "New Delhi"} | |
{"latitude": "53.20N", "country": "Ireland", "longitude": "006.15W", "city": "Dublin"} | |
{"latitude": "41.48N", "country": "Italy", "longitude": "012.36E", "city": "Rome"} |
NewerOlder