SharePoint 2010 Search result Not found documents for a specific library in specific SharePoint site

Hi All,

I came across a situation where user is trying to search documents selecting the option “search in same site” instead of “all sites” from  search box and getting no result where as can find documents from other library with in same site.

Why such happens ?

The first point comes to mind for search error is  content not crawled, indexing not done for this situation.

Yes , its true but we need to think why  ?

As per my investigation I found the setting of the library as below

Draft-items-are-not-crawled-in-SharePoint

By default SharePoint only crawls major versions of files and draft items are only viewable by their creators. SharePoint is behaving as expected out of box.Draft items are not crawled in SharePoint

Resolution :

This behavior can be altered in Document Library Settings -> Versioning Settings -> Draft Item Security

Select the option “Any user who can read items”.

This will allow all users to see draft items including the crawling account.

  • Else you need to select “Create major versions” option or can publish the documents as major versions if want to get those documents in search result as per client wish.

https://support.microsoft.com/en-us/help/2304855/draft-items-are-not-crawled-in-sharepoint

Advertisements

Query 0 Server Not Responding – Event ID 2587

Error :

SERVER1:
Windows 2008 R2 (x64)
SharePoint 2010

SERVER2:
Windows 2008 R2 (x64)
SQL 2008

Services running on SERVER1: (none as localsystem, localservice, networkservice)

SharePoint 2010 Administration (started/auto)

SharePoint 2010 Timer (started/auto)

SharePoint 2010 Tracing (started/auto)

SharePoint 2010 User Code Host (stopped/disabled)

SharePoint 2010 VSS Writer (stopped/manual)

SharePoint Foundation Search V4 (started/manual)

SharePoint Server Search 14 (started/manual)

The RELATED ISSUE(s):

Search/indexing is not working, and in return, backups are failing claiming:

Failure Message Object Query-0 (D: on SERVER1) failed in event On Backup

Search Service Application reports:

Index Partition – 0 – SERVER2Search_Service_Application_PropertyStoreDB_9a482efd99954748a062952a3d2617d7

Query Component 0 SERVER1 Not Responding

System Event Log on SERVER1 reports:

Event ID 2587

The following conditions are currently affecting index propagation to this server for search service application ‘Search Service Application’:

1. Query 0, catalog Main: failing to copy index files from crawl component 0 for 1490 minutes. Access is denied. 0x80070005

2. Query 0 is not being automatically disabled because the minimum number of ready query components per partition is 2.

Solution :

  1. Please try to disconnect the query server from the search topology,
  2. stop the Search service in central admin, clear the index files in the query server.
  3. After that, starts the search service instance using Start-SPServiceInstance PowerShell.

Run the following PowerShell to reset the Query server:

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity “SSAName”
$queryComponents = $ssa | Get-SPEnterpriseSearchQueryTopology -Active | Get-SPEnterpriseSearchQueryComponent
$component = $queryComponents | where {$_.ServerName -eq “QueryServerName” }
$component.Recover()

How to reset a corrupt search index in SharePoint 2013 in case the reset index is not working

On a recent SharePoint 2013 deployment, I faced a strange issue, wherein the search index got corrupted and I was not able to reset the index. Although, I was able to get to the reset index screen and the reset index button was clickable, but each time it went into an infinite loop on clicking the reset index button, and the index was not reset.

After much banging our heads and googling around, I found a small piece of information that really helped and did the trick. Below is a step-wise approach to resolve such an issue.

Step-1
Stop the Windows SharePoint Services Timer service

timer

Step-2
Navigate to the cache folder in the following location: System Drive:ProgramDataMicrosoftSharePointConfig

Step-3
Locate the folder that has the file “Cache.ini”. There may be multiple GUID folders with cache.ini file

Step-4
Back up these folders with the Cache.ini file

Step-5
Delete all the XML configuration files in the GUID folder
Note: When you delete the xml files within the GUID folders, make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder

xmlfiles

Step-6
Open the Cache.ini file and delete the content, replacing all the text with the number ’1′. Save the file and close
Step-7
Start the Windows SharePoint Services Timer service
After the above steps have been executed, make sure that the Cache.ini file contains some other value and not 1

resetcache

SEARCH COMPONENT INTERACTION

Crawl and component processes

The crawl and content processing architecture includes the crawl component, crawl database and content processing component. Both search components can be scaled out based on crawl volume and performance requirements.

About the crawl component:

The crawl component is responsible for crawling content sources. It delivers crawled items – both the actual content as well as their associated metadata – to the content processing component.·

The crawl component invokes connectors or protocol handlers that interact with content sources to retrieve data. Multiple crawl components can be deployed to crawl simultaneously.·

The crawl component uses one or more crawl databases to temporarily store information about crawled items and to track crawl history.

About the crawl database:

The crawl database contains detailed tracking and historical information about crawled items.·

This database holds information such as the last crawl time, the last crawl ID and the type of update during the last crawl.

About the content processing component:

The content processing component is placed between the crawl component and the index component. It processes crawled items and feeds these items to the index component

The content processing component transforms crawled items into artifacts that can be included in the search index by carrying out operations such as document parsing and property mapping.·

Both the content processing component and the query processing component perform linguistics processing. Examples of linguistics processing during content processing are language detection and entity extraction.·

The content processing component writes information about links and URLs to the link database.

Index and query processes

The index and query architecture includes the index component, index partition, and query processing component, all of which can be scaled out based on content volume, query volume, and performance requirements.

About the index component:

An index component is the logical representation of an index replica. In the search architecture, you have to provision one index component for each index replica.

