Monday, May 11, 2015

SharePoint 2013: Make your site's search rock!

Make your site's search rock

If you are ready to get more out of SharePoint search functionality and help your content consumers find things much more easily, you have a lot of options available.  Below is a summary of a few approaches I have taken which people seem to find useful.  I plan on creating some future posts that dive into more detail.
Scope and dropdown options
First, the scope and options in the dropdown can be changed to just look at a certain library or multiple libraries.  It can even search other sites.  We can put multiple options in the dropdown to point the search at whatever you need. 
Here is an example we set up for a site collection dedicated to project sites:

The first option only returns results that are project sites.  The second option searches all content within the project sites.  The third option performs the "everything" search throughout SharePoint.
For a brief overview of the "Search this site" box and the "Find a file" search, check out this blog post: Find a file vs Search This Site
Refinement panel
After entering your query, the out of the box search will take you to a search page with refiners on the left side.  These can also be modified to allow you to narrow down the results based on categories and columns specific to the content.  So instead of Result type, Author, and Modified date, you can have refiners that use the columns in your lists or libraries.
Some custom refiners we used in this example are "Site name" and "File size".  You can specify other metadata columns from the lists and libraries as long as they are refinable managed properties to help people find the content much easier.

Search verticals
For the project site collection example, there was also a request to only search the titles of items in the sites, so we added that as an option below the search box in the results pages as "Titles only".

Best Bets/Promoted Results
You can have best bets that are just for your site.  So, if your team uses certain web applications, for example, they can appear in your search results even if they aren't inside of SharePoint.

These are just a few of the options available to tailor your search experience for your site to better meet your needs.  Thanks for reading!

Friday, May 8, 2015

SharePoint 2013: Find a File vs. Search This Site

You may have noticed that many lists and libraries have a "find a file" search box next to the list of available views.  You may also have noticed that there is a search box at the upper right corner of your site as well.  These offer different search experiences and one may work better for you than the other depending on what you are doing.  In this post, we'll explore the differences.

Find a file


Here are some important things to note about how this search box within your list or library works:
  • Scoped to the list or library – meaning it is only searching the content within that list
  • Does not use the ranking model – this means the results returned to you are all treated equally and the order of the results is the same as the view you are using in that list or library.  So, if you are looking at a list that is grouped by a category and sorted by the oldest item to newest, your search results will be returned that way too.  Depending on what you are looking for, this could be a drawback as the results that best match your search may not be at the top of your result set.
If you want to remove or add this "Find a file" search box from your list or library, click here: How-To: Add or Remove the "Find a file" search box

Search This Site  

  • Scoped to the entire site – By default, this search box looks at all content on the site with options in the dropdown menu to select Everything, People, and Conversations.
  • Uses the ranking model - The items that are most relevant (strongest matches to your search terms) will be displayed at the top of the results page.
  • Customizable – This, in my opinion, is a key feature that can make this a very powerful tool.  There are several things we can modify which will be outlined in a separate post: Make your site's search rock!
​Thanks for reading.

SharePoint 2013: How to add or remove the "Find a file" search box

​If you decide that the "Find a file" search box is not helpful for a particular list or library, you can remove it with the following steps
1. From your list or library, click on the gear icon at the upper right corner of your window
2. Click Edit Page
NOTE: The page will now be in edit mode
3. Click the down arrow in the upper right corner of the web part containing the list or library contents
4. Click Edit Web Part
5. Within the web part properties window, click to expand the Miscellaneous section and deselect the option to Display search box
6. Click the OK button
7. Click the Stop Editing or Save button in the ribbon section at the upper left of your page.
NOTE: this will only impact the search box appearing on the view you were using when you made the modification.  If you want to apply the change to the other views, click on each one and follow the same steps.
To re-enable the search box, you can follow the same steps and check the box.

SharePoint 2013: Custom search refiner for site name

I have found when people perform a search for a particular file or page, being able to refine the results by the site is pretty useful.  This can reduce the need to have to look at URL's for each of the results, which are not always easy to interpret.

The end result can look like this:


First, you need to make your site name property refinable.  


