mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
76 stars 33 forks source link

area id searches via API not returning results #842

Closed kaerumy closed 9 years ago

kaerumy commented 9 years ago

No results for: http://sinar-malaysia.popit.mysociety.org/api/v0.1/search/posts?q=id:p104

Results for: http://sinar-malaysia.popit.mysociety.org/api/v0.1/search/posts?q=name:*Kelana* http://sinar-malaysia.popit.mysociety.org/api/v0.1/search/posts?q=state:Selangor http://sinar-malaysia.popit.mysociety.org/api/v0.1/search/posts?q=p104

dracos commented 9 years ago

If you want to query the area sub-object, you want http://sinar-malaysia.popit.mysociety.org/api/v0.1/search/posts?q=area.id:p104 which appears to work okay :)

dracos commented 9 years ago

The others are working because there's no name/state at top level to override, I think (might be wrong!), so you might want to use area.name and area.state for clarity.

kaerumy commented 9 years ago

Thanks for the clarification. sub area with dot works better and more accurately for us.