I think the issue is happening because you are ordering the results.
Merge join could be used, but it does not currently work with sort
orders.  Alfred Fuller just posted some suggestions on how you might
address this:

http://groups.google.com/group/google-appengine/browse_thread/thread/1d19a1de828f51cc?hl=en#



Robert






On Sat, Sep 25, 2010 at 02:32, Julian Namaro <[email protected]> wrote:
> You can perform an AND query on a ListProperty without a custom index.
> I think it's called merge-join.
> Have you tried InventoryItem.all().filter("keywords =",
> keyword1).filter("keywords =", keyword2).filter(...) ?
>
>
> Julian
> http://www.memobuild.com
>
>
> On Sep 24, 3:56 am, 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.
>
>

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