What about list properties? You are using Java, so you could define an enum
for a specialty and created a persistable Set field of enums.

enum Specialty {
   RADIOLOGY, ONCOLOGY
}

@Persistence
Set<Specialty> specialties;

Since it looks like you are only matching || and && filters, you should be
mostly okay. You'll want to read documentation carefully if you plan on
using inequality filters:

http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html



On Mon, Jan 11, 2010 at 9:09 AM, Mauricio Desiderio <
[email protected]> wrote:

> Hello everyone.
>
> I am trying to figure out a way so support an advanced search need
> that we have using JDO in Google Apps. Here is the scenario:
>
> Imagine we have a Doctor object as follows:
>
> Doctor
>  Key
>  Name
>  List of specialties (could be a list of strings)
>  Location (to keep it simple city and state)
>
> Suppose we have 20,000 doctors in the database, and my user needs to
> be able to do advanced searches based on specialty and location at the
> same time, including all or including any of the specified. E.g.:
>
> - All doctors specialized in <neurology and oncology> in the <Chicago
> or Milwaukee> area
> - All doctors specialized in <cardiology or neurology or
> physiotherapy> in <Aurora>
>
> Note: I only need to return the first 1000 that match the search.
>
> I have tried a few different approaches but none had a satisfactory
> performance* and supported all scenarios
>
> * By satisfactory performance I mean measuring only the query, under
> one second.
>
> I would really appreciate any input.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Reply via email to