HashtagSell / posting-api

API for storage and retrieval of posting details for Hashtagsell
0 stars 0 forks source link

GET 50 most recent posts in a city or state. #72

Closed that1guy closed 8 years ago

that1guy commented 9 years ago
Query
https://staging-posting-api.hashtagsell.com/v1/postings/?start=0&count=50&filters[mandatory][exact][external.threeTaps.location.state]=USA-CA

Hi josh, this query intermittently returns no results, then it may return 5 results, and other times more results. Either way it seems to never return 50 results as requested in the count property.

Also, it seems I don't need to supply a sort to get most recent items. They are already returned by neweset to oldest?

brozeph commented 8 years ago

To solve this, I reworked the Elasticsearch index a bit and added location details. 3taps location information is now mapped directly to the posting.location sub-document.

The updated query should now look like the following: https://staging-posting-api.hashtagsell.com/v1/postings/?start=0&count=50&filters[mandatory][exact][location.state]=USA-CA

brozeph commented 8 years ago

Assigning back to @that1guy to verify and make adjustments in the hts-app. :smile_cat:

that1guy commented 8 years ago

boom! Looking good! Closing. :)