About Me

My photo
a Dynamic and Energetic guy.....
Showing posts with label Search. Show all posts
Showing posts with label Search. Show all posts

Monday, October 17, 2016

Move SharePoint 2013 Search Index Location to a other location

When we setup SharePoint Search Service Application using Central Administration, there is no place to set INDEX LOCATION.

With the usage of CRAWLING, the location will be filled with INDEXED files.

If we want to change the location of INDEX folder, we have only 1 options. That is using POWERSHELL.

1) We have to create a new INDEX LOCATION

$IndexLocation = "H:\New_SearchIndex"
New-Item –ItemType Directory –Path $IndexLocation

2) Then we have to get current Search Service Application to a variable

$SearchServiceName = "SearchSer"
$SSA = Get-SPServiceApplication -Name $SearchServiceName; 

3) Then we get the current Search Service Instance to a variable

$Server = "SPDEV1APP"
$Instance = Get-SPEnterpriseSearchServiceInstance -Identity $Server;

4) Then we have to get current serach topology

$Current = Get-SPEnterpriseSearchTopology -SearchApplication $SSA -Active; 

we can current topology using Central Administration. Here we should have all the components in GREEN status.

5) Create a CLONE of current Search Topology

$Clone = New-SPEnterpriseSearchTopology -Clone -SearchApplication $SSA -SearchTopology $Current 

6) Now we SET new INDEX LOCATION

New-SPEnterpriseSearchIndexComponent -SearchTopology $Clone -IndexPartition 0 -SearchServiceInstance $Instance -RootDirectory $IndexLocation 

7) SET new one as ACTIVE

Set-SPEnterpriseSearchTopology -Identity $Clone

If we Type,
Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa 
It will return 7 components including 2 INDEX COMPONENTS


================================================================

8) Then Gets the Search Topology again,

$SSA = Get-SPEnterpriseSearchServiceApplication
$Current = Get-SPEnterpriseSearchTopology -SearchApplication $SSA -Active

9) Creates a copy of the current Search Topolog again,

$Clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $SSA -SearchTopology $Current

10) Removes the old Index Component from the Search Topology, THIS IS THE MOST CRITICAL

Get-SPEnterpriseSearchComponent -SearchTopology $Clone | ? {($_.GetType().Name -eq "IndexComponent") -and ($_.ServerName -eq $($Instance.Server.Address)) -and ($_.RootDirectory -ne $IndexLocation)} | Remove-SPEnterpriseSearchComponent -SearchTopology $Clone -Confirm:$false

11) Sets our new Search Topology as Active

Set-SPEnterpriseSearchTopology -Identity $Clone

If we Type again,
Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa 
It will return only 6 components including only 1 INDEX COMPONENT



It is set to new INDEX LOCATION. Now Do a CRAWL using Central Administration.


Sunday, June 12, 2016

OVERVIEW OF SHAREPOINT SEARCH

                                         SharePoint is implemented and developed for the content management. With the loads of content including documents, images and videos the SharePoint bare a lot of data. Then it is essential to find the data in speed manner with usability. For that SharePoint introduces SEARCH itself. On the other hand Microsoft invested a lot of money to build their own search engine, so called FAST Search. Until SharePoint 2010, the search mechanism was purely based within SharePoint and had limitations. With the implementation of SharePoint 2013, the FAST search also integrated and bundled FREE with SharePoint.
SharePoint Search is introduced with a lot of usable features for content users. The Search is categorized as,
1)      Everything
2)      People
3)      Conversions
4)      Videos


With the introduction of PEOPLE section, the end users can search employees using their Active directory features. To enable PEOPLE search, the SharePoint portal should be provisioned with User Profile Synchronization. After the enablement of Sync service, the Active Directory information will be fetched to the SharePoint and will be crawled, searchable with user inputs. 
With SharePoint 2013 the Search results page has been modified and enhanced with, 
1) Doc Preview
2) Result Categorization
3) Author wise categorization
4) Modified date categorization

Set Up A Search Center

First Search Service Application Should be provisioned via Central Administration. There we have to specify search service account,
And app pool for Search Service application and another app pool for Search Processing.

After that we have to create a Search Center Site Collection to link with SharePoint portal,


Finally, we have to link newly created Search Center Site with the content portal to facilitate end users to connect and find data,


Search Center Administration

After we have configured SharePoint Search Centre via Central Administration, Administrators can verify the “Search Administration” and the status.


 The “Search Application Topology” is consists of, 
1) Admin (Service Application)
2) Crawler
3) Content Processing
4) Analytics Processing
5) Query Processing
6) Index Partition, modules. 
All elements should be in GREEN status to crawl the items in the SharePoint repository and processing with search center. With the configuration SharePoint creates 4 databases for Administration, analytics reporting, Crawling and linking information. We can allocate a dedicated server for SharePoint Search within the FARM to reduce the load to other application servers.
First we have to set data sources that needs to bind with SharePoint Search. With new features we can assign different data sources to crawl with SharePoint and display results within portal. (SharePoint Sites, My-Sites, Internet Sites)

Also we can set crawling intervals for INCREMENTAL and FULL crawling. This will use a lot of resources, hence the interval should be decided after analysis of exact data availability. If frequently updating site, then crawling can be 2 hours.

Administrators can start any CRAWL at any time via “Search Administration” page. The crawling will take few minutes to few hours depends on the content and number of sites set in the CONTENT SOURCES section. After a crawl, we can view the crawl log and statistical information. It give last 24 hours, last 7 days and last month statistics with number of ITEMS dealt with the crawl. Number of scanned items, deleted items between last 2 crawls can be viewed using stats report. Administrators can view item-wise status and time intervals.

Search Rules

