locked
will the content DB read-only affect the keywordQuery? RRS feed

  • Question


  • My Sharepoint is set to read-only for some reason,  however, my search function are getting error when search SharePoint site

    the error message is shown below: 

    Microsoft.SharePoint.SPException: Cannot complete this action.
    
    Please try again. ---> System.Runtime.InteropServices.COMException: Cannot complete this action.
    
    Please try again.
       at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateAuditEntryForUrl(String bstrUrl, Guid gSiteId, String bstrDirName, String bstrLeafName, Int32 itemType, String bstrMachineName, String bstrMachineIp, Int32 event, String bstrEventName, Int32 eventSource, String bstrSourceName, Int32 userId, String bstrEventData)
       at Microsoft.SharePoint.Library.SPRequest.CreateAuditEntryForUrl(String bstrUrl, Guid gSiteId, String bstrDirName, String bstrLeafName, Int32 itemType, String bstrMachineName, String bstrMachineIp, Int32 event, String bstrEventName, Int32 eventSource, String bstrSourceName, Int32 userId, String bstrEventData)
       --- End of inner exception stack trace ---
       at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
       at Microsoft.SharePoint.Library.SPRequest.CreateAuditEntryForUrl(String bstrUrl, Guid gSiteId, String bstrDirName, String bstrLeafName, Int32 itemType, String bstrMachineName, String bstrMachineIp, Int32 event, String bstrEventName, Int32 eventSource, String bstrSourceName, Int32 userId, String bstrEventData)
       at Microsoft.SharePoint.SPAudit.WriteAuditEvent(SPWeb web, String strDirName, String strLeafName, SPAuditItemType itemType, SPAuditEventType eventId, String eventName, String eventSource, Int32 userId, String xmlData, Boolean fValidateEventData, Boolean fThrowIfEventDataInvalid)
       at Microsoft.SharePoint.SPAudit.WriteAuditEvent(SPAuditEventType eventId, String eventSource, String xmlData)
       at Microsoft.Office.Server.Search.Query.SearchExecutor.PreExecuteQuery(Query query)
       at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQuery(Query query)
    
    

    This error is occurred when i trying to execute the query:

     SearchExecutor searchExecutor = new SearchExecutor(); 

    ResultTableCollection resultTableCollection = searchExecutor.ExecuteQuery(keywordQuery);//< ----


    Friday, September 8, 2017 3:45 AM

All replies

  • Hi

    from the error stack I can see

    at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateAuditEntryForUrl

    I guess you may enable audit in your SharePoint environment and it will record your search actions.


    顺其自然地勇往直前!—Justin Liu

    Friday, September 8, 2017 8:09 AM