Elasticsearch provides a REST API for configuring, loading, and querying data. It also has a bulk loading interface. To load shapefiles into elastic search I wrote a ruby script to convert shapefiles to Elasticsearch's bulk loading format. Here's the process for loading multiple shapefiles as multiple types into a single index (think of an index as a 'database' and types as 'tables').
If you haven't installed Elasticsearch, download it, unzip it, and read the README file to start the node.
1. Create the index
1. Create the index
curl -XPUT 'http://localhost:9200/geo/'{
    "place" : {
        "properties" : {
            "geometry": {
                "properties": {
                    "coordinates": {
                        "type": "geo_point"
                    }
                }
            }
        }
    }
}curl -XPUT http://localhost:9200/geo/place/_mapping -d @place.jsonruby shapefile2elasticsearch.rb > place_data.jsoncurl -XPUT 'http://localhost:9200/_bulk/' --data-binary @place_data.jsoncurl -XGET 'http://localhost:9200/geo/place/_search' -d '{
    "query": {
        "filtered": {
            "query": {
                "match_all": {}
            },
            "filter": {
                "geo_distance": {
                    "distance": "20km",
                    "geometry.coordinates": {
                        "lat": 32.25,
                        "lon": -97.75
                    }
                }
            }
        }
    }
}'{
    "zipcode" : {
        "properties" : {
            "geometry": {
                "properties": {
                    "coordinates": {
                        "type": "geo_point"
                    }
                }
            }
        }
    }
}curl -XPUT http://localhost:9200/geo/place/_mapping -d @zipcode.jsoncurl -XPUT 'http://localhost:9200/_bulk/' --data-binary @zipcode_data.jsoncurl -XGET 'http://localhost:9200/geo/zipcode/_search' -d '{
    "query": {
        "filtered": {
            "query": {
                "match_all": {}
            },
            "filter": {
                "geo_distance": {
                    "distance": "20km",
                    "geometry.coordinates": {
                        "lat": 32.25,
                        "lon": -97.75
                    }
                }
            }
        }
    }
}'
 
