How to add Managed Properties to search results in Non-Publishing Sites in SharePoint

Copper Contributor

We are building a large information reference in SP Online. We do not want to enable Publishing infrastructure so we can then make Site Templates of our Customized Site.

Is it possible to return Managed Properties from the search index when you are using the Item_Default.js Search Template? With the Default_Group.js

There seems to be little or no information on the web on how to do this.

AS it is, The only thigs returning in our search results we part are Title and Path.

I want to insert some Managed Properities into the search results. Can this be done?

1 Reply

@James Golding wrote:

We are building a large information reference in SP Online. We do not want to enable Publishing infrastructure so we can then make Site Templates of our Customized Site.

Is it possible to return Managed Properties from the search index when you are using the Item_Default.js Search Template? With the Default_Group.js

There seems to be little or no information on the web on how to do this.

AS it is, The only thigs returning in our search results we part are Title and Path.

I want to insert some Managed Properities into the search results. Can this be done?


Yes, it's doable. Not with the default item one, but you can create customdisplay templates and result sources and make it work. Take a look at https://github.com/SPCSR/DisplayTemplates/tree/master/Search%20Display%20Templates/JavaScript%20Star... which has links to @Elio Struyf's blog posts around .js only templates.

 

You can also use a site with pub enables, upload your .html template, and download the .js one for use in the non-pub site. It's all about registering it correct. Let me know if this helps.