Jeff, not sure if I can take the approach you said to make a Annotation 
interface, as the object i try to store in the datastore is a Map, more 
specifically JSONObject, it my library binds JSON String, Number, Boolean, 
List and Map directly to Entitiy and EmbeddedEntity...

On Sunday, May 5, 2013 11:46:34 PM UTC+8, Jeff Schnitzer wrote:
>
> 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 <[email protected] <javascript:>>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 <[email protected]> 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 [email protected].
To post to this group, send email to [email protected].
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