searching for a word
searching for a word
- Subject: searching for a word
- From: Michael Warner <email@hidden>
- Date: Sat, 7 May 2005 10:34:12 -0700
I have a keyword field that for example has the word 'dog' in it as one, of say, 20 words.
I want to fetch records that contain the separate word 'dog' in this keyword field. At the same time,
records that contain words where the string 'dog' is anywhere embedded in the word, yet do not
contain dog as a separate word, should not be returned.
I tried the following, but got records back where 'dog' was embedded in other words:
args.addObject("dog *"); //if dog is the first word in a set of words
args.addObject("* dog *"); //if dog is a separate word, but not first or last
args.addObject("* dog"); //if dog is the last word
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat
("resourceKeywords caseInsensitiveLike %@
OR resourceKeywords caseInsensitiveLike %@
OR resourceKeywords caseInsensitiveLike %@",args);
Question 1: Am I using the wildcard * correctly? If no, what is the correct syntax?
Question 2: Am I using an efficient approach for this type of search? If no, what is
a better approach, assuming that I don't want to use qualifyDataSource in DisplayGroups?
Thanks,
Mike W.
Michael M. Warner, Ph.D.
Department of Educational Specialties/299
University of Nevada, Reno
Reno, NV 89557-0251
Phone: (775) 784-4383 x2039
Fax: (775) 784-4384
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden