0

I have set a crawl on some file shares on my file server. This works perfectly and even crawls the content of the files. When I search a specific file the search return my answer perfectly. However when i try to open the file nothing happens. I have to copy the link from the file server SPSearch return and paste it in windows explorer. I finds this a very wrong way to open the document you just found. Is there a way to download or open the file from the search results?

I am using SharePoint server 2013 so I don't have a XSLT file.

Edit : I can open files in Internet Explorer but it doesn't seem to work in Firefox or Chrome. Anybody know what option I have to enable in order that files will open in Chrome and Firefox aswell?

2

This tutorial is about how to customize search results.

There are three topics:

  1. Customization to highlight search keyword
  2. Customization to open Search result items in new window
  3. Customize People Search result

I think you can find what you are looking for in topic No. 2 or at least an idea on how to do it. For instance, you can edit the links - lines that create item url for Icon, Title and URL of search result.

EDIT:

Taken from the site, Topic No. 2:

  1. Go to SharePoint site
  2. Perform a search on site
  3. Search result page will open.
  4. On this page go to Edit page option.
  5. On search core results webpart click on edit webpart option
  6. In webpart properties, Click on the XSL Editor Button
  7. Take backup of XSLT file before modification.
  8. Now copy XSLT and open it in text pad

Search for the lines:

<span class=”srch-Icon”>
<a href=”{$url}” id=”{concat(‘CSR_IMG_’,$id)}” title=”{$url}”>
<span class=”srch-Title”>
<a href=”{$url}” id=”{concat(‘CSR_’,$id)}” title=”{$url}”>
<span class=”srch-URL”>
<a href=”{$url}” id=”{concat(‘CSR_U_’,$id)}” title=”{$url}” dir=”ltr”>

Above lines create item url for Icon, Title and URL of search result. In current state these will open items on search result page. If you want the link to open in a new window, you will add a target=”_blank” at the end of href tag. Now update Webpart XSLT with these modifications and exit from editable mode.

  • Option 2 is exactly what I need ! how do I configure this? – Vandoorn Kevin May 17 '13 at 12:56
  • I've updated my answer, the tutorial should show you how to do it :) Basically, you should edit the XSL of the Search results page and look for the lines to be edited. – dzookatz May 17 '13 at 13:02
  • Thanks dzookatz I will give this a try ! Do i add the target="_blank" in every line of the icon title and url or? – Vandoorn Kevin May 17 '13 at 13:18
  • 1
    Like the Tutorial says: "On search result page where keyword are currently appearing in bold, click site actions and go to edit page. Now All webpart on page will appear in editable format. To modify the display we need to edit search core results webpart, locate this webpart on page and click on edit webpart option. Now it will open the tool pane of webpart in right side, click on XSLT Edit button in tool pane. It will open the webpart XSLT." This should work no matter the SP version you are using. – dzookatz May 17 '13 at 13:39
  • 1
    Also, take a look at this link: social.msdn.microsoft.com/Forums/es-ES/sharepointsearchprevious/… This in particular, for SP 2013: habaneroconsulting.com/insights/… – dzookatz May 17 '13 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.