You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EOL for example does this with a heirachy control (http://eol.org/pages/38266/overview); however a poor man's version of this might be to simply search for crops with a bionomial name contained entirely in the current crops' binomial name.
in psuedocode, something like:
def find_parent_crops(binomial_name)
return if binomial_name.empty?
search_criteria = binomial_name.split(' ')[0...-1].join(' ')
parent_crop_candidates = Crops.where(name: search_criteria)
return find_parent_crops(search_criteria) unless parent_crop_candidates.any?
end
Most commonly, it's going to end up being no more than 2-3 queries, unless there is anything horrible like 'foo var bar x bar var foo'.
Alternatively, giving shorter binomial name crops or crops with photos a higher ranking in search results may help in situations like this:
The text was updated successfully, but these errors were encountered:
CloCkWeRX
changed the title
Make it easier to find a growing guide for a 'parent' crop
Make it easier to find a growing guide for a 'parent' or related crop
Oct 5, 2016
Not sure if I've really captured the essence of this properly; basically if you search for 'pumpkin' you get no guides; but 'cucurbita pepo' (named squash in this instance) actually has a guide.
Yeah, figuring out that search is definitely a necessary thing to do.
One thing to note is that the Crop model has a knowledge of "varieties" and "parent". I don't think any of that data is filled in at the moment, but it's probably relevant. Going through the most popular crops and linking those is probably a necessary todo task as well. There is no interface for this at the moment except for the admin panel.
All of these:
https://openfarm.cc/en/en/crop_search?q=Cucurbita+pepo
can probably be grown following the general directions tied to https://openfarm.cc/en/crops/pumpkin (Cucurbita).
EOL for example does this with a heirachy control (http://eol.org/pages/38266/overview); however a poor man's version of this might be to simply search for crops with a bionomial name contained entirely in the current crops' binomial name.
in psuedocode, something like:
Most commonly, it's going to end up being no more than 2-3 queries, unless there is anything horrible like 'foo var bar x bar var foo'.
Alternatively, giving shorter binomial name crops or crops with photos a higher ranking in search results may help in situations like this:
The text was updated successfully, but these errors were encountered: