Hi Kunal,
(You're probably going to get quite a few replies on this question,
as search operations are fundamental to any spectra app).
I'm guessing that you've either used/extended the user profile type,
or simply created a new subscriber type. Either way, to find whether a
user/subscriber exists, you'll want to find them by email, and possibly
name. There are three ways to search for content in spectra, and of course,
each of these ways requires you to first design the type appropriately to
accommodate each kind of search. Your situation sounds like you want to use
"a property search" and not a "index search" nor a "metadata search". The
reason for this is that you want a direct match for a specific user, rather
than finding users "like this criteria".
You should ensure that the name property(ies) and email property
SEARCHABLE, and then use cfa_contentObjectFind. "Searchable" means that the
so marked properties are duplicated in the spectra properties table in the
ContentObject Database (CODB) so that each object (which is serialized into
wddx in the database) doesn't have to be deserialised to be searched, but
rather a simple SQL query can be performed on the properties table behind
the scenes.
You could write this SQL query yourself, and some people used to in
earlier version of spectra, but in 1.5.1 cfa_contentObjectFind has been
upgraded and should return a result quite efficiently.
As for the other types of searches in spectra, (which are not suggested for
your particular solution)...
If you were to "index" these properties, spectra would copy this
information into a Verity Collection and you could use cfa_typeSearch or
cfa_contentObjectFind, BUT, indexes are really intended for "long-text"
searches, where you want to find the word "Australia" in a paragraph, rather
than find a user with the email address "[EMAIL PROTECTED]". You have to
mark a property to be "indexed" before a collection is created for it.
Metadata is a third possibility for searching, but that should be
reserved for finding "kinds of" subscribers, such as those categorized as
"being interested in Java" with the Keyword "JAVA" etc.. this is also based
on verity collections, and should never be used to find "specific objects"
but rather "groups of objects".
Regards,
Peter
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 8:54 PM
> To: Spectra-Talk
> Subject: Email Subscription List
>
>
> Hi Everyone,
>
> I am trying to create a simple email subscription function in spectra.
>
> So far users can subscribe. WHen they subscribe an object is
> created for
> that user with properties such as name, email, preferences etc.
> Now I need some way to search through the users when they subscribe or
> unsubscribe to see if they exist. I have tried
> cfa_contentobjectfind and
> cfa_alltypesearch but I think the object needs to be indexed
> for it to be
> searchable.
>
> Does anyone have any hints on how to build this functionality into
> spectra??
>
> Thanks,
> Kunal Bhatia
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.