Sharepoint 2010 Taxonomy not filtered correctly

I have a strange situation with taxonomy filtering in Sharepoint 2010, but I can replicate it on all 3 servers.

Here's what the script looks like:

  • You have a fully populated Set term with many child nodes (about 4500).
  • Add 1 user list in which two fields (the name and the field of managed metadata, these are links to termSet) - all this is done using the graphical interface.
  • Add a list item (or pair) manually and select a term to fill in the metadata field (the depth in the tree structure is about 4 nodes)
  • Check filtering in a list based on this term - works like a charm.

Now at this point I started my import task, which adds items to another list. This 2nd list also has a managed metadata field pointing to the term Set.

  • Add 1000 items, no problem. Works like a charm
  • add another 1000, no problem.
  • somewhere around 2000 and 4500 items something went wrong, because after the launch is finished, I am now left in the following scenario:

Filtering list 1 does not work. The 2-filter list is definitely not working.

Exactly what is happening. I choose a top-level term, and it should include all the subitems. He did this fine before mass inserting list items that use terms in terms. After insertion, when I select a top-level term, I get an empty set and do not include descendants.

I am exploring this hidden list that has a lot to do with filtering, as I noticed. Filtering first checks this (not yet exactly how / why).

Has anyone else had this problem? The only source of documentation on this subject is Microsoft Sharepoint Evangelical Blogs (Marketing), without a detailed explanation of why this does not work.

Please, help.

+4
source share
1 answer

Rule number 1: when working with Sharepoint, never trust him to work.

if (fRecursive && (numArray.Length > 300)) { int[] numArray2 = numArray; object[] data = new object[] { termSetId.ToString(), termId.ToString(), numArray2.Length.ToString(CultureInfo.InvariantCulture) }; ULS.SendTraceTag(0x66367766, ULSCat.msoulscat_DLC_DM, ULSTraceLevel.Medium, "Disable recursive term clause: Too many descendent IDs for term. Termset[{0}]Term[{1}] Descendent ID count[{2}]", data); numArray = TaxonomyField.GetWssIdsOfTerm(SPContext.Current.Site, termStoreId, termSetId, termId, false, 500); MetadataNavigationContext current = MetadataNavigationContext.Current; if (current != null) { current.ForceTreeDescendentsOff(); } } (numArray.Length > 300) 

Reflected from Sharepoint.Taxonomy, pay attention to current.ForceTreeDescendentsOff ();

So, if you have a situation where you may need to return more than 300 entries from the taxonomy filter, it seems like you can’t do this. Pretty good for a corporate solution.

+5
source

Source: https://habr.com/ru/post/1339252/


All Articles