add geo integration tests
This commit is contained in:
parent
6507e31787
commit
7f89ff9493
|
@ -0,0 +1 @@
|
|||
{"name":"Brewpub-on-the-Green","city":"Fremont","state":"California","code":"","country":"United States","phone":"","website":"","type":"brewery","updated":"2010-07-22 20:00:20","description":"","address":[],"geo":{"accuracy":"APPROXIMATE","lat":37.5483,"lon":-121.989}}
|
|
@ -0,0 +1 @@
|
|||
{"name":"Capital City Brewing Company","city":"Washington","state":"District of Columbia","code":"20005","country":"United States","phone":"202.628.2222","website":"http://www.capcitybrew.com","type":"brewery","updated":"2010-07-22 20:00:20","description":"Washington DC's first brewpub since prohibition, Capitol City Brewing Co. opened its doors in 1992. Our first location still stands in Downtown DC, at 11th and H St., NW. Our company policy is to bring the fine craft of brewing to every person who lives and visits our region, as well as treating them to a wonderful meal and a great experience.","address":["1100 New York Ave, NW"],"geo":{"accuracy":"ROOFTOP","lat":38.8999,"lon":-77.0272}}
|
|
@ -0,0 +1 @@
|
|||
{"name":"Firehouse Grill & Brewery","city":"Sunnyvale","state":"California","code":"94086","country":"United States","phone":"1-408-773-9500","website":"","type":"brewery","updated":"2010-07-22 20:00:20","description":"","address":["111 South Murphy Avenue"],"geo":{"accuracy":"RANGE_INTERPOLATED","lat":37.3775,"lon":-122.03}}
|
|
@ -0,0 +1 @@
|
|||
{"name":"Hook & Ladder Brewing Company","city":"Silver Spring","state":"Maryland","code":"20910","country":"United States","phone":"301.565.4522","website":"http://www.hookandladderbeer.com","type":"brewery","updated":"2010-07-22 20:00:20","description":"At Hook & Ladder Brewing we believe in great beer in the company of good friends, so we bring you three great beers for your drinking pleasure (please drink responsibly). Each of our beers is carefully crafted with the finest quality ingredients for a distinctive taste we know you will enjoy. Try one tonight, you just might get hooked. Through our own experiences in the fire and rescue service we have chosen the Hook & Ladder as a symbol of pride and honor to pay tribute to the brave men and women who serve and protect our communities.","address":["8113 Fenton St."],"geo":{"accuracy":"ROOFTOP","lat":38.9911,"lon":-77.0237}}
|
|
@ -0,0 +1 @@
|
|||
{"name":"Jack's Brewing","city":"Fremont","state":"California","code":"94538","country":"United States","phone":"1-510-796-2036","website":"","type":"brewery","updated":"2010-07-22 20:00:20","description":"","address":["39176 Argonaut Way"],"geo":{"accuracy":"ROOFTOP","lat":37.5441,"lon":-121.988}}
|
|
@ -0,0 +1 @@
|
|||
{"name":"Sweet Water Tavern and Brewery","city":"Sterling","state":"Virginia","code":"20121","country":"United States","phone":"(703) 449-1108","website":"http://www.greatamericanrestaurants.com/sweetMainSter/index.htm","type":"brewery","updated":"2010-07-22 20:00:20","description":"","address":["45980 Waterview Plaza"],"geo":{"accuracy":"RANGE_INTERPOLATED","lat":39.0324,"lon":-77.4097}}
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"types": {
|
||||
"brewery": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"fields": [
|
||||
{
|
||||
"include_term_vectors": true,
|
||||
"include_in_all": true,
|
||||
"index": true,
|
||||
"store": true,
|
||||
"analyzer": "keyword",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"dynamic": true,
|
||||
"enabled": true
|
||||
},
|
||||
"geo": {
|
||||
"fields": [
|
||||
{
|
||||
"include_term_vectors": true,
|
||||
"include_in_all": true,
|
||||
"index": true,
|
||||
"store": true,
|
||||
"type": "geopoint"
|
||||
}
|
||||
],
|
||||
"dynamic": true,
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"default_type": "brewery"
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
[
|
||||
{
|
||||
"comment": "breweries near the couchbase office",
|
||||
"search": {
|
||||
"from": 0,
|
||||
"size": 10,
|
||||
"query": {
|
||||
"location": {
|
||||
"lon": -122.107799,
|
||||
"lat": 37.399285
|
||||
},
|
||||
"distance": "100mi",
|
||||
"field":"geo"
|
||||
},
|
||||
"sort": [
|
||||
{
|
||||
"by": "geo_distance",
|
||||
"field": "geo",
|
||||
"unit": "mi",
|
||||
"location":{
|
||||
"lon":-122.107799,
|
||||
"lat":37.399285
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"total_hits": 3,
|
||||
"hits": [
|
||||
{
|
||||
"id": "firehouse_grill_brewery"
|
||||
},
|
||||
{
|
||||
"id": "jack_s_brewing"
|
||||
},
|
||||
{
|
||||
"id": "brewpub_on_the_green"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "breweries near the whitehouse",
|
||||
"search": {
|
||||
"from": 0,
|
||||
"size": 10,
|
||||
"query": {
|
||||
"location": {
|
||||
"lon": -77.0365,
|
||||
"lat": 38.8977
|
||||
},
|
||||
"distance": "100mi",
|
||||
"field":"geo"
|
||||
},
|
||||
"sort": [
|
||||
{
|
||||
"by": "geo_distance",
|
||||
"field": "geo",
|
||||
"unit": "mi",
|
||||
"location":{
|
||||
"lon":-77.0365,
|
||||
"lat":38.8977
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"total_hits": 3,
|
||||
"hits": [
|
||||
{
|
||||
"id": "capital_city_brewing_company"
|
||||
},
|
||||
{
|
||||
"id": "hook_ladder_brewing_company"
|
||||
},
|
||||
{
|
||||
"id": "sweet_water_tavern_and_brewery"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "bounding box of USA",
|
||||
"search": {
|
||||
"from": 0,
|
||||
"size": 10,
|
||||
"query":{
|
||||
"top_left":{
|
||||
"lon":-125.0011,
|
||||
"lat":49.5904
|
||||
},
|
||||
"bottom_right":{
|
||||
"lon":-66.9326,
|
||||
"lat":24.9493
|
||||
},
|
||||
"field":"geo"
|
||||
},
|
||||
"sort": ["name"]
|
||||
},
|
||||
"result": {
|
||||
"total_hits": 6,
|
||||
"hits": [
|
||||
{
|
||||
"id": "brewpub_on_the_green"
|
||||
},
|
||||
{
|
||||
"id": "capital_city_brewing_company"
|
||||
},
|
||||
{
|
||||
"id": "firehouse_grill_brewery"
|
||||
},
|
||||
{
|
||||
"id": "hook_ladder_brewing_company"
|
||||
},
|
||||
{
|
||||
"id": "jack_s_brewing"
|
||||
},
|
||||
{
|
||||
"id": "sweet_water_tavern_and_brewery"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "bounding box around DC area",
|
||||
"search": {
|
||||
"from": 0,
|
||||
"size": 10,
|
||||
"query":{
|
||||
"top_left":{
|
||||
"lon":-78,
|
||||
"lat":39.5
|
||||
},
|
||||
"bottom_right":{
|
||||
"lon":-76,
|
||||
"lat":38.5
|
||||
},
|
||||
"field":"geo"
|
||||
},
|
||||
"sort": ["name"]
|
||||
},
|
||||
"result": {
|
||||
"total_hits": 3,
|
||||
"hits": [
|
||||
{
|
||||
"id": "capital_city_brewing_company"
|
||||
},
|
||||
{
|
||||
"id": "hook_ladder_brewing_company"
|
||||
},
|
||||
{
|
||||
"id": "sweet_water_tavern_and_brewery"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue