What happens with a large TaxonomyHiddenList?

SharePoint’s Taxonomy (or “Managed Metadata”) fields are a bit strange in how they work. In a lot of ways they’re actually like a lookup field, and part of this lookup field is that site collections that use them have a hidden list – called TaxonomyHiddenList – in the root of the site collection. You can find it at /lists/TaxonomyHiddenList/.

Hidden

Each term that is used in a Taxonomy field has it’s label (actually, labels) and other details kind of ‘cached’ in this list, and there is a timer job that will push changes to the terms out into these lists – and therefore to items that refer to the entries in the list. Continue reading “What happens with a large TaxonomyHiddenList?”

What happens with a large TaxonomyHiddenList?

Column Indexing Oddities in SharePoint

I’ve come across a few issues lately with list column indices (indexes?) in SharePoint that have caused some trouble recently.

  • Multi-valued columns cannot be indexed. It doesn’t matter what type they are, they can’t be indexed. This isn’t actually so surprising when you think about it – where in the index would they be – though it might be nice if they simply appeared in it twice. To be honest, I’d known this for some time, but it did catch me out recently.
  • Lookup Columns can’t be used in ListViews set up through the UI. It seems that the SharePoint UI sets the list view up to filter using the ‘text’ of the column, which isn’t indexed – rather than using the LookupId, which is. A List View in a list definition, or set up through code, can therefore be fine…
  • The Approval Status column added by Content Approval can’t be indexed.
  • Single-valued Managed Metadata (Taxonomy) columns can be indexed – but not sorted. ORDER BY clauses won’t work (more on how to solve that in a later post). I think this is due to multi-lingual support – but it is a pain.

Yes, some of these issues are particularly acute given some of Office 365’s search limitations, and awkwardness with Content Approval.

Column Indexing Oddities in SharePoint

Create a lookup column through the object model

I read a post by Alexander Brütt about programmatically creating a Lookup column, and I thought I’d post my code from a slightly longer article a while back. It’s quite an interesting thing to do!

SPList targetList = site.Lists["My Lookup Target"];
SPField targetField = targetList.Fields["My Target Lookup Column"];
newList.Fields.AddLookup("NewLookup", targetList.ID, false);
SPFieldLookup lkp = (SPFieldLookup)newList.Fields["NewLookup"];
lkp.LookupField = targetField.InternalName;
lkp.Update();

Create a lookup column through the object model