SharePoint Search 2013: Result type Condition not fired if the Managed property has Multi type attributed selected (Product Issue)

Today I came around this Result type issue with Multi type Managed Property.

I have created one template & I wanted to show this template on particular condition. So I created the result type. The Managed property (MP) that I used, I have verified its attributes all attributes are selected and its type is Multi value. I am trying to apply the "conditions" and somehow the value not matched.

I have checked MP; it has all the values but somehow the template not called. When I removed this condition it working and when choose other MP other then Multi valued. It is working as expected.

The details implementation.  Let me explain you more with example.

  • Navigation to the schema link Under the Site Settings-> Site section click to the schema link.
  • Verify that DisplayAuthor having all the required properties selected, the most important it must be Muti value.
  • Next step would be crating the custom template. For that I need to map the drive and create the copy of one of search template. For this example I have selected item_word template.
  • Navigate to the settings menu from the page -> Design Manger.

  •  Clicked to “Upload Design Files” and click to the design manage files link. 
  •  The network location opened as mentioned in the below screen having \\address@80\sites\Search\_catalogs\masterpage\Display Templates\Search and inside the \Display Templates\Search folder
  •  The design manager file I have copied the item_world.html  and rename the copied file to SharePointForDeveloper_Item_Word.html.
  •  Edit the file and put the _#=ctx.CurrentItem.DisplayAuthor=#_ above the _#=ctx.RenderBody(ctx)=#_ and give the tile to this template SharePoint Item word. It would be easy to identify while selected the template in the drop down.

  • Save the template next step to create the result types. To navigate to the Site Settings->Site Collection Administration section-> Click to the Result type.
  • Create the new result type as mentioned below screen shot.
  • Save the result type. 
  • Navigate to search center and click to everything vertical and search for “document”. Got the result with applied with new template as created in the above steps and able to get the DispalyAuthor value in the template.
  • Now test with the multi value Managed property, for that I need to modify the result type template so same I did. As this is the multi value so the document contains with semi colon and so need to use contains keyword from the drop down. Please see the below screenshot to modified result type.
  • After applying the template, did the same navigate to the search center and use the same keyword “document” to search the results. The metadata is missing because the template not applied another issue. 

  • I come to know this is related to the multi value MP causing an issue.
  • Related to this issue I have also post the same issue on the MSDN question
PS: I have checked each option from the Query drop down like "Equals any of" and "Contains any of" not working in case of multi value attribute.


Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

STS CryptographicException Error : Key set does not exist

Query suggestions in SP 2013 Using Rest API (/_api/search/suggest)