The index component receives processed items from the content processing component and writes those items to an index file.

The index component receives queries from the query processing component and provides results sets in return.

Queries are sent to the index replicas through the query processing component. The system routes and load balances the incoming queries to the index replicas.

About the index partition· 

An index partition is a logical portion of the entire search index. The search index is the aggregation of all index partitions.

About the query processing component· 

The query processing component is between the search front-end and the index component.

The query processing component analyzes and processes search queries and results.

Both the query processing component and the content processing component perform linguistics processing. Examples of linguistics processing during query processing are word-breaking and stemming.

When the query processing component receives a query from the search front-end, it analyzes and processes the query to attempt to optimize precision, recall, and relevancy. The processed query is then submitted to the index component.

The index component returns a result set based on the processed query back to the query processing component, which in turn processes that result set before sending it back to the search front-end.

Search administration 

Search administration is composed of the search administration component and its corresponding database.

About the search administration component:

The search administration component is responsible for running a number of system processes that are essential to search.

This component carries out provisioning, which is to add and initialize additional instances of the other search components.

About the search administration database

The search administration database stores search configuration data, such as the topology, crawl rules, query rules, and the mappings between crawled and managed properties.

Analytics processes 

The analytics architecture consists of the analytics processing component, analytics reporting database and link database.

About the analytics processing component

The analytics processing component performs two types of analyses: search analytics and usage analytics. This component uses information from these analyses to improve search relevance, create search reports, and generate recommendations and deep links.

Search analytics is about extracting information such as — links, the number of times an item is clicked, anchor text, data related to people, and metadata – from the link database. This information is important to relevance.

Usage analytics is about analyzing usage log information received from the front-end via the event store. Usage analytics generates usage and statistics reports.

The results from the analyses are added to the items in the search index. In addition, results from usage analytics are stored in the analytics reporting database.

About the link database:

The link database stores information extracted by the content processing component. In addition, it stores information about search clicks; the number of times people click on a search result from the search result page. This information is stored unprocessed, to be analyzed by the analytics processing component.

About the analytics reporting database

The analytics reporting database stores the results of usage analytics.· In addition, the analytics reporting database also stores statistics information from the analyses. SharePoint uses this information to create Excel reports that show different statistics.

About the event store

The event store holds usage events that are captured on the front-end, such as the number of times an item is viewed. These usage events are stored as log files on the application server that hosts the analytics processing component.

search Component2

search Component

Move Search Index Location SharePoint 2013

Search Description:

This script will move the SharePoint 2013 Search Index
Run the function with the 3 required Parameters

function Move-SPEnterpriseSearchIndex($SearchServiceName,$Server,$IndexLocation){
Add-PSSnapin Microsoft.SharePoint.PowerShell -ea 0;

#Gets the Search Service Application
$SSA = Get-SPServiceApplication -Name $SearchServiceName;
if (!$?){throw “Cant find a Search Service Application: "$SearchServiceName“”;}
#Gets the Search Service Instance on the Specified Server
$Instance = Get-SPEnterpriseSearchServiceInstance -Identity $Server;
if (!$?){throw “Cant find a Search Service Instance on Server: "$Server“”;}
#Gets the current Search Topology
$Current = Get-SPEnterpriseSearchTopology -SearchApplication $SSA -Active;
if (!$?){throw “There is no Active Topology, you can try removing the "-Active” from the line above in the script”;}
#Creates a Copy of the current Search Topology
$Clone = New-SPEnterpriseSearchTopology -Clone -SearchApplication $SSA -SearchTopology $Current;
#Adds a new Index Component with the new Index Location
New-SPEnterpriseSearchIndexComponent -SearchTopology $Clone -IndexPartition 0 -SearchServiceInstance $Instance -RootDirectory $IndexLocation | Out-Null;
if (!$?){throw “Make sure that Index Location "$IndexLocation” exists on Server: "$Server“”;}
#Sets our new Search Topology as Active
Set-SPEnterpriseSearchTopology -Identity $Clone;
#Removes the old Search Topology
Remove-SPEnterpriseSearchTopology -Identity $Current -Confirm:$false;
#Now we need to remove the extra Index Component
#Gets the Search Topology
$Current = Get-SPEnterpriseSearchTopology -SearchApplication $SSA -Active;
#Creates a copy of the current Search Topology
$Clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $SSA -SearchTopology $Current;
#Removes the old Index Component from the Search Topology
Get-SPEnterpriseSearchComponent -SearchTopology $Clone | ? {($.GetType().Name -eq “IndexComponent”) -and ($.ServerName -eq $($Instance.Server.Address)) -and ($_.RootDirectory -ne $IndexLocation)} | Remove-SPEnterpriseSearchComponent -SearchTopology $Clone -Confirm:$false;
#Sets our new Search Topology as Active
Set-SPEnterpriseSearchTopology -Identity $Clone;
#Removes the old Search Topology
Remove-SPEnterpriseSearchTopology -Identity $Current -Confirm:$False;
Write-Host “The Index has been moved to $IndexLocation on $Server”
Write-Host “This will not remove the data from the old index location. You will have to do that manually :)”
}
Move-SPEnterpriseSearchIndex -SearchServiceName “Search Service Application” -Server “SP2013-WFE” -IndexLocation “C:Index”

SharePoint 2013 places the Search index in the C: by default. There are many reasons why you would want to move the index to a different places.
This script will take three parameters, the Search Service Name, the Server Name and Index Location.  There is an example on the bottom of the script.