Skip to content

Commit a23d8f9

Browse files
committed
Merge pull request #412 from ajkannan/datastore-index-link
Add link about datastore indexing in docs
2 parents d8a6159 + 8808c54 commit a23d8f9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

gcloud-java-datastore/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ while (results.hasNext()) {
128128
}
129129
```
130130

131+
Cloud Datastore relies on indexing to run queries. Indexing is turned on by default for most types of properties. To read more about indexing, see the [Cloud Datastore Index Configuration documentation](https://cloud.google.com/datastore/docs/tools/indexconfig).
132+
131133
#### Complete source code
132134

133135
Here we put together all the code shown above into one program. This program assumes that you are running on Compute Engine or from your own desktop. To run this example on App Engine, simply move the code from the main method to your application's servlet class.

gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Query.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
* A Google Cloud Datastore query.
3636
* For usage examples see {@link GqlQuery} and {@link StructuredQuery}.
3737
*
38+
* Note that queries require proper indexing. See
39+
* <a href="https://cloud.google.com/datastore/docs/tools/indexconfig">
40+
* Cloud Datastore Index Configuration</a> for help configuring indexes.
41+
*
3842
* @param <V> the type of the values returned by this query.
3943
* @see <a href="https://cloud.google.com/datastore/docs/concepts/queries">Datastore Queries</a>
4044
*/

0 commit comments

Comments
 (0)