zoukankan      html  css  js  c++  java
  • Sharepoint2013搜索学习笔记之修改搜索拓扑(三)

    搜索服务新建好之后可以从管理中心,应用程序管理页面,进入搜索服务的管理页面,进入管理页面之后可以看到当前sharepoint场的搜索拓扑结构。

     

    如果sharepoint场内有多台服务器,需要将搜索组件部署到这些服务器上,可以在装有sharepoint管理中心的服务器上启动sharepoint命令行管理程序,通过口令的方式对搜索拓扑进行更改。

    注意: 向新的服务器添加搜索组件之前,必须先启动新增服务器上的搜索服务实例。搜索服务实例将启动搜索服务(OSearch15 和 SPSearchHostController)需要使用的所有 Windows 服务,下面将演示将一个爬网组件添加到搜索场内。

     

    例子一,增加爬网组件:

    第一步,在承载管理中心的服务器上以管理员身份运行sharepoint2013命令行管理程序,在管理程序内运行$<host n> = Get-SPEnterpriseSearchServiceInstance -Identity "<Server name>" 命令行获取指定服务器上的搜索服务实例。

    .

     

    第二步,运行Get-SPEnterpriseSearchServiceInstance -Identity $<host n> 确认指定服务器搜索实例运行正常,如果status是disable请运行Start-SPEnterpriseSearchServiceInstance -Identity $<host n>激活该搜索服务实例

     

    第三步,运行以下口令复制一份搜索拓扑,想要对搜索拓扑做出任何更改,首先必须创建一个新的拓扑对象

    $ssa = Get-SPEnterpriseSearchServiceApplication

    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

    $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active

     

     

     

    第四步,运行以下口令将一个爬网组件添加到指定服务器上

    New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone -SearchServiceInstance $hostA

     

    第五步,确认已经将新爬网组件添加到了克隆的拓扑上面

    Get-SPEnterpriseSearchComponent -SearchTopology $clone

    可以看到多了一个crawlcomponent1在spserver3

     

    第六步,运行以下口令将克隆的搜索拓扑激活成正式的搜索拓扑,这会需要等一段时间

    Set-SPEnterpriseSearchTopology -Identity $clone

     

    例子2,删除爬网组件:

    删除一个爬网组件的第一步到三步跟添加一个爬网组件是一样的,都是先获取需要删除的组件所在服务器搜索实例$hosta和当前搜索拓扑的复制$clone。

    第一步,运行以下命令行获取指定服务器上的搜索服务实例。

    $<host n> = Get-SPEnterpriseSearchServiceInstance -Identity "<Server name>"

    .

     

    第二步,运行以下口令复制一份搜索拓扑,想要对搜索拓扑做出任何更改,首先必须创建一个新的拓扑对象

    $ssa = Get-SPEnterpriseSearchServiceApplication

    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

    $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active

     

    第三步,运行以下命令找到需要删除组件的id

    Get-SPEnterpriseSearchComponent -SearchTopology $clone

    第四步,运行以下命令删除该组件

    Remove-SPEnterpriseSearchComponent -Identity <Search component id> -SearchTopology $clone

    第五步,运行口令将克隆后修改的拓扑激活成正式拓扑

    Set-SPEnterpriseSearchTopology -Identity $clone

    添加和删除分析处理组件,内容处理自己,爬网组件,搜索管理组件,查询处理组件的步骤是一样的,唯一区别就是新增时候,新增组件的命令不一样。索引组件的添加和删除跟以上五个组件会有一些区别,详情请参考:管理索引组件

     

     

    获取指定服务器上搜索服务实例

    $<host n> = Get-SPEnterpriseSearchServiceInstance -Identity "<Server name>"

     

    开始指定服务器上搜索服务实例

    Start-SPEnterpriseSearchServiceInstance -Identity $hostB

     

    获取指定服务器上搜索服务实例

    Get-SPEnterpriseSearchServiceInstance -Identity $<host n>

     

     

    检索活动搜索拓扑

    $ssa = Get-SPEnterpriseSearchServiceApplication

    $active = Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa

    $active

     

    检索活动搜索拓扑列表

    $ssa = Get-SPEnterpriseSearchServiceApplication

    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

    Get-SPEnterpriseSearchComponent -SearchTopology $active

     

    克隆活动搜索拓扑

    $ssa = Get-SPEnterpriseSearchServiceApplication

    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

    $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active

     

     

    添加搜索管理组建

    New-SPEnterpriseSearchAdminComponent

     

    添加查询分析组建

    New-SPEnterpriseSearchAnalyticsProcessingComponent

     

    添加内容管理组建

    New-SPEnterpriseSearchContentProcessingComponent

     

    添加爬网组建

    New-SPEnterpriseSearchCrawlComponent

     

    添加查询分析组建

     New-SPEnterpriseSearchQueryProcessingComponent

     

    移除搜索组件

    Remove-SPEnterpriseSearchCrawlComponent -Identity <component id> -SearchTopology $clone

     

    激活拓扑

    Set-SPEnterpriseSearchTopology -Identity $clone

  • 相关阅读:
    jquery选择器详解
    git discard when composer update
    ASCII码、HEX、字符、BCD 等等 基础知识思考
    中文汉字占二个字节还是三个字节长度
    php二分查找的两种实现方法
    windows下运行多个版本node.js
    NodeJS
    Error in library(qcc) : there is no package called 'qcc'
    jquery网络引用地址(收藏)
    实现二分查找
  • 原文地址:https://www.cnblogs.com/masterlonely/p/3824613.html
Copyright © 2011-2022 走看看