Hot answers tagged term-store
4
Every time you use expensive operation to get data on public site, you should definitely go for caching. There is no difference between query to DB or using term store in Sharepoint.
If you feel this operation is called often (each page load) and is expensive you should cache.
There is quite a big chance that terms will not be changed very often, so you ...
2
In this case I would recommend you to add the new department names to the manage metadata store and merge the old departments with the new values. You shoul check out the following blog post http://term-management.com/2012/10/11/merging-terms-in-the-sharepoint-2010-term-store-2/
2
Unfortunately you cannot filter the managed metadata for the parent and also return child terms when creating a view.
An alternative is to turn on metadata navigation. This would give you a navigation control on the left hand side of the page to filter by fields. Clicking on a top level term here would also show all the items with sub terms.
This can be ...
2
Caching is always advisable when you are building a site with heavy traffic. In addition, you also have to think of the gradual increase in traffic over a period of time.
A while ago, I have written about the different caching options available in SharePoint 2010. See if it helps you in any way:
...
2
To set a taxonomy field you should use TaxonomyFieldValue or TaxonomiFieldValueCollection
You first need to find the term in your term store:
TaxonomyField taxonomyField = item.Fields[field] as TaxonomyField;
TaxonomyFieldValue taxValues = new TaxonomyFieldValue(taxonomyField);
TaxonomySession session = new ...
1
It depends on how you set up your managed metadata, since both ways are possible. Using enterprise keywords enables a tagging system where users can select existing keywords or create new ones. It's similar to tagging a question here, where you select existing tags or, if you have 300 reps, create new ones if they are needed.
Keywords have no hierarchy, so ...
1
Yes, that is the simplest way to do it. I have only found two ways to rename a term programmatically:
1) Set the Name property and CommitAll on the Term Store:
var site = SPContext.Current.Site;
var taxonomySession = new TaxonomySession(site);
var termStore = taxonomySession.TermStores[0];
var termGroup = termStore.Groups[0];
var ...
1
I think this will give you what you are looking for...
// get the TaxonomyField from the Site Columns in the sitecollectionTaxonomyField
field = (TaxonomyField)site.RootWeb.Fields[TAXONOMYFIELDID];
// get the Term Store ID from the field
Guid termStoreId = field.SspId;
// Open a taxonomysession and get the correct termstoreTaxonomy
Session session = new ...
1
Lukie,
I've recently written a post on how to access Term Store in SharePoint 2013 using the javascript "SP.Taxonomy.js"
Hope it helps you. http://cann0nf0dder.wordpress.com/2013/04/09/accessing-taxonomy-term-store-with-jsom/
1
JSOM or REST API = no. BUT you can use JavaScript to call the Taxonomy Web Service to effectively accomplish client-side access. It's definitely more cumbersome than using the CSOM or REST API, though, but it works.
Try this out:
http://spandps.com/tag/web-services/
The taxonomy picker with suggestions uses this web service client-side.
1
So, this is my own approach, it is iterating the site collections, but not their contents. It just checks the TaxonomyHiddenList for the terms it contains.
But if someone has a better idea, I would happily accept it :)
$usedTerms = @{}
Get-SPSite -Limit All | foreach {
$web = $_.OpenWeb()
$list = $web.Lists | where { $_.Title -eq ...
Only top voted, non community-wiki answers of a minimum length are eligible

