• 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: qualifierWithQualifierFormat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qualifierWithQualifierFormat


  • Subject: Re: qualifierWithQualifierFormat
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 22 Sep 2005 15:19:52 -0700

I think you pretty much have it.

NSSet stopWords = new NSSet(new String[] {"at", "the", "a", "it"});
String searchString; // assume this exists
NSSet targetWords = new NSSet(NSArray.componentsSeperatedByString (searchString, " ").setBySubtractingSet(stopWords);
NSArray targetWordList = targetWords.allObjects();


Now just run a loop over targetWordList making a qualifier as below. Add them to an array. Use and EOAndQualifier or EOOrQualifier to get the final qualifier.

Or, if you want good performance, Google on 'Lucene'.

Chuck


On Sep 22, 2005, at 3:06 PM, Gino Pacitti wrote:

Hi All

I have a qualifier statement like this:


qualifier = EOQualifier.qualifierWithQualifierFormat ( "prodDescription like %@", qualifierBindings );



and the qualifierBindings

NSArray qualifierBindings = new NSArray ( new String [] { "*"+"hats"+"*" } );

But this only allows me to search the prodDescription with a single word.

How would I create a statement that would allow me to return objects.

I want to create something like:

prodDescription like 'word' OR prodDescription like 'otherword' OR prodDescription like 'someotherword' etc..

I need to take a string and filter out words like 'at', 'the', 'it' etc and then search for prodDescriptions that contain any of the words remaining.


I hope this is clear...

Any help appreciated!!

Gino
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ 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: qualifierWithQualifierFormat
      • From: Arturo PĂ©rez <email@hidden>
References: 
 >qualifierWithQualifierFormat (From: Gino Pacitti <email@hidden>)

  • Prev by Date: qualifierWithQualifierFormat
  • Next by Date: Re: qualifierWithQualifierFormat
  • Previous by thread: qualifierWithQualifierFormat
  • Next by thread: Re: qualifierWithQualifierFormat
  • Index(es):
    • Date
    • Thread