Thursday, April 10, 2014

How to force an item to be removed from the index immediately with FAST Search for SharePoint

There are way to obtain the Item ID (or ssic://<id>) using the Crawl Logs, so here in this post I will show how to obtain it directly through the Search Center. This will also be a neat way to show you how to get the raw XML for the search results, which is very helpful when you are troubleshooting issues with your search results (such as to confirm that some property is being returned properly).
The first thing you need to do is execute a query on SharePoint site that returns the item you want to remove from the index. Next you will need to customize the Search Core Results Web Part with this XSL (obtained from this MSDN article on how to get XML search results)  

These are the detailed steps to configure the Search Core Results Web Part to use this XSL as well as return the additional property we need to run the command to remove the item from the index:

1) While editing the Search Core Results Web Part, uncheck the option “Use Location Visualization” under Display Properties
Use Location Visualization
2) Click to open the XSL Editor and replace all the contents of the XSL entered there with the XSL listed below:



<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>

It will look like below:

XSL Editor

3) Edit the Fetched Properties parameter, adding the following entry right after the opening <Columns> tag (and before the </Columns> tag):  <Column Name=”contentid”/>

4) Confirm the changes to the web part, save the page and check the new output of your search results page showing the full XML with the additional properties you wanted
Search results

Now, login to FAST server and open Powershell for FAST with the contentid in hands we can execute the command to remove this item from the index:
docpush -c sp -U -d ssic://4583
And with that you have a way to remove items from the FAST Search for SharePoint index whenever you need. It does take some work, but at least now you have a way to accomplish that.

Friday, April 4, 2014

FAST Search operations are not working properly due to AntiVirus

In particular, regularly occurring events such as the following could impact the consistency\health of the index and tend to indicate that these files are being locked:

·         fileutils: delete_dir_sync(“%FASTSearch%\data\data_index\0\index_1394398129762671000\index_data”) failed after 30 attempts
·         index: Could not delete %FASTSearch%\data\data_index\0\index_1394398129762671000. Exception Unable to rename %FASTSearch%\data\data_index\0\index_1394398129762671000 to %FASTSearch%\data\data_index\0\index_1394398129762671000.1
·         indexer@ServerName: systemmsg: ft::hunter : None of the 1 replicas offer all the operations we need. The gap is 94407 - 132068892. Stopping indexer, manual recovery is necessary.

Solution:

Check Antivirus configuration: Anti-virus scans can disrupt FAST operation. There was evidence of antivirus scans in the Event Logs.  Please  verify that FAST folders are excluded from scanning