Bauble / bauble.classic

this is how Bauble and Ghini both started
GNU General Public License v2.0
10 stars 34 forks source link

Sort infraspecifics lexically in search results #162

Closed sehrgut closed 8 years ago

sehrgut commented 9 years ago

When beginning to input a large number of Cryptanthus cultivars, I noticed that they don't show up in search results sorted by cultivar name, but rather with close similarity to their creation order. This is presumably results unsorted, and thus heavily affected by disk order.

I would expect these to sort "Betty, Ruby, Tabasco" (to consider only the first three in the attached screenshot), rather than the current "Tabasco, Betty, Ruby".

cv-sort

mfrasca commented 9 years ago

question about what is expected, imagine you have a species, to fix ideas let's say Ix co, short for Ixora coccinea, with varieties and forms. and imagine we have forms inside a variety and forms just directly under the species.

something like

I am not sure this makes sense botanically, but it is possible to represent this using Bauble.

would the above order be the most desirable one? (@RoDuth?)

mfrasca commented 9 years ago

@sehrgut , one question about the data you show. it's »genus« »cultivar«, without species, not even a generic indication »sp«?

sehrgut commented 9 years ago

I'm not sure how it is in Orchidaceae etc., but in Bromeliaceae, the convention for cv. of intraspecific hybrids is to use the cv. epithet directly, without an "sp." (since they're not necessarily cultivars of a single species). As I read the current IAPT guidelines and the ICNCP, no "sp." is necessary or appropriate for cvv. of interspecific hybrids.

IAPT Ch. 3 S. 6, "Names of organisms in cultivation": http://www.iapt-taxon.org/nomen/main.php?page=art28

As the ICNCP is not freely available, this link is my source for naming cvv. of intraspecific hybrids: https://en.wikipedia.org/wiki/International_Code_of_Nomenclature_for_Cultivated_Plants#Examples_of_names_governed_by_the_ICNCP

RoDuth commented 9 years ago

Agreed with all the above.
@sehrgut agreed, usually there is no sp. for cultivars and only put species data in when they are a known to be a cultivar of a species e.g. Aechmea gamosepala 'Luck Stripe' (there are always exceptions though!) @mfrasca The order you propose sounds about right.

mfrasca commented 8 years ago

objects in the top level of the search result are correctly sorted lexicographically: 0162-a

the error is not straight in the result, but in the objects depending from one already in the result. 0162-b

could you confirm? select species where genus.genus like Cryptanthus, the result should be in the order you need. I will inspect the sorting logic in the expanded dependent objects.