Domanda

I need to have a search screen that will search the contents of one file share only. I want this to be totally separate from the main search. I created a new Search Service Application, crawled my file share, and then created a new site collection for it. I then go to Central Administration -> Manage Web Applications, and "Service Connections". From there, I change the "Edit the following group of connections" to "custom". I can then pick my new Search Service Application, and set it as the default search application. That makes the file share search work, but the main search breaks. What is the proper way to maintain separate searches? Am I going about this wrong?

È stato utile?

Soluzione

Yes. You only want one Search Service Application. In your SSA, you should set up the file share as a separate content source. (Based on the fact that you say you got it working in a separate SSA, I'm assuming you know how to set up a content source to crawl a file share.)

Now, if you were in SP 2010, I'd tell you to then set up a "Search Scope" that uses only that content source, and make that scope available wherever you want users to be able to search the file share. But there are no longer search scopes in 2013. However, there are still ways to filter by content source.

Here's a blog post that describes a way to add a "Path" parameter to the search query of a search results web part, so the path filter will be automatically applied to any query submitted by a user. In your case, I would make the path be the same as the one you used in setting up the content source. So you would make the query text in the web part:

{searchboxquery} Path:'url.of.your.fileshare'

There's other instructions in the blog post that show you how to make it selectable as a scope, etc.

Blog post is here.

While this will set up a way to create a search that only looks in the file share and excludes other SharePoint content, it will not automatically exclude the file share contents from coming up in your regular searches. You may need to set up other fake "scopes" that use the same method to exclude content with the path of your file share.

Here's a link to another post about search settings and result sources in SP 2013.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top