After configured Search Center, admins can create RULES to exclude items. It can be se via Crawl Rules.
Normal Search Result
When we search “SharePoint” word within portal, we will see results including my uploaded document “What is SharePoint”.


When we apply Crawl Rule, to EXLUDE items from a document library as follows,
Do the crawling, we can see search results with EXCLUDED items.


We can EXCLUDE search items using, 
1) URLs
2) Key Terms
3) Specific words while using elevated privileges.

Crawl Reports

With the enhanced Search analytics, SharePoint can produce reports with different schema. The 
1) Crawl Rate
2) Crawl Latency
3) CPU and Memory Load
4) Crawl Queue can be viewed with date filters.


It is little about SharePoint Search and its features.








Thursday, January 5, 2012

SharePoint 2010 Change Default Search Service

If we have created a separate search service application for our client, we need to set customized search service as default search service. We can do it through Central Administration.

 

we can select the customized "Search Service" for each and every web application.

Tuesday, December 20, 2011

SharePoint 2010 Search Advanced

1. Create a separate "Search Service Application"
2. Add SharePoint account in to "Administrator"group
3. Click on the service application
4. Go to "Content Sources"
5. Type the URLs (eg:- http://Intranet)
6. Go to "Scopes" and then Click "Edit"
7. Set the web address or content source
8. Set "Scopes"

9.Set "Scope rules"

10.Set the "Crawl Rules"
11. Crawling Full
12. Crawling Incremental
13. Go to "Crawl Log" and see the "Statistics"
14. "Crawl" success with green color icon
 

15. Filter "Crawl Items" if you have 1000+ items






Wednesday, September 14, 2011

Create SharePoint search results programatically

private void ComplexSearch()
        {
            SearchQueryAndSiteSettingsServiceProxy settingsProxy = SPFarm.Local.ServiceProxies.GetValue();
            SearchServiceApplicationProxy searchProxy = settingsProxy.ApplicationProxies.GetValue("Search_Service_CUSTOM");
            KeywordQuery keywordQuery = new KeywordQuery(searchProxy);
            string SearchScope = "PEOPLE";
            keywordQuery.HiddenConstraints = "scope:" + "\"" + SearchScope + "\"";

            keywordQuery.TrimDuplicates = true;
            keywordQuery.EnableStemming = true;
            keywordQuery.IgnoreAllNoiseQuery = true;
            keywordQuery.QueryText =  "SELECT AccountName,PreferredName,PictureUrl,WorkEmail,JobTitle,Department,InternalNumber,OfficeNumber,AboutMe,Responsibility,Skills,HitHighlightedSummary,InternalTelephone,OfficeNumber,AboutMe,Responsibility,Skills,HitHighlightedSummary,HitHighlightedProperties,CollapsingStatus,Path,FirstName,LastName FROM Scope() WHERE ('scope'='People')";


            keywordQuery.EnablePhonetic = true;           
            keywordQuery.ResultsProvider = SearchProvider.Default;
            keywordQuery.ResultTypes = ResultType.RelevantResults | ResultType.SpecialTermResults ;
            ResultTableCollection resultsTableCollection = keywordQuery.Execute();
            ResultTable searchResultsTable = resultsTableCollection[ResultType.RelevantResults];
            DataTable resultsDataTable = new DataTable();
            resultsDataTable.TableName = "Results";
            resultsDataTable.Load(searchResultsTable, LoadOption.OverwriteChanges);

            DataView view = new DataView(resultsDataTable);
            SearchGrid.DataSource = resultsDataTable;
            SearchGrid.DataBind();
        }

Tuesday, June 8, 2010

Search in Sharepoint 2010 - New features

So it is time to have a look on search function that comes with sharepoint 2010.

With the sharepoint 2007 we had little work to get our search function done. (create a Search site, SSP configuration & crawling rule)

But now it is really simple.
It has additional functions that help user very much.

SEARCH(find_text,within_text,start_num)

Find_text is the text you want to find. You can use the wildcard characters — question mark (?) and asterisk (*) in find_text. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

Within_text is the text in which you want to search for find_text.

Start_num is the character number in within_text at which you want to start searching. Use start_num to skip a specified number of characters.
For example, suppose you are working with the text string "AYF0093.YoungMensApparel". To find the number of the first "Y" in the descriptive part of the text string, set start_num equal to 8 so that the serial-number portion of the text is not searched. SEARCH begins with character 8, finds find_text at the next character, and returns the number 9. SEARCH always returns the number of characters from the start of within_text, counting the characters you skip if start_num is greater than 1.



Special Points in Search of Sharepoint 2010

1. SEARCH does not distinguish between uppercase and lowercase letters when searching text.
2. SEARCH is similar to FIND except that FIND is case sensitive.
3. If find_text is not found, the #VALUE! error value is returned.
4. If start_num is omitted, it is assumed to be 1.
5. If start_num is not greater than 0 (zero) or is greater than the length of within_text, the #VALUE! error value is returned.


there are 3 types of search on SharePoint 2010
* Boolean Search
you can use AND, NOT and OR in your search queries. Be mindful though that you need to use capitals, otherwise they will considered additional search words.

* Wildcard Search
Search queries can now match a wildcard at the end of a text string.



* Faceted Search
When a search query returns a lot of results the faceted search functionality displays a refinement panel on the left side of the screen. In the panel you can refine the results based on criteria like Result type, Site, Author, Modified Date and Tags. What refinement possibilities are shown depends on the result set. Administrators can also configure other the categories that are used in the refinement panel based on managed properties and enterprise content management taxonomy nodes.


Finally we can add our portal as a "search connector to windows", that means it will search web url when we want to search a document :) :) :) :)

My Masters