Re: Searching Question
Re: Searching Question
- Subject: Re: Searching Question
- From: Don Lindsay <email@hidden>
- Date: Fri, 2 Oct 2009 20:48:13 -0400
Hello Chuck;
Thanks for your answer:
Querying millions of records on each login might present a
performance problem regardless of how you do it. You may want to
consider caching this or only doing it on demand. A regular
WODisplayGroup may kill your app if there are lots of matches. In
that case, ERXBatchingDisplayGroup from Wonder is what you want to
be using.
True, there are other possibilities. I can create a materialized view
in the database and represent it in my eomodel with a TOMany
relationship I guess. That would put the processing onto the database
side.
Using the ERXBatchingDisplayGroup, how does this differ from a
standard WODisplayGroup? It does batches as well, although the
ERXBatchingDisplayGroup may perform filtering in a different way?
I create my qualifiers in code typically, although I have used the
QueryMatch Dictionary and a component from time to time.
Don
On Oct 2, 2009, at 6:41 PM, Chuck Hill wrote:
On Oct 2, 2009, at 2:27 PM, Don Lindsay wrote:
Hello;
I know I have asked many questions this week. :) This is the first
time I have attempted a search of this magnitude in WebObjects. I
have users who are able to specify a parameter. For instance the
gauge of a steel pipe (.357), I want them to be able to enter a
default variance (.010) to apply to any query they run and be able
to return the results ( would end up as between .347 and .357.)
I can use QueryMin and QueryMax and java code, but that seems not
very WOish (requires too much work and WO typically doesnt require
alot of work).
The query would be run against thousands to millions of records and
return matching items. Presenting the user with items that fall
within their variance when they login to the application (and
display them 10 at a time using a WORepetition).
Querying millions of records on each login might present a
performance problem regardless of how you do it. You may want to
consider caching this or only doing it on demand. A regular
WODisplayGroup may kill your app if there are lots of matches. In
that case, ERXBatchingDisplayGroup from Wonder is what you want to
be using.
I know how to do this in SQL, but would prefer to use the
WebObjects methodology to accomplish this goal. Any ideas or
suggestions?
How are you setting up your display groups now? When I use them, I
usually do it in code. You can just make a qualifier like:
EOQualifier guageInRange = new EOAndQualifier(
new NSArray(EOQualifier[]{
new EOKeyValueQualifier("guage",
EOQualifier.QualifierOperatorGreaterThanOrEqualTo, target - variance),
new EOKeyValueQualifier("guage",
EOQualifier.QualifierOperatorLessThanOrEqualTo, target | variance),
});
Or, if you are using Wonder's ERXQ, write the same thing with a lot
less typing:
EOQualifier guageInRange =
ERXQ.and(ERXQ.greaterThanOrEqualTo("guage", target - variance),
lessThanOrEqualTo("guage", target | variance));
Chuck
--
Chuck Hill Senior Consultant / VP Development
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