Maybe I'm missing something. I currently have code up in CF 5 as such:
<CFSEARCH name="results" collection="#request.collections#"
criteria="#request.searchstring#">
where request.collections can contain more than one collection, and it
searches all of them. I just tested this and it works fine.
Has something changed in MX or RedSky? Or is this just a problem of habit
making people look for complicated solutions?
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: webguy [mailto:[EMAIL PROTECTED]
: Sent: Friday, August 22, 2003 11:08 AM
: To: CF-Talk
: Subject: RE: Arrrgh, this is driving me crazy, and I know it's so simple
: to do...
:
:
: To be reallt cool , create a cfc, that allows you to n amount of
: collections
:
: [psuedocode time ]
:
: <cfcomponent>
: <cfset collections = ArrayNew(1) />
:
: <cffunction name="addCollection">
: <cfargument name="Collection" >
: add collection to collections Array
: </cffunction>
:
: <cffunction name="query">
: <cfargument name="criteria " />
: <cfloop from=1 ...
:
: <cfsearch
: name = "#collections[i]#_results"
: collection = "collections[i]"
: />
:
:
:
:
: </cfloop>
:
: <cfquery ..name="fullresults">
: <!--- merge collections results --->
: <cfloop over collections ...
: SELECT *, CollectionName AS
: '#collections[i]#_results' FROM
: #collections[i]#_results
: UNION
: </cfloop>
: order by score
: </cfquery>
:
: <cfreturn fullresults/>
: </cffunction>
:
:
: </cfcomponent>
:
: x = my.cfc
: x.addcollection("whatever1")
: x.addcollection("whatever2")
: rs = x.query("<wildcard>`film{ing,ed}`")
:
: WG
:
:
:
:
: -----Original Message-----
: From: Jeff [mailto:[EMAIL PROTECTED]
: Sent: 22 August 2003 15:40
: To: CF-Talk
: Subject: Re: Arrrgh, this is driving me crazy, and I know it's so simple
: to do...
:
:
: on 8/22/03 10:32 AM, webguy at [EMAIL PROTECTED] wrote:
: > why not do this
: >
: > 1. Query a verity collection, return the results as "key, title, body"
: (also
: > get back a score)
: >
: > 2. Query a 2nd verity collection, return the results as "key,
: title, body"
: > (also get back a score)
: >
: >
: > <cfquery >
: > SELECT * FROM Query1
: > UNION
: > SELECT * FROM Query2
: > order scores desc
: > </cfquery>
:
: Okay, I haven't even tried it yet, but I damn near fainted when I
: saw it...I
: KNEW it would be something easy like this. I KNEW it!
:
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm