[ckan-dev] MIN_TAG_LENGTH

Stefan Oderbolz stefan.oderbolz at liip.ch
Fri Oct 30 13:29:20 UTC 2015


Hi Harald,

What is the reason that not MIN_TAG_LENGTH = 1?
>

I don't know why this exists, my guess is that it has to do with the Solr
search, as all the tags are indexed and could create wrong search results.
Why not use something like chemical-formula-c?
Please consider the use case that someone else wants to harvest your data,
they might have to change this MIN_TAG_LENGTH. And depending on the context
"c" could mean different things.



> What is the proper way to override this constant?
>

You could monkey-patch it, but I would advice against it.


> Related: Why can't tags contain non-aphanumeric characters other than
> [_-.]? ( "Si(OH)4" would be nice.)
>

This is mainly because the tag is used as a URL slug. Nowadays there is not
strictly a limitation to alphanummeric characters in URLs, but it's still
better not to use them I guess. But you could use a tag vocabulary and
change the display_name of the tag.

- Stefan

-- 
Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151030/8d6272b0/attachment-0003.html>


More information about the ckan-dev mailing list