1
do solr的custom1,custom2,custom3,custom4屬性是<cfsearch>
嗎?該文件稱他們只用於Verity MATCHES運營商。如何在<cfsearch>
中使用customX與Solr?如何在<cfsearch> w/Solr中使用custom1,custom2,custom3,custom4?
感謝
do solr的custom1,custom2,custom3,custom4屬性是<cfsearch>
嗎?該文件稱他們只用於Verity MATCHES運營商。如何在<cfsearch>
中使用customX與Solr?如何在<cfsearch> w/Solr中使用custom1,custom2,custom3,custom4?
感謝
是的,他們這樣做。以下是一個示例:
構建集合 字符串是列名稱。例如'關鍵字'是查詢「qIndex」中的有效列。
<cfindex collection = "#arguments.collectionName#"
action = "REFRESH"
type = "CUSTOM"
body = "Show_Name, Title"
key = "theKey"
custom1 = "Show_Description"
custom2 = "keywords"
custom3 = "Show_ID"
custom4 = "Asset_ID"
title = "Title"
query = "qIndex"
URLPath = "theURL" />
搜索集合
<!--- Populate the remaining attributes of the cfsearch tag --->
<cfif !structKeyExists(arguments, 'searchArgs')>
<cfset arguments.searchArgs = {
collection = arguments.collectionName
,criteria = "#arguments.term#"
,contextPassages = "1"
,contextBytes = "1024"
,suggestions = "always"
,status = "searchStatus" } />
</cfif>
<!--- Force the name of the result as its referenced only internally --->
<cfset arguments.searchArgs.name = 'qSearchResults' />
<!--- Try to search our collection using Solr --->
<cfsearch attributecollection="#arguments.searchArgs#" />
CUSTOM1:NNNNN就是我一直在尋找,但THX對於這個答案! http://www.coldfusionjedi.com/index.cfm/2009/8/20/Simple-ColdFusion-9-ORMSolr-Example#cE7688874-BD22-6488-43366AA9AE724CF7 – Henry 2010-06-03 17:02:13
對不起,我誤解了。爲了將來參考,以下是直接鏈接到語法概述的文檔:http://help.adobe.com/zh_CN/ColdFusion/9.0/Developing/WS82937B1B-240F-4850-B376-5FD9F911E5E5.html – 2010-06-03 21:54:52