I made this change to the Search Schema in the Search Service Application (SSA) within Central Admin (CA).  


  1. From CA, click on Manage Service Applications
  2. Click Search Service Application
  3. Click Search Schema from the left nav under the "Queries and Results" section


Here are two options:

Option 1 - Modify the existing managed property to make it refinable



  1. Search the managed properties for "siteTitle"
  2. Click Edit/Map Property for the "SiteTitle" property
  3. Scroll down to the "Refinable" section and choose the option for Yes - Active
  4. Click OK.


Option 2 - Map the crawled property to another managed property that is refinable 

I chose this route, but I am not sure if there is an advantage to choosing one over the other

  1. Click Crawled Properties
  2. Search for "sitename"
  3. Hover over the property "ows_SiteName and click on Edit/Map Properties.
  4. From the "Mappings to Managed Properties" section, click on Add a Mapping.
  5. From the popup window, you can search for an existing managed property.  There are many empty refinable properties available for you to use (search "refinable").  In this case, I am choosing "refinableString08" because I do not have that mapped to anything else.
  6. Click OK in the popup window.  I have to scroll down to see the button, so it can be easy to miss.
  7. You can verify that the mapping saved by searching for the property and you will see the new managed property mapping

    NOTE: Changes to properties will take effect after the next full crawl.



Now that your property is refinable, you can add the refiner to your search results page(s)


  1. From your search results page, click the gear, then edit page
  2. Click the options arrow for your Refinement web part and click Edit Web Part.
  3. From the edit pane, click Choose Refiners
  4. Click on the managed property name for your refiner (SiteTitle if you made the default property refinable, or whatever managed property you used if you mapped the crawled property to an available refinable managed property)
  5. Click Add
  6. Enter text for the "Display Name". This is what will appear above this group of options in the refinement panel. It could be something like "Site", "Site name", or "On this site".
  7. Click OK.
  8. Click OK in the web part editing pane.
  9. Save the page, check it in and publish.


Run a test query and you should now be able to see the new refinement option in your results page.


If you want to add the search result counts to your refinement panel, see the instructions provided by Steve Mann 

Thursday, May 7, 2015

SharePoint 2013: Unable to create or modify a list item. "Server was unable to save the form at this time" error

Brief Description:

A client recently reported an error message was being received when they were attempting to create a new list item or modify an existing list item.


Error Message:

"The server was unable to save the form at this time.  Please try again."



Additional Details:

The issue was reported as an entire team having the issue and it appeared to be contained to a single list.  They had previously been able to add or change items in this list.  The team reported that after they relocated to a new physical area, they were unable to modify the list.  This turned out to be a red herring.  I was thinking it might be something with the browser on their new machines, but that wasn't the case.


Troubleshooting:


  • Confirmed this was not occurring on other sites or other lists.
  • I was able to create new test items on the list and modify items on the list successfully.
  • Confirmed the team could create new test items (with just test info).
  • Copied the list to our test environment using Sharegate and attempted to create the exact same record that was causing the issue for that team.  I put in the exact same data and I was able to recreate it.


They were typing in much of the info into the list, but there was one multi-line text field where they were pasting information in from their ticketing system.  This seemed to be the only difference between creating the test records that were successful and the unsuccessful records.  I did try pasting in data from that system in testing, but I just grabbed something from the ticket, and I didn't receive the error.  It wasn't until I used the exact few lines that they were using that it was re-creatable.

In looking closer at what was being pasted in, it appeared to be just text.  I changed the column type to plain text (from rich text), but this did not help.  I noticed some unusual arrow characters in the text. But when I had pasted into SharePoint, they did not appear.  I removed those characters prior to copying when I pasted it in, everything saved correctly!

It appears that those may have been some hidden control characters... if anyone knows for sure, please let me know.




Other related info:

During my research on this error, I found several other people had been experiencing it, but on a much larger scale and they had resolved those cases with and some of these approaches: IIS reset, removal of browser add-ons, restart the SharePoint Search Hosting Controller service.  If you are experiencing this issue and it doesn't appear to be caused by unusual characters being pasted into the list, you may find some answers in this article: Technet: The server was unable to save the form at this time. Please try again.