gpt4 book ai didi

solr - Solr 和 Verity 中相同文件的上下文不一致

转载 作者:行者123 更新时间:2023-12-04 18:09:03 24 4
gpt4 key购买 nike

尝试将服务器从 CF8 更改为 CF10 时,发生了这种情况
在 CF8 中这是搜索代码

<cfsearch 
collection="test_#arguments.cabinetid#"
status="docsearchstatus"
name="docsearch"
criteria='#arguments.filter#'
suggestions="Always"
contextpassages="1"
contextbytes="300"
>
在 CF10 中,我正在使用它。
<cfsearch collection="test_#arguments.cabinetid#"
status="docsearchstatus"
name="docsearch"
criteria='#lcase(arguments.filter)#*'
suggestions="Always"
contextPassages="1"
contextBytes="300"
>
在 verity 中归档的上下文更长且更具描述性。但是在大多数情况下使用 solr 时,上下文是空的。
我尝试对 solr.xml 和其他 solr 配置文件进行一些更改。这里我们动态添加集合。因此无法通过更改配置文件来解决此问题。
有没有人遇到过这个???
结果形式真实性搜索
Result form verity searching
SOLR 搜索结果
Result from SOLR searching

最佳答案

默认情况下,Solr 不会像 Verity 那样填充上下文段落。您需要调整配置 as described here为了打开它。
(完整引用自 Adob​​e 的帮助站点,因为他们一直在更改其 URL。)

To highlight contents in the entire document, modify thesolrconfig.xml and schema.xml files. These files are available in thefollowing locations:

  • <Solr Home>/multicore/template/conf: Modify files in this location toapply the changes to all future Solr collections. <Collection
  • <Collection Directory>/conf: Modify files in this location to apply the changesonly to a particular collection.
  1. Stop ColdFusion Add-on services.

  2. Replace the following section in the solrconfig.xml, in the<requestHandler name="standard" and <requestHandler name="dismax"sections.

    <str name="hl.fl">summary title</str>  

    with

    <str name="hl.fl">contents title</str>
  3. Replace the following section in the schema.xml

    <field name="contents" type="text" indexed="true" stored="false" required="false" multiValued="true" omitNorms="true"/>

    with

    <field name="contents" type="text" indexed="true" stored="true" required="false" multiValued="true" omitNorms="true"/>
  4. Restart Solr (i.e. the ColdFusion Add-on services).

  5. Reindex the collection.

Note: The modifications to solrconfig.xml and schema.xml will increasethe index size.


进行这些更改后,上下文段落应开始显示。

关于solr - Solr 和 Verity 中相同文件的上下文不一致,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19002615/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com