Skip to content

Commit

Permalink
AE Datastore Geo: Add index for plain geo query.
Browse files Browse the repository at this point in the history
The Travis build is failing without this.
https://travis-ci.org/GoogleCloudPlatform/java-docs-samples/builds/127329577

The docs at
https://cloud.google.com/appengine/docs/java/datastore/geosearch claim:

    Recall that "ordinary" (non-geospatial) queries require that an index
    exists that contains all the properties in the query and no others. This
    constraint is relaxed for geospatial queries.

But, this does not appear to be correct, at least not for the local
devserver.
  • Loading branch information
tswast committed May 2, 2016
1 parent 0ce8419 commit 2d79581
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<!-- The autoGenerate attribute can be true or false. We set it to false to -->
<!-- allow verification that the index is correct in local tests. -->
<datastore-indexes autoGenerate="false">
<datastore-index kind="GasStation">
<datastore-index kind="GasStation" source="manual">
<property name="location" mode="geospatial" />
</datastore-index>
<datastore-index kind="GasStation" source="manual">
<property name="brand" />
<property name="location" mode="geospatial" />
</datastore-index>
Expand Down

0 comments on commit 2d79581

Please sign in to comment.