Dear friends,

I want to integrate solr plugin to my website at imchi.info.
1. I've copied types to my types/custom/ folder
2. Copied farSolrSearch folder from plugin folder to webskin/
farSolrSearch
3. i've edited the solrConfig in admin section to my collections path.
4. Successfully created collections with content types i was looking
for.
5. I've created displayPageStandard under webskin/dmInclude, which
contains design of my StandardPage with added section copied from
plugin's displayPageStandard:

<!--- default local vars --->
<cfparam name="stQueryStatus" default="#structNew()#" type="struct" />
<!--- Save hard coded criteria values --->
<cfif structKeyExists(url, "criteria") and len(url.criteria)>
  <cfset form.criteria = url.criteria />
</cfif>
<cfif structKeyExists(url, "lCollections") and len(url.lCollections)>
  <cfset form.lCollections = url.lCollections />
</cfif>
<cfif structKeyExists(form, "criteria") and len(form.criteria)>
  <cfset stProperties = structNew() />
  <cfset stProperties.objectid = stObj.objectid />
  <cfset stProperties.criteria = form.criteria />
  <cfset stproperties.bSearchPerformed = 1 />
  <cfif structKeyExists(form, "operator")>
    <cfset stProperties.operator = form.operator />
  </cfif>
  <cfif structKeyExists(form, "lCollections")>
    <cfset stProperties.lCollections = form.lCollections />
  </cfif>
  <cfset stResult = setData(stProperties="#stProperties#") />
</cfif>
<ft:processForm action="Search">
  <ft:processFormObjects objectid="#stobj.objectid#"
typename="#stobj.typename#" bSessionOnly="true">
    <cfset stproperties.bSearchPerformed = 1 />
  </ft:processFormObjects>
</ft:processForm>
<cfset actionURL = application.fapi.getLink(
        objectid=stobj.objectid,
        view="displaySearch",
        includeDomain=true
) />

<!--- Render the search form and results #application.url.webroot#/
index.cfm?objectid=#stobj.objectid#&view=displaySearch --->
<ft:form name="#stobj.typename#SearchForm" bAjaxSubmission="true"
ajaxMaskMsg="Searching..." action="#actionURL#">

  <!--- Get the search Results --->
  <cfset oSearchService=createobject("component",
"farcry.plugins.farcrysolr.packages.custom.solrService").init() />
  <cfset stSearchResult =
oSearchService.getSearchResults(objectid="#stobj.objectid#",
typename="#stobj.typename#") />
  <skin:view typename="#stobj.typename#" objectid="#stobj.objectid#"
webskin="displaySearchForm" />
  <cfif stSearchResult.bSearchPerformed>
    <skin:view typename="#stobj.typename#" objectid="#stobj.objectid#"
webskin="displaySearchCount" stParam="#stSearchResult#" />
    <cfif len(stSearchResult.searchCriteria)>
      <skin:view typename="#stobj.typename#"
objectid="#stobj.objectid#" webskin="displaySearchSuggestions"
stParam="#stSearchResult#" />
    </cfif>
    <cfif stSearchResult.qResults.recordCount GT 0>
      <skin:view typename="#stobj.typename#"
objectid="#stobj.objectid#" webskin="displaySearchResults"
stParam="#stSearchResult#" />
    </cfif>
    <cfelse>
    <skin:view typename="#stobj.typename#" objectid="#stobj.objectid#"
webskin="displaySearchNoCriteria" stParam="#stSearchResult#" />
  </cfif>
</ft:form>

Now when i am trying to search anything it gives me an error like
this:
Element LCOLLECTIONS is undefined in STSEARCHFORM.
C:\inetpub\wwwroot\farcry\plugins\farcrysolr\packages\custom
\solrService.cfc (line: 532)
C:\inetpub\wwwroot\farcry\projects\chi\webskin\dmInclude
\displayPageStandard.cfm (line: 65)


532\solrService.cfc:
<!--- setup the collections to search on, this may depend on the form
value passed in on the search results page --->
                <cfif not len(stSearchForm.lCollections) OR
stSearchForm.lCollections EQ "all">
                        <cfset stResult.lCollectionsToSearch = lAllCollections 
/>
                <cfelse>
                        <cfset stResult.lCollectionsToSearch = 
stSearchForm.lCollections />
                </cfif>

65\displayPageStandard.cfm :
<cfset stSearchResult =
oSearchService.getSearchResults(objectid="#stobj.objectid#",
typename="#stobj.typename#") />


What it can be? Please help.

Thanks,
Mika

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry

Reply via email to