• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: searching for a word
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: searching for a word


  • Subject: Re: searching for a word
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Sun, 8 May 2005 11:15:38 +0200

Hi...


On May 07, 2005, at 19:34, Michael Warner wrote:

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
This is ok I think.... I use the wildcard the same way and it works fine.
		EOQualifier qual = EOQualifier.qualifierWithQualifierFormat
		("resourceKeywords caseInsensitiveLike %@
          OR resourceKeywords caseInsensitiveLike %@
          OR resourceKeywords caseInsensitiveLike %@",args);
I don't think you need all those qualifications. I think you can pass an array of a couple arguments and make it work like
EOQual.qualWithQualFormat("ResourceKeywords caseInsensitiveLike %@", args);


and that eof will create a qualification including all the arguments in args. I saw this in one part of the documentation, but couldn't point you anymore... Not in the JavaDocs. I found that part (argument handling) not so in-depth explained. Try it out!

Question 1: Am I using the wildcard * correctly? If no, what is the correct syntax?
Yup. Think so.

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.

Florijan




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

_______________________________________________ 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
  • Follow-Ups:
    • Re: searching for a word
      • From: "Graham Cruse" <email@hidden>
References: 
 >searching for a word (From: Michael Warner <email@hidden>)

  • Prev by Date: WPO Cannot run book examples anymore w 5.2.4/Tiger
  • Next by Date: Re: searching for a word
  • Previous by thread: searching for a word
  • Next by thread: Re: searching for a word
  • Index(es):
    • Date
    • Thread