Apache ManifoldCF 与 Solr 4.x 集成教程

Apache ManifoldCF 与 Solr 4.x 集成教程

manifoldcf-integration-solr-4.xMirror of Apache ManifoldCF solr-4.x Integration项目地址:https://gitcode.com/gh_mirrors/ma/manifoldcf-integration-solr-4.x

1. 项目的目录结构及介绍

Apache ManifoldCF 与 Solr 4.x 的集成项目主要包含以下目录和文件:

  • trunk: 主开发分支,包含最新的开发代码。
  • branches: 包含多个分支,如 release-0.2-branch, release-0.3-branch 等,每个分支对应不同的版本。
  • tags: 包含多个标签,如 release-2.2-RC0, release-2.1 等,每个标签对应一个版本的发布。
  • solrconfig.xml: Solr 的配置文件,用于配置搜索组件和查询解析器。
  • schema.xml: Solr 的 schema 文件,定义了索引数据的结构。

2. 项目的启动文件介绍

在 Apache ManifoldCF 与 Solr 4.x 的集成项目中,主要的启动文件是 Solr 的 solrconfig.xmlschema.xml。这些文件定义了 Solr 实例的配置和数据结构。

  • solrconfig.xml: 这个文件包含了 Solr 的核心配置,如搜索组件、查询解析器、请求处理器等。
  • schema.xml: 这个文件定义了 Solr 索引的字段和类型,以及它们的属性和关系。

3. 项目的配置文件介绍

solrconfig.xml

solrconfig.xml 文件中,可以配置 ManifoldCF 的安全组件和查询解析器。以下是一个示例配置:

<!-- ManifoldCF document security enforcement component -->
<searchComponent name="manifoldCFSecurity" class="org.apache.solr.mcf.ManifoldCFSearchComponent">
  <str name="AuthorityServiceBaseURL">http://localhost:8345/mcf-authority-service</str>
  <int name="ConnectionPoolSize">50</int>
</searchComponent>

<requestHandler name="search" class="solr.SearchHandler" default="true">
  <lst name="appends">
    <str name="fq">[manifoldCFSecurity]</str>
  </lst>
</requestHandler>

schema.xml

schema.xml 文件中,可以定义与 ManifoldCF 相关的字段。以下是一个示例配置:

<field name="allow_token_share" type="string" indexed="true" stored="false" multiValued="true" required="false" default="__nosecurity__"/>
<field name="deny_token_share" type="string" indexed="true" stored="false" multiValued="true" required="false" default="__nosecurity__"/>

注意:__nosecurity__ 是这个插件的默认值,不要忘记包含它。

通过以上配置,可以实现 ManifoldCF 与 Solr 4.x 的集成,确保文档的安全性和搜索功能的正常运行。

manifoldcf-integration-solr-4.xMirror of Apache ManifoldCF solr-4.x Integration项目地址:https://gitcode.com/gh_mirrors/ma/manifoldcf-integration-solr-4.x

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

詹梓妹Serena

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值