treflehq / trefle-api

🍀 Trefle is a botanical JSON REST API for plants species, allowing you to search and query over all the registered species, and build the next gardening apps and farming robots.
https://trefle.io
GNU Affero General Public License v3.0
485 stars 51 forks source link

Returning null common_name for all plants #22

Closed LorienOlive closed 4 years ago

LorienOlive commented 5 years ago

Describe the bug Everything was working fine, but all of a sudden all plant objects were returned with all values for "common_name" as null. I increased the page size to be sure that it wasn't just the first 25, and all 100 had no common_name. I haven't changed anything in my queries or server, so I am wondering if it's something on Trefle's end.

To Reproduce Steps to reproduce the behavior:

  1. GET "/plants"
  2. All results common_name are null

Expected behavior Expect most to have common_name values

LorienOlive commented 5 years ago

Addendum: When I run a query on "rosemary" (for example), it does return objects with common_name, but it continues to return null on all object returned from the base "api/plants" call. I increased the page_size to 1000, and still all null. I assume that's not intended, but let me know if you think I might be doing something wrong!

lambda2 commented 5 years ago

Hey @LorienOlive, a lot of plant indeed don't have a common name yet. This is mainly due because the data is still incomplete, and is hard to fill. For example, if you take the first element of the /plants endpoint, Gazania pectinata, we don't know if it really have a commmon name (https://species.wikimedia.org/wiki/Gazania_pectinata), and if it have, where to find this information.

LorienOlive commented 5 years ago

Should all 1000 plants in a single call have null for their common name?

Is there a way to filter for plants w a value in common name? I didn’t see that endpoint in the documentation.