Below you will find pages that utilize the taxonomy term “search”
Posts
How to use ExternalItem.ReadWrite.Ownedby
When working with M365 Search, it’s great to follow the principle of least privilege. The ExternalItem.ReadWrite.OwnedBy gives you a way to restrict an application to a single connection.
The problem is that the documentation (mslearn and graph permissions) does not shed any light on how to use this permission. In our project we were about to give up and grant the bolder ExternalItem.ReadWrite.All and then we tried a few things and found a way.
Posts
Add Search Verticals by code
Adding own search verticals is a common task in the Search Configuration in SharePoint. Here I want to share a code sample for achieving this programmatically. I hope, this model can be added to SPMeta2. First of all, Search Verticals are dedicated Search Results Pages and links to them. How to add them manually is described on technet:
How to add a custom search vertical to your search results page in SharePoint 2013 There is no API in CSOM for that.
Posts
Resetting SharePoint Search Configuration Cache
Now it is the second time it happens that the search cannot return any results. This hickup is rare but it happens. To solve it I had to follow these steps:
Stop the Timer Service Clear the configuration cache Find in \ProgramData\Microsoft\SharePoint\Config the folder where the file cache.ini exists Delete every file from this folder EXCEPT cache.ini Open cache.ini, delete the content and put ’1′ (without the quotes) in it and save the file Restart the Timer Service Index reset Full crawl Source: ITIDea.
Posts
Create your own search box
It is very simple. Create a new module: SearchArea. Delete Sample.txt and Elements.xml. Create a new file: SearchArea.xml
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Control Id="ContosoSearchAreaBox" Sequence="15" ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> <Property Name="GoImageUrl">/\_layouts/images/Contoso/searchbutton.png</Property> <Property Name="GoImageUrlRTL">/\_layouts/images/Contoso/searchbutton.png</Property> <Property Name="GoImageActiveUrl">/\_layouts/images/Contoso/searchbutton.png</Property> <Property Name="GoImageActiveUrlRTL">/\_layouts/images/Contoso/searchbutton.png</Property> <Property Name="DropDownMode">HideDD\_useDefaultScope</Property> <Property Name="FrameType">None</Property> <Property Name="UseSiteDefaults">false</Property> </Control> </Elements> Next add your searcharea module to a site scoped feature.
In the masterpage locate this:
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4" /> and replace with your brand new search area: