You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Datastore Entity Builder: Support unindexed properties #158
Unindexed properties are essential when storing large blob properties as they can exceed the maximum allowed length for indexed values. Using a local gcd I get:
INFO: Exception executing rpc. com.google.apphosting.client.serviceapp.RpcException: Indexed blob value has more than permitted 500 bytes.
I can't see how to select the indexing policy using the EntityBuilder. I guess we need the ability to set the indexed attribute on each Builder.set( String name, Value value, boolean indexed )
I haven't been able to reproduce this in the underlying API. Can you provide details on how you're checking that the property is still indexed?
One thing to note is that calling excludeFromIndexes(true) will only affect the values in the updated entity, not values in entities that were previously inserted.
All entities have "title" property as unindexed and "recordings" property as indexed according to the Datastore viewer in the console. BTW, it's impossible to uncheck "indexed" checkbox for List properties in the console.
Thanks for sharing your code. It looks like this is a bug in the Datastore Viewer. It's using the value of excludeFromIndexes on the overall list (which can only ever be false) instead of looking at the individual values in the list. I've contacted that team about clarifying this in the UI.
Activity
simon-temple commentedon Sep 9, 2015
This looks like a change to all classes that extend Value:
BlobValue, StringValue, BooleanValue etc.
to expose the Value.indexed attribute
aozarov commentedon Sep 9, 2015
You specify the index attribute on the Value
https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/ValueBuilder.java#L30
simon-temple commentedon Sep 9, 2015
Thanks for the help with this. I switched to using a Value.Builder instead of relying on the Entity.Builder to build my Value(s).
Not totally intuitive but this is a young API and examples are minimal... and I'm a newbie!
volgin commentedon May 4, 2016
excludeFromIndexes(true)on a ListValue results in"Exclude from indexes cannot be set on a list value."
Is there a way to exclude a list of values from indexes?
eddavisson commentedon May 4, 2016
The Cloud Datastore API currently requires that each individual value in the list sets
excludeFromIndexes(true).volgin commentedon May 4, 2016
I just tried it - the property is still indexed in the Datastore.
eddavisson commentedon May 4, 2016
I haven't been able to reproduce this in the underlying API. Can you provide details on how you're checking that the property is still indexed?
One thing to note is that calling
excludeFromIndexes(true)will only affect the values in the updated entity, not values in entities that were previously inserted.volgin commentedon May 4, 2016
I created 20 new entities using this code:
All entities have "title" property as unindexed and "recordings" property as indexed according to the Datastore viewer in the console. BTW, it's impossible to uncheck "indexed" checkbox for List properties in the console.
eddavisson commentedon May 4, 2016
Thanks for sharing your code. It looks like this is a bug in the Datastore Viewer. It's using the value of excludeFromIndexes on the overall list (which can only ever be false) instead of looking at the individual values in the list. I've contacted that team about clarifying this in the UI.
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
chore: regenerate README (googleapis#158)
chore(main): release 1.2.0 (googleapis#160)
chore(deps): update dependency com.google.cloud:google-iam-admin to v…
chore(main): release 1.1.6-SNAPSHOT (#158)
chore(main): release 0.6.0 (#158)
chore(main): release 1.3.3 (#164)
build(deps): update dependency org.apache.maven.plugins:maven-project…
chore(deps): update dependency com.google.cloud.samples:shared-config…
build(deps): update dependency org.codehaus.mojo:build-helper-maven-p…
build(deps): update dependency org.codehaus.mojo:build-helper-maven-p…
chore(regen): isolate gRPC change (#158)
chore(regen): isolate gRPC change (#158)
chore(regen): Re-generated to pick up changes in the API or client li…