Monday, March 12, 2012

Search Service Configuration (Part 1)
[How to stop ?? admin content search through service]

I was reported some issue in one for my SharePoint project by client, it's regarding to the search functionality it said "the search function is displaying as a default search result. i.e. it is displaying admin section also." . what they mentioned is when they search something they get result which also related to the Admin section also like Central Administrator or other test sites.
this project we have used default search web parts and core result web parts to get and show the search results. means we cannot do many changes in web part levels. so what we need to do is, Looking at the search configuration.

Who Responsible .....
Service applications are responsible for many SharePoint services which provide through the framework. when you consider on search basically it's Search Service Application. so if you have a search service application then you get at-least something for search result when you search something . if you don't then you'll get something like following image, with error massage "The search request was unable to connect to the Search Service." when you search.


so if you don't have one just create one.
How To Create ... 
Login to central admin using the farm admin credential Access to  “Manage service applications” under  “Application Management” .

Then click on new and select Search Service application. 


Then Fill the required field in the popup. Give name as a Search Service Application (you can give any name you like, but this is much professional). 



you need to do some configurations, under the "Application Pool for Search Admin Web Service" and "Application Pool for Search Query and Site Settings Web Service". You can configure these section with new application pool or chose existing one (I recommend to chose existing one to eliminate configuration errors.). 

Then click OK, you get loading popup once it's creating.


Once it done you can search through the SharePoint Application but still that's not our main issue. Ore issue is how to stop getting Admin Content Search Results.

ISSUE .... 

The issue is on the search configuration (Central Admin level). The default configuration is (eg: All Site or Advanced Search) to get all the result related for the farm level that’s why you get all result including Admin level. 

SOLUTION ... 

To solve this issue we need to configure search service application and edit the Local SharePoint Site list.
for that we need to navigate to the Local SharePoint Site List . 
Go to The Manage service Applications (I explain the path above). then click Search Service Application.  


Click on  “Content Sources” under “Crawling” in the left navigation
Click on the dropdown arrow  “Local SharePoint sites” and click “Edit”





Under “Type start addresses below (one per line):” section you can see all the site URLs including admin level URLs also configured. 

Ensure the following values are set.
Remove all the URLs which already configured,
Give both <site> URL and the <anonymous site> URL as the “Start Address”
For the schedule of “Full crawl” and “Incremental crawl”, click on “Edit Schedule” and use the default and click OK [Scheduling part is optional you can schedule it or keep it as none for both Full Crawl and Incremental Crawl ]



At the end of this process start full crawl of this content source. Click on the dropdown arrow  “Local SharePoint sites” and click “Start Full Crawl”

Wait until the status part is “complete”. Then go to the application and Search something. It will only give the Site or Application Contents. 

ok That's It ... 
HAPPY CODING




No comments:

Post a Comment