legacy-api-documentation icon indicating copy to clipboard operation
legacy-api-documentation copied to clipboard

Search sometimes returns images with wrong license

Open michael-apptornado opened this issue 9 years ago • 4 comments

Searches can be restricted to certain license types (see https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_search.md, parameter license_type). We use that feature to restrict our searches to only return CC-licensed images. While this generally seems to work fine, we once in a while see searches that incorrectly return images with license type 0 (Standard 500px License) in the results.

michael-apptornado avatar Sep 16 '16 07:09 michael-apptornado

Any news on that? Our logs indicate that things have gotten significantly worse since the beginning of December (a first increase on December 7, and a second - even bigger - increase on December 17). Significantly worse means that we now have to filter about 100x more wrongly licensed images from 500px-api search results than we did in November (for about the same amount of searches).

Unfortunately, I cannot send you a sample query for which this happens, because the problem is not (or only partly) query dependent. I.e. the same query sometimes suffers from the problem, and sometimes (most often) works just fine.

Note: For our queries we use https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_search.md and set parameters term, exclude=Nude, image_size[], and (obviously) license_type. Some query terms for which we have observed this problem were: "drops", "green", "birthday". But again, you most likely won't be able to reproduce the problem with these queries (unless you repeatedly try them over a long time period), as the problem doesn't really seem to be query dependent.

michael-apptornado avatar Dec 20 '16 14:12 michael-apptornado

@michael-apptornado We tried a couple of times, but unfortunately couldn't reproduce the issues by constructing the search queries with your parameters. All results we got were properly filtered.

Are you able to extract one recent query from past logs that have the issue? The information we need will be the query string, e.g., term=drops&license_type=1%2C2%2C3%2C5%2C8&exclude=nude and the timestamp of the query? That way maybe we can correlate with our backend logs and find out.

junjizhi avatar Feb 08 '17 20:02 junjizhi

Things have gotten much better again shortly after reporting this, so I assumed you fixed something.

Nevertheless, we still once in a while see this problem. Our query looks as follows: https://api.500px.com/v1/photos/search?consumer_key=<key>&rpp=100&license_type=4%2C6%2C8%2C7&image_size%5B%5D=4&image_size%5B%5D=30&image_size%5B%5D=2048&term=<query>&exclude=Nude&page=<page>

Some recent example queries (<query>) that included incorrectly licensed images were:

  • indios at (around) Thu, 09 Feb 2017 04:00:21 GMT (sample images: http://500px.com/photo/130152639, http://500px.com/photo/180892283, http://500px.com/photo/188882505)
  • boca at (around) Thu, 09 Feb 2017 00:00:16 GMT (sample images: http://500px.com/photo/129888281, http://500px.com/photo/134566083, http://500px.com/photo/152014361)
  • beach at (around) Wed, 08 Feb 2017 22:43:18 GMT and Wed, 08 Feb 2017 22:35:10 GMT
  • animals at (around) Wed, 08 Feb 2017 22:34:35 GMT and Wed, 08 Feb 2017 22:31:50 GMT

I hope this information helps to track down the problem.

michael-apptornado avatar Feb 09 '17 09:02 michael-apptornado

We did find the indios query in our logs. However, repeating the same query a few times didn't get those incorrect images you mentioned above. Like you said the problem seemed to be sporadic and query independent.

junjizhi avatar Feb 09 '17 15:02 junjizhi