none
Search operations are not allowed once the search engine is disposed RRS feed

  • Question

  • Hi.

    Total rows returned by some query is about 17000.

    I'm trying to get all search results with paging requests. Everything is ok till 8994 row.

    Any query which returns a 'page' which contains this row throws an exceptions (it's sharepoint' ULS logs):

    1. SearchServiceApplication::Execute--Exception: Microsoft.Office.Server.Search.Query.FASTSearchQueryException: Unexpected exception searching against FAST Search engine Search operations are not allowed once the search engine is disposed.     at Microsoft.Office.Server.Search.Query.FASTQueryInternal.Execute(QueryProperties properties)     at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Execute(QueryProperties properties)

    2. FASTQueryInternal::Execute--Unexpected exception System.InvalidOperationException trying to search for 'MyQuery' with FAST backend: Search operations are not allowed once the search engine is disposed. System.InvalidOperationException: Search operations are not allowed once the search engine is disposed.     at Microsoft.SharePoint.Search.Extended.Query.Result.DocSumPool.Get(Int32 index)     at Microsoft.SharePoint.Search.Extended.Query.Result.QueryResult.GetDocument(Int32 index)     at Microsoft.Office.Server.Search.Query.Gateway.FastResultExtractor.ExtractItemsAsDataTable(IQueryResult result, Int32 from, Int32 to, SPUrlZone urlZone, StringCollection alternateAccessMapProperties, StringCollection selectProperties, Boolean excludeBodyProperty)     at Microsoft.Office.Server.Search.Query.Gateway.FastResultExtractor.ExtractResults(IQueryResult queryResult, SearchRequest searchRequest, Boolean excludeBodyProperty)     at Microsoft.Office.Server.Search.Query.Gateway.FastSearchGateway.ExecuteSearch(SearchRequest request, String queryString)     at Microsoft.Office.Server.Search.Query.Gateway.AbstractSearchGateway.Search(SearchRequest request)     at Microsoft.Office.Server.Search.Query.FASTQueryInternal.ExecuteSearch(SearchRequest request, ResultTableCollection rtc)     at Microsoft.Office.Server.Search.Query.FASTQueryInternal.Execute(QueryProperties properties)

    3. AbstractSearchGateway::Search--Exception when searching for медведев. Ex: System.InvalidOperationException: Search operations are not allowed once the search engine is disposed.     at Microsoft.SharePoint.Search.Extended.Query.Result.DocSumPool.Get(Int32 index)     at Microsoft.SharePoint.Search.Extended.Query.Result.QueryResult.GetDocument(Int32 index)     at Microsoft.Office.Server.Search.Query.Gateway.FastResultExtractor.ExtractItemsAsDataTable(IQueryResult result, Int32 from, Int32 to, SPUrlZone urlZone, StringCollection alternateAccessMapProperties, StringCollection selectProperties, Boolean excludeBodyProperty)     at Microsoft.Office.Server.Search.Query.Gateway.FastResultExtractor.ExtractResults(IQueryResult queryResult, SearchRequest searchRequest, Boolean excludeBodyProperty)     at Microsoft.Office.Server.Search.Query.Gateway.FastSearchGateway.ExecuteSearch(SearchRequest request, String queryString)     at Microsoft.Office.Server.Search.Query.Gateway.AbstractSearchGateway.Search(SearchRequest request)

    4. Exception caught in QueryService class.  Exception message: The search request was unable to execute on FAST Search Server..  Stack:    at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.ThrowBackwardCompatibleException(FaultException`1 ex)     at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoSpLoadBalancedUriWsOp[T](WebServiceBackedOperation`1 webServiceCall, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, String operationName)     at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoWebServiceBackedOperation[T](String operationName, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, WebServiceBackedOperation`1 webServiceCall)     at Microsoft.Office.Server.Search.AdministrationSearchServiceApplicationProxy.Execute(QueryProperties properties)     at Microsoft.Office.Server.Search.Query.Query.Execute()     at Microsoft.Office.Server.Search.Query.QueryService.DoQuery(QueryMethod queryMethod, String queryXml, String& domain, String& queryId, Int32& startAt, Boolean& fStandardResults, StringCollection& querySuggestions)     at Microsoft.Office.Server.Search.Query.QueryService.QueryEx(String queryXml).

    5. SearchServiceApplicationProxy::Execute--Error occured: System.ServiceModel.FaultException`1[Microsoft.Office.Server.Search.Administration.SearchServiceApplicationFault]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.Office.Server.Search.Administration.SearchServiceApplicationFault).

     

    So how I can know what's wrong with that row ? And how it can be fixed?

     

     

    Monday, October 18, 2010 6:23 AM

All replies

  • int count = 1000;
    
    FastQuery query = new FastQuery()
    {
    	BeginPeriod = DateTime.Parse("2010.08.01"),
    	EndPeriod = DateTime.Parse("2010.08.10"),
    	Count = count,
    	EnableStemming = true, 
    	QueryText = queryText,
    	StartAt = 1
    };
    
    DateTime counter = DateTime.Now;
    int max = -1;
    			
    using (FastSearchService service = FastSearchService.Create())
    {
    	QueryResult qr = new QueryResult();
    		qr = service.Execute(query);
    	max = qr.DocumentsFound;
    	Console.WriteLine("Documents found: {0}", max);
    	query.Count = count;
    	do
    	{
    		Console.WriteLine("StartAt: {0}", query.StartAt);
    		try
    		{
    			qr = service.Execute(query);
    			Console.WriteLine("Documents found: {0}", qr.DocumentsFound); ;
    		}
    		catch (Exception)
    		{
    			Console.WriteLine("exc : {0}", DateTime.Now);
    		}
    		query.StartAt += query.Count;
    	} while (query.StartAt < max);
    }
    
    Console.WriteLine("Done in {0}", DateTime.Now.Subtract(counter));

    Here's a sample code that I'm using.
    Different 'queryText' stops working at different iterations (rows). But it this work can be completed on some queries also.


    Can somebody helps? 
    Tuesday, October 26, 2010 6:33 AM
  • Did you ever find the answers? I'm seeing the same error and yours is the only result when googling for:

    "with FAST backend: Search operations are not allowed once the search engine is disposed."

    спасибо!

    Wednesday, March 7, 2012 3:55 PM
  • Nope, sorry. Even didnt remember what's wrong here. 

    As I can suppose for now, initial estimated search result was wrong (17k), and with more precise it occurs only 8k results (according my data above).

    And then maybe I've tried to iterate next page, and there's no any result in pool (Result.DocSumPool.Get(Int32 index))

    Anyway its only suggestion, based on this trace.

    Saturday, March 10, 2012 3:21 PM