Keywords Size Limit

Hello,

I’m running typo on a postgres database for a choir website
(http://amicichamberchoir.org.uk/ if you’re interested) and I try to put
the name of the composers of each piece sung in each concert in the tags
of the entry. This is fine, until I hit 254 characters which I have
done, for example in the latest entry.

This causes a problem because in the contents table the kewords column
is set to: character varying(255). Some questions:

  1. Would it be possible to increase the size of this column so a larger
    string can be put in that column in a future release?

  2. Will it cause problems for future upgrades if I change the size of
    this column now?

  3. There’s got to be a better way of referencing tags to articles rather
    than parsing a long string. Are there plans to improve this in the
    future? I’m thinking in terms of having a table that consists of
    contents_id, tag_id tuples. Am I wrong in thinking that that would be
    better? I imagine it isn’t an easy change though.

Thanks!

Hello Toby,

On 04/20/2010 10:57 AM, Toby Bryans wrote:

I’m running typo on a postgres database for a choir website
(http://amicichamberchoir.org.uk/ if you’re interested) and I try to put
the name of the composers of each piece sung in each concert in the tags
of the entry. This is fine, until I hit 254 characters which I have
done, for example in the latest entry.

Well, that’s an unexpected use of tags! :slight_smile:

This causes a problem because in the contents table the kewords column
is set to: character varying(255). Some questions:

  1. Would it be possible to increase the size of this column so a larger
    string can be put in that column in a future release?

Certainly.

  1. Will it cause problems for future upgrades if I change the size of
    this column now?

Probably not, but do make extra sure you make a backup of the database
before
upgrading.

  1. There’s got to be a better way of referencing tags to articles rather
    than parsing a long string. Are there plans to improve this in the
    future? I’m thinking in terms of having a table that consists of
    contents_id, tag_id tuples. Am I wrong in thinking that that would be
    better? I imagine it isn’t an easy change though.

I just took a look, and in fact, both methods are used at the same time:
the
tags are stored in the keywords column, and then copied into a structure
like
the one you propose. I admit this is rather odd, although there is a
sort-of-good technical reason why this is so: Other types of contents
store
their keywords only in the keywords column.

Given that tags are already stored in a separate table, it shouldn’t be
too big
of a change to lift the 255-character limit. I will file a bug in Typo’s
bug
tracking system for this.

By the way, you can have tags with spaces in them by surrounding them
with
single or double quotes. That way, you don’t need to use periods.

Regards,

Hello Matijs,

Thank you for your reply!

On Tue, Apr 20, 2010 at 08:58:29PM +0200, Matijs van Zuijlen wrote:

On 04/20/2010 10:57 AM, Toby Bryans wrote:

I’m running typo on a postgres database for a choir website
(http://amicichamberchoir.org.uk/ if you’re interested) and I try to
put the name of the composers of each piece sung in each concert in
the tags of the entry. This is fine, until I hit 254 characters
which I have done, for example in the latest entry.

Well, that’s an unexpected use of tags! :slight_smile:

It makes for an interesting tag cloud of which composers the choir sings
most as well as the venues that they sing at. I’m pretty sure it also
drives search queries to the site as well. Since I moved to this way of
managing the site we certainly get more hits via search engines due to
people searching for composers.

  1. Would it be possible to increase the size of this column so a
    larger string can be put in that column in a future release?

Certainly.

Great!

  1. Will it cause problems for future upgrades if I change the size
    of this column now?

Probably not, but do make extra sure you make a backup of the database
before upgrading.

Always :).

Oh, for what it’s worth, I had to comment out the backup stage in the
rails installer for another one of my blogs as it used all the memory up
on my virtual server :). That blog has a LOT of content and the rails
backup seems to grab all the data from the database into memory and then
dump it to a yaml file. Given I do a manual sql backup anyway before
every upgrade losing the backup stage isn’t a major issue.

Other types of contents store their keywords only in the keywords
column.

Ah ha. I see! It must make the tag management more difficult though,
especially deleting tags from articles!

Given that tags are already stored in a separate table, it shouldn’t
be too big of a change to lift the 255-character limit. I will file a
bug in Typo’s bug tracking system for this.

Great, thank you.

By the way, you can have tags with spaces in them by surrounding them
with single or double quotes. That way, you don’t need to use periods.

Good to know…

Kind regards,