bookieio / Bookie

Python based delicious.com replacement
GNU Affero General Public License v3.0
633 stars 138 forks source link

/:username/bmarks/search/:terms appears to be broken #449

Closed dyladan closed 10 years ago

dyladan commented 10 years ago

https://bmark.us/api/v1/dyladan/bmarks/search/coroutines returns no bookmarks while https://bmark.us/api/v1/bmarks/search/coroutines does return bookmarks, at least one of which is username=dyladan

dyladan commented 10 years ago

ignore this it's working fine

dyladan commented 10 years ago

reopening this since i figured out what was causing my original issue.

https://bmark.us/api/v1/dyladan/bmarks/search/coroutines&with_content=true returns no results https://bmark.us/api/v1/dyladan/bmarks/search/coroutines does return results

with_content=true works fine on /bmarks/search/:terms endpoint but on the /:username/bmarks/search/:terms endpoint it appears that it thinks &with_content=true is a part of the search term and not a parameter.

here is the full json response for the non-working endpoint

{"username": "dyladan", "search_results": [], "with_content": false, "phrase": "coroutines&with_content=true", "page": 0, "result_count": 0}
dyladan commented 10 years ago

so apparently none of the params are working. they are all just a part of the search string. I found this issue and it's pretty simple fix. writing a test now

dyladan commented 10 years ago

do not merge this. I was misunderstanding the problem

dyladan commented 10 years ago

https://bmark.us/api/v1/dyladan/bmarks/search/coroutines returns 1

https://bmark.us/api/v1/dyladan/bmarks/search/coroutines?with_content=true returns 0 results

https://bmark.us/api/v1/bmarks/search/coroutines returns 5 results

https://bmark.us/api/v1/bmarks/search/coroutines?with_content=true returns 10 results

In none of these queries is the above problem where content=true was showing up in the phrase. I think that was just because i was using & instead of ?

The non-username search appears to be working as expected.

The user specific search appears to work if there are no params, but if you add with_content=true or count= params no results are returned

dyladan commented 10 years ago

this appears related to #450

mitechie commented 10 years ago

Closing as lost in history and there's something else up elsewhere.