Yelp / yelp-fusion

Yelp Fusion API
https://yelp.com/developers
MIT License
403 stars 394 forks source link

return wrong results when using lodging as term #28

Closed swizardlv closed 10 months ago

swizardlv commented 8 years ago

my query url is

https://api.yelp.com/v3/businesses/search?sort=0&limit=3&latitude=38.783139&longitude=-77.015559&radius=500&term=Lodging and get response as below.

Obviously , the second and third are not correct.

{
    "businesses": [{
        "image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/UcBF9KvCRX5frqSQFuzjGg/o.jpg",
        "review_count": 564,
        "coordinates": {
            "longitude": -77.017536,
            "latitude": 38.7830896
        },
        "id": "gaylord-national-national-harbor",
        "categories": [{
            "alias": "hotels",
            "title": "Hotels"
        }],
        "name": "Gaylord National",
        "url": "https://www.yelp.com/biz/gaylord-national-national-harbor",
        "price": "$$$",
        "phone": "+13019654000",
        "location": {
            "country": "US",
            "address2": "",
            "address1": "201 Waterfront St",
            "city": "National Harbor",
            "state": "MD",
            "address3": "",
            "zip_code": "20745"
        },
        "rating": 3
    }, {
        "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/Bmi2ZVEX2IhWYih9NSAyeg/o.jpg",
        "review_count": 54,
        "coordinates": {
            "longitude": -77.0160453362594,
            "latitude": 38.7853385796624
        },
        "id": "the-tasting-room-wine-bar-and-shop-oxon-hill",
        "categories": [{
            "alias": "wine_bars",
            "title": "Wine Bars"
        }],
        "name": "The Tasting Room Wine Bar & Shop",
        "url": "https://www.yelp.com/biz/the-tasting-room-wine-bar-and-shop-oxon-hill",
        "price": "$$",
        "phone": "+13016860465",
        "location": {
            "country": "US",
            "address2": "137 Waterfront St",
            "address1": "National Harbor",
            "city": "Oxon Hill",
            "state": "MD",
            "address3": "",
            "zip_code": "20745"
        },
        "rating": 3.5
    }, {
        "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/tRkWFgh1BUnuCT6CJdxNJA/o.jpg",
        "review_count": 402,
        "coordinates": {
            "longitude": -77.0170307,
            "latitude": 38.7845666
        },
        "id": "redstone-american-grill-national-harbor",
        "categories": [{
            "alias": "tradamerican",
            "title": "American (Traditional)"
        }],
        "name": "Redstone American Grill",
        "url": "https://www.yelp.com/biz/redstone-american-grill-national-harbor",
        "price": "$$",
        "phone": "+13018393330",
        "location": {
            "country": "US",
            "address2": "",
            "address1": "155 National Plz",
            "city": "National Harbor",
            "state": "MD",
            "address3": "",
            "zip_code": "20745"
        },
        "rating": 3
    }],
    "total": 18
}
tomelm commented 8 years ago

I'll check this out. It does seem odd but I wonder if we're somehow picking up on other signals from those businesses

swizardlv commented 8 years ago

@tomelm thanks

tomelm commented 8 years ago

@swizardlv could you query with a category filter here? That should be more accurate for strictly finding hotels. Term is going to pull in a number of other signals that will make it potentially return less-than-ideal results

swizardlv commented 8 years ago

hi @tomelm , i am from this project, https://www.yelp.com/developers/v3/showcase#olli

we want to using natural language to searching yelp. seems not possible to get category .

we want to show the feature on World of Watson. Could you please help us to fix this before that?

Thanks.

swizardlv commented 8 years ago

also find issue when using atm as term.

mittonk commented 8 years ago

75 is related, and shows a more obvious difference from www.yelp.com search.