No, I mean make up a field in your POJO that _is_ indexed and automatically
populate it with the value you want to index.  A very crude example is
something like this:

class Person {
   // ...
   String name;
   @Index String nameNormalized;

   public void setName(String value) {
      name = value;
      nameNormalized = value.toLowerCase();
   }
}

Now you can filter by nameNormalized and voila, you have case-insensitive
queries.

You might have to get imaginative about how you create these synthetic
indexes, of course - especially when you have nested layers of collections
of EmbeddedEntity. But you should be able to figure out something that will
work.

Jeff


On Sat, May 4, 2013 at 11:08 PM, xybrek <xyb...@gmail.com> wrote:

> Ok I see, when you say synthetic index, do you mean create a Index kind on
> a different namespace?
>
> Xybrek
>
>
> On Sunday, May 5, 2013 1:42:55 PM UTC+8, Jeff Schnitzer wrote:
>
>> EmbeddedEntity fields are not indexable. This is mentioned in the
>> javadocs:
>>
>> https://developers.google.com/**appengine/docs/java/javadoc/**
>> com/google/appengine/api/**datastore/EmbeddedEntity<https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/EmbeddedEntity>
>>
>> This doesn't prevent you from making your own synthetic index in the
>> top-level Entity though.
>>
>> Jeff
>>
>>
>>
>> On Sat, May 4, 2013 at 8:24 PM, xybrek <xyb...@gmail.com> wrote:
>>
>>> I have few question regarding Query'ing EmbeddedEntity with GAE
>>> datastore:
>>>
>>>    - Is EmbeddedEntity query-able? and Index-able?
>>>    - If so, then how to index such embedded entity?
>>>    - Does Query, query Filter works with EmbeddedEntity
>>>    - And that can we build queries that query Entity then filter its
>>>    EmbeddedEntities
>>>
>>> I've searched the docs by can't seem to find any clear answer to these
>>> question.
>>>
>>> http://stackoverflow.com/**questions/16380962/query-**embedded-entities<http://stackoverflow.com/questions/16380962/query-embedded-entities>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google App Engine" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to google-appengi...@**googlegroups.com.
>>> To post to this group, send email to google-a...@googlegroups.**com.
>>>
>>> Visit this group at http://groups.google.com/**
>>> group/google-appengine?hl=en<http://groups.google.com/group/google-appengine?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to