CFSEARCH Solr 集合限制
我已将基于 Verity 的 CFSEARCH 解决方案迁移到基于 Solr 的 CFSEARCH 解决方案,并发现 Solr 在搜索多个集合时并未返回所有结果。我将通过运行单独的 CFSEARCH 调用并合并我的结果来解决这个问题,但想知道是否存在更好的解决方法,允许仅通过一个 CFSEARCH 调用来工作。不返回正确结果的代码非常简单:
<CFsearch NAME="EMCSearch"
COLLECTION="apropos,certegy,cmco,conoco,contracts,corpbadge_pki,cust_train,delft_dc,documentation_help,dsvcs,grti,gts,infosys,mgmt_tools,pers,processes,scc,sd,slb,srv_desc,tips,voip,WAN_Work_Procedures,west"
CRITERIA="#LCase(searchfor)#">
返回 23 个结果的记录计数。但是,如果我将其更改为这样,我得到的合并记录数为 76:
<cfset lstCols = "apropos,certegy,cmco,conoco,contracts,corpbadge_pki,cust_train,delft_dc,documentation_help,dsvcs,grti,gts,infosys,mgmt_tools,pers,processes,scc,sd,slb,srv_desc,tips,voip,WAN_Work_Procedures,west" />
<cfloop list="#Variables.lstCols#" index="Col">
<CFsearch NAME="EMCSearch"
COLLECTION="#Col#"
CRITERIA="#LCase(searchfor)#">
</cfloop>
I have migrated a Verity based CFSEARCH solution over to Solr based CFSEARCH solution and finding that Solr is not returning all results when searching against multiple collections. I am going to work around this via running separate CFSEARCH calls and consolidating my results but wanted to know if a better work around exists that would allow things to work via just one CFSEARCH call. Code that does not return the proper results is pretty simple:
<CFsearch NAME="EMCSearch"
COLLECTION="apropos,certegy,cmco,conoco,contracts,corpbadge_pki,cust_train,delft_dc,documentation_help,dsvcs,grti,gts,infosys,mgmt_tools,pers,processes,scc,sd,slb,srv_desc,tips,voip,WAN_Work_Procedures,west"
CRITERIA="#LCase(searchfor)#">
That returns a record count of 23 results. If I however change things to this I get a combined record count of 76:
<cfset lstCols = "apropos,certegy,cmco,conoco,contracts,corpbadge_pki,cust_train,delft_dc,documentation_help,dsvcs,grti,gts,infosys,mgmt_tools,pers,processes,scc,sd,slb,srv_desc,tips,voip,WAN_Work_Procedures,west" />
<cfloop list="#Variables.lstCols#" index="Col">
<CFsearch NAME="EMCSearch"
COLLECTION="#Col#"
CRITERIA="#LCase(searchfor)#">
</cfloop>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论