SharePoint Server 中管理連續編目Manage continuous crawls in SharePoint Server

摘要:了解如何啟用和停用連續編目 SharePoint Server 2016 與 SharePoint Server 2013,以及如何變更連續編目的頻率間隔。Summary: Learn how to enable and disable continuous crawls in SharePoint Server 2016 and SharePoint Server 2013, and how to change the frequency interval of continuous crawls.

啟用連續編目已是累加編目的替代方式編目排程選項。此選項是 SharePoint Server 的新功能並套用至內容來源類型的 SharePoint 網站Enable continuous crawls is a crawl schedule option that is an alternative to incremental crawls. This option is new in SharePoint Server and applies only to content sources of type SharePoint Sites.

連續編目編目頻率來協助保護新鮮的搜尋結果的 SharePoint Server 網站。像累加編目的連續編目編目已新增、 變更或刪除自上次編目的內容。與累加編目,在特定時間和定期重複播放的開始在指定時間後,不同的是連續編目自動啟動預先定義的時間間隔。連續編目的預設間隔會每隔 15 分鐘。連續編目協助因為搜尋索引會保持最新為 SharePoint Server 內容會時常編目,所以請確定時效性的搜尋結果。即得出連續編目已編目的 SharePoint Server 內容可快速變更特別有用。Continuous crawls crawl SharePoint Server sites frequently to help keep search results fresh. Like incremental crawls, a continuous crawl crawls content that was added, changed, or deleted since the last crawl. Unlike an incremental crawl, which starts at a particular time and repeats regularly at specified times after that, a continuous crawl automatically starts at predefined time intervals. The default interval for continuous crawls is every 15 minutes. Continuous crawls help ensure freshness of search results because the search index is kept up to date as the SharePoint Server content is crawled so frequently. Thus, continuous crawls are especially useful for crawling SharePoint Server content that is quickly changing.

單一連續編目會納入 Search Service 應用程式中所有已啟用連續編目的內容來源。同理,連續編目間隔會套用於 Search Service 應用程式中所有已啟用連續編目的內容來源。A single continuous crawl includes all content sources in a Search service application for which continuous crawls are enabled. Similarly, the continuous crawl interval applies to all content sources in the Search service application for which continuous crawls are enabled.

您無法同時為相同的內容來源執行多個完整編目或多個累加編目。但可同時執行多個連續編目。因此,即使某項連續編目正在處理某項大型內容更新,另一項連續編目仍可在預先定義的時間間隔啟動並編目其他更新。在特定內容存放庫的完整或累加編目進行中時,也可以為相同的存放庫進行連續編目。You cannot run multiple full crawls or multiple incremental crawls for the same content source at the same time. However, multiple continuous crawls can run at the same time. Therefore, even if one continuous crawl is processing a large content update, another continuous crawl can start at the predefined time interval and crawl other updates. Continuous crawls of a particular content repository can also occur while a full or incremental crawl is in progress for the same repository.

連續編目不會處理或重試傳回錯誤超過三次的項目。內容來源每四個小時會自動執行「清理」連續編目,讓連續編目可重新編目重複傳回錯誤的任何項目。如果錯誤持續存在,則此累加編目將重新嘗試編目項目,然後延後重試時間。A continuous crawl does not process or retry items that return errors more than three times. A "clean-up" incremental crawl automatically runs every four hours for content sources that have continuous crawl enabled to re-crawl any items that repeatedly return errors. This incremental crawl will try to crawl the item again and then will postpone retries if the error persists.

您可以設定累加編目時間在_Search_Service_Application_Name_: 新增/編輯內容來源] 頁面上,但是您可以僅使用 Microsoft PowerShell 變更連續編目的頻率間隔。You can set incremental crawl times on the Search_Service_Application_Name: Add/Edit Content Source page, but you can change the frequency interval for continuous crawls only by using Microsoft PowerShell.

啟用現有內容來源的連續編目To enable continuous crawls for an existing content source

  1. 確認執行此程序的使用者帳戶是否為 Search Service 應用程式的管理員。Verify that the user account that is performing this procedure is an administrator for the Search service application.

  2. 在管理中心中,按一下 [應用程式管理] 區段的 [管理服務應用程式]。In Central Administration, in the Application Management section, click Manage service applications.

  3. 按一下 [Search Service 應用程式]。Click the Search service application.

  4. 在_Search_Service_Application_Name_: 搜尋管理] 頁面的 [快速啟動] [正在編目],按一下 [內容來源On the Search_Service_Application_Name: Search Administration page, in the Quick Launch, under Crawling, click Content Sources.

  5. 在_Search_Service_Application_Name_: 管理內容來源] 頁面上,按一下您要啟用連續編目的 SharePoint 內容來源。On the Search_Service_Application_Name: Manage Content Sources page, click the SharePoint content source for which you want to enable continuous crawl.

  6. 在 [編目排程] 區段中選取 [啟用連續編目]。In the Crawl Schedules section, select Enable Continuous Crawls.

  7. 按一下 [ OK ]。Click OK.

  8. 驗證:在_Search_Service_Application_Name_: 管理內容來源] 頁面上,確認 [狀態] 欄具有[連續編目的狀態。Verification: On the Search_Service_Application_Name: Manage Content Sources page, verify that the Status column has the status Crawling Continuous.

啟用新內容來源的連續編目To enable continuous crawls for a new content source

  1. 確認執行此程序的使用者帳戶是否為 Search Service 應用程式的管理員。Verify that the user account that is performing this procedure is an administrator for the Search service application.

  2. 在管理中心中,按一下 [應用程式管理] 區段的 [管理服務應用程式]。In Central Administration, in the Application Management section, click Manage service applications.

  3. 按一下 [Search Service 應用程式]。Click the Search service application.

  4. 在_Search_Service_Application_Name_: 搜尋管理] 頁面的 [快速啟動] [正在編目],按一下 [內容來源On the Search_Service_Application_Name: Search Administration page, in the Quick Launch, under Crawling, click Content Sources.

  5. 在_Search_Service_Application_Name_: 管理內容來源] 頁面上,按一下 [新增內容來源On the Search_Service_Application_Name: Manage Content Sources page, click New Content Source.

  6. 建立SharePoint 網站類型的內容來源。Create a content source of the type SharePoint Sites.

    • 在 [名稱] 區段中輸入 [名稱] 欄位中的名稱。In the Name section, type a name in the Name field.

    • 在 [內容來源類型] 區段中選取 [ SharePoint 網站In the Content Source Type section, select SharePoint Sites.

    • 在 [起始位址] 區段中,輸入起始位址。In the Start Addresses section, type the start address or addresses.

    • 在 [編目設定] 區段中選取所有起始位址的編目行為。In the Crawl Settings section, select the crawling behavior for all start addresses.

    • 在 [編目排程] 區段中選取 [啟用連續編目]。In the Crawl Schedules section, select Enable Continuous Crawls.

  7. 按一下 [ OK ]。Click OK.

  8. 驗證:在_Search_Service_Application_Name_: 管理內容來源] 頁面上,確認新增加的內容來源隨即顯示 [狀態] 欄具有[連續編目的狀態。Verification: On the Search_Service_Application_Name: Manage Content Sources page, verify that the newly added content source appears and that the Status column has the status Crawling Continuous.

停用內容來源的連續編目To disable continuous crawls for a content source

  1. 確認執行此程序的使用者帳戶是否為 Search Service 應用程式的管理員。Verify that the user account that is performing this procedure is an administrator for the Search service application.

  2. 在管理中心中,按一下 [應用程式管理] 區段的 [管理服務應用程式]。In Central Administration, in the Application Management section, click Manage service applications.

  3. 按一下 [Search Service 應用程式]。Click the Search service application.

  4. 在_Search_Service_Application_Name_: 搜尋管理] 頁面的 [快速啟動] [正在編目],按一下 [內容來源On the Search_Service_Application_Name: Search Administration page, in the Quick Launch, under Crawling, click Content Sources.

  5. 在_Search_Service_Application_Name_: 管理內容來源] 頁面上,按一下 [SharePoint 內容來源以您要停用連續編目。On the Search_Service_Application_Name: Manage Content Sources page, click the SharePoint content source for which you want to disable continuous crawls.

  6. 在 [編目排程] 區段中,清除 [啟用累加編目。這會停用連續編目。In the Crawl Schedules section, clear Enable Incremental Crawls. This disables continuous crawls.

  7. 若要確認您想要停用連續編目,請按一下 [確定]To confirm that you want to disable continuous crawls, click OK.

  8. 選用: 按一下 [編輯排程] 以變更增量編目的排程,然後按一下 [確定]Optional: click Edit schedule to change the schedule for incremental crawls, and then click OK.

  9. 在_Search_Service_Application_Name_: 編輯內容來源] 頁面上,按一下 [確定]On the Search_Service_Application_Name: Edit Content Source page, click OK.

  10. 驗證:在_Search_Service_Application_Name_: 管理內容來源] 頁面上,確認 [狀態] 欄已變更為 [閒置。這可能需要一些時間,因為保留在編目佇列中的所有 Url 仍會都編目之後停用連續編目。Verification: On the Search_Service_Application_Name: Manage Content Sources page, verify that the Status column has changed to Idle. This might take some time, because all URLs that remain in the crawl queue are still crawled after you disable continuous crawls.

停用所有內容來源的連續編目To disable continuous crawls for all content sources

  1. 確認執行此程序的使用者帳戶為否為 Search Service 應用程式管理員。Verify that the user account that performs this procedure is an administrator for the Search service application.

  2. 在伺服器陣列的伺服器上啟動 SharePoint 管理命令介面。Start a SharePoint Management Shell on a server in the farm.

  3. 在 Microsoft PowerShell 命令提示字元處,輸入下列命令:At the Microsoft PowerShell command prompt, type the following commands:

    $SSA =  Get-SPEnterpriseSearchServiceApplication
    $SPContentSources = $SSA | Get-SPEnterpriseSearchCrawlContentSource | WHERE {$_.Type -eq "SharePoint"} 
    foreach ($cs in $SPContentSources) 
    { 
     $cs.EnableContinuousCrawls = $false 
     $cs.Update() 
    }
    
  4. 驗證:在_Search_Service_Application_Name_: 管理內容來源] 頁面上,確認 [狀態] 欄是否已變更以閒置的所有內容來源。這可能需要一些時間,因為保留在編目佇列中的所有 Url 仍會都編目之後停用連續編目。Verification: On the Search_Service_Application_Name: Manage Content Sources page, verify that the Status column has changed to Idle for all content sources. This might take some time, because all URLs that remain in the crawl queue are still crawled after you disable continuous crawls.

變更連續編目間隔To change the continuous crawl interval

  1. 確認執行此程序的使用者帳戶為伺服器陣列管理員群組的成員。Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. 啟動 SharePoint 管理命令介面。Start a SharePoint Management Shell.

  3. 在 Microsoft PowerShell 命令提示字元處,輸入下列命令:At the Microsoft PowerShell command prompt, type the following commands:

    $ssa = Get-SPEnterpriseSearchServiceApplication
    $ssa.SetProperty("ContinuousCrawlInterval",n)
    

    其中:Where:

    • n_是以分鐘為單位要用於連續編目以啟動規則的時間間隔。預設的間隔時間是每隔 15 分鐘。您可以設定最短時間間隔為 1 分鐘。_n is the regular interval in minutes at which you want to continuous crawls to start. The default interval is every 15 minutes. The shortest interval that you can set is 1 minute.

      注意

      如果您降低間隔,您會增加 SharePoint Server 與編目程式的負載。請確定您規劃及向外延展的資源此增加耗用據此。If you reduce the interval, you increase the load on SharePoint Server and the crawler. Make sure that you plan and scale out for this increased consumption of resources accordingly.

另請參閱See also

在 SharePoint Server 中規劃編目及同盟Plan crawling and federation in SharePoint Server

Set-spenterprisesearchcrawlcontentsourceSet-SPEnterpriseSearchCrawlContentSource