Hi, Ian,

On Mar 13, 2007, at 4:25 AM, [EMAIL PROTECTED] wrote:

Once again thanks Jerry,

I've been thinking about the original code that you so kindly created for
me. I have a few questions relating to that.

Firstly, I have made it do what I want to do by changing it slightly:

qualifiers.addObject(EOQualifier.qualifierWithQualifierFormat ("recordField
= %s", new NSArray(aSearchField));
qualifiers.addObject(EOQualifier.qualifierWithQualifierFormat ("anotherRecordField
= %s", new NSArray(aSearchField));
                        }

so that if a few other attributes for alternative names are added to the database, it searches those too (in an OR type fashion). Seems to work OK, but at the moment it just System.out.printlns the number of records in the
returnedResults array, so I need to figure out how to get the array to
populate my WORepetition.

I'm not sure quite what to suggest here other than that the array returned from the fetch is bound to the "list" binding of the WORepetition and an arbitrary variable of the same type as an element of the array is bound to the "item" attribute.

I'm not sure why, but:

qualifiers.addObject(EOQualifier.qualifierWithQualifierFormat ("recordField
= %s OR anotherRecordField = %s", new NSArray(aSearchField));

Doesn't work. I thought it should, having looked at the EnterpriseObjects
pdf (page 73).

Try qualifiers.addObject(EOQualifier.qualifierWithQualifierFormat ("recordField = %s OR anotherRecordField = %s", new NSArray(new Object [] {aSearchField, aSearchField}));

Since you have two references in the "QualifierFormat", then you need to supply two values in the array.

Lastly, thank you for pointing out the wirehose thing. I'll have a proper
look at that in due course.

It's certainly worth a look.

Regards,
Jerry

Ian.

On Mon, March 12, 2007 10:15 am, Jerry W. Walker wrote:
Hi, Ian,

What you're trying to do is much more sophisticated than what is
being done by the code I sent you. I worked on an application a couple years ago with similar requirements for searching for pictures. In order to meet those requirements, we integrated Gary Teter's WireHose frameworks
and, using them, created an index of pictures with keywords for each
picture.

http://www.wirehose.com/

Wirehose is offered for free and has some sophisticated searching and
indexing built in that, if you use, could save you a few weeks of
programming. Your end result would probably have a higher quality as well, since Teter's code has gone through a few generations of optimization by
one of the WO masters.

I hope you've provided some lengthy estimates to your users, because
this is not a quickly solved problem. Searching is an inherently difficult
problem space.

Regards,
Jerry

--
MacMail - the Webmail service especially for Mac users worldwide
http://www.macmail.com


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    [EMAIL PROTECTED]
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to