I would let the datastore return the "OR" query and then perform the
union in my application code.

If I thought the OR was going to return a huge number of results (too
large to practically process in a single request) I would start a task-
queue task to fetch the data and then have my front-end check back for
the results later.

personally I think your mega indicies feel a little dirty... but who
am I to judge :)

On Sep 23, 7:56 pm, jorge <[email protected]> wrote:
> It seems to me the only way to perform an AND query on a list property
> (StringListProperty, for example) to match EVERY item in a list is to
> define multiple indexes and use an equality filter (IN doesn't work in
> this case because it performs an OR operation).  For example, I'd like
> my users to be able to perform keyword searches where I return items
> that match all of their keywords.  This resulted in me having to do
> the following:
>
> - kind: InventoryItem
>   properties:
>   - name: in_stock
>   - name: keywords
>   - name: display_order
>
> - kind: InventoryItem
>   properties:
>   - name: in_stock
>   - name: keywords
>   - name: keywords
>   - name: display_order
>
> - kind: InventoryItem
>   properties:
>   - name: in_stock
>   - name: keywords
>   - name: keywords
>   - name: keywords
>   - name: display_order
>
> ...and so on.  This gets a little ugly, and I'm not sure if this is
> the recommended way to do this, but it's the only way I have been able
> to get to work.  Of course, I don't know up front how many keywords my
> users are going to use.  There is a generous index quota limit and
> from the documentation it seems I can do up to 30 filters?  I doubt
> anyone would use that many keywords in a search, I could probably
> safely stop at 10 indexes.
>
> Before I go down this path, I want to make sure there isn't another
> (better?) option available to me.
>
> TIA

-- 
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