Forum Discussion
Erik Wettergren
Feb 02, 2019Iron Contributor
Highly Confused by Highlighted Content
I'm trying to set up a highlighted webpart (HCWP) to pull content from acrsoss all our sites filtered by value of a specific managed metadata termset.
However, when applying the managed property filter in HCWP I cannot find that specific termset (I called it SAMKnowledgeBase) but instead a weirdly named owstaxldSAMKnowledgeBase - what's that all about?
Secondly, if I set the value of this property to "Equals" I get zero results even though several documents have exactly this term assigned. If instead, I set it to "Contains" it will pull the correct docs - but this certainly limits the usage of the filter a lot.
Thirdly, the display name of each document seem rather random, sometimes it uses the name, sometimes the title and sometimes something else. I read this blog post which clarified some https://joannecklein.com/2017/02/12/demystifying-titles-in-sharepoint-search-delve/
but I still am confused because when trying to edit the "title managed property" as suggested I cannot seem to find filename as a property to include and the default order in this list doesn't seem to reflect in what is actually dispalyed in the webpart.
lastly, the image displayed for some of the documents are a complete mystery. In some cases the image does not even exist in the document itself! How can you control what image to display for each document in the HCWP?
- Martin GreenCopper Contributor
You're confusing managed properties with managed metadata.
Managed properties are part of search and are created automatically for site columns:
The highlighted content webpart is the modern equivalent of the content search webpart.
Your equals clause doesn't work because the managed property you've chosen includes the GUID for the selected term in addition to the text value. If you have created the column as a site column (and allowed time for it to index), you'll have another managed property which contains only the text value. Use that instead.
To answer a few of your questions: the reason you see owstaxid is that behind the scenes, your metadata is coming from the managed metadata (taxonomy) service. All managed metadata attributes are preceded by owstaxid. As I understand it, the value of your attribute also has some hidden characters as well, which is why Equals will never work unless you know exactly what they are. Therefore, you are correct that in your filter, you need to use Contains. I'm not quite sure I understand your third issue, but I typically use Filename as the sort value. You can select it by looking for a managed property and then using "name" as the filter criteria. You can also use Title - and Joanne's post explains how that filter translates to "SharePoint speak." I can't help you with the image selected for documents. You can control the image for Pages, but I haven't yet seen an image that isn't even in the document - so that's a new one for me!
- Erik WettergrenIron Contributor
SusanHanleydo you think you could clarify how you use 'Filename' as the sort value? I'am able to find the managed property Filename, but how do I make the webpart use it?
Here's an image that shows how I'm using the Filename to sort in Highlighted Content. Does this help?
- Erik WettergrenIron Contributor
Thanks Susan! I can live with the prefix for the Managed Metadata attributes but its nice to understand what it means.
Regarding the value of the attribute I use for filtering, I'm pretty sure it doesn't have any hidden characters (it's just a three letter acronyme in this case) but I'll check it out - it would explain the behaviour.
Regarding the displayed title issue, I expected to find a filename as sortvalue but if I search for "name" I get all sorts of varietys suggested, like "EntityName" "owsCultureName" and "owsBaseName" but no "FileName" (not on the next page either).
The image issue is the most confusing. The picture that is pulled out is definitely made by someone in my org. Could possibly have been included in an earlier version of this document but it is deleted longa ago (even befor the file was uploaded to SharPoint in the first place) I've searched for it meerely to understand what's going on but I cannot find it anywhare in this document. So confusing!
- Richard RodgersBrass Contributor
I've seen a similar problem with the image - I was convinced that it wasn't in the document.
However, it was in the document - it had been shrunk down very small behind another image in the document - I only found it by deleting each image in turn to see what was behind each.