I am a little confused by some GAE docs. Although I intend to add indexes to optimize the performance of my application, I wanted to get some clarification if they are offered only for this purpose or if they are really necessary.
Queries cannot find property values that are not indexed. This includes properties marked as not indexed, as well as properties with a long text value (Text) or a long binary value type (Blob).
A query with a filter or sort order by property will never correspond to an object whose value for the property is text or Blob, or which was written with this property, marked as not indexed. Properties with these values behave as if the property is not set, taking into account the filter and sort order for the query.
from http://code.google.com/appengine/docs/java/datastore/queries.html#Introduction_to_Indexes
The first paragraph makes me think that you simply cannot sort or filter non-indexed properties. However, the second paragraph makes me think that this restriction is limited only to Text or Blob properties or properties specifically annotated as unindexed.
I am interested in learning about the difference because I have numeric and string fields that I am currently sorting / filtering out in a production environment that is not specified. These requests are executed in a background job that basically does not care about performance (most likely, it will be optimized for size / cost in this view). Am I somehow just lucky that they are returning the correct data?
source share