playground: ensure that any inserted snippets do not index the Body property Cloud datastore seems to think that the Body property is indexed, even though at the time of thie writing there are no indexes present for the Snippet entity type. This could be because there are Snippet entities in the datastore where the Body property type is string, which incurs an index. While we wait for a more definitive answer (bug filed internally), set the noindex option on the Body property, even though byte slices are automatically marked as noindex according to the documentation. Fixes golang/go#23253 Change-Id: I68ed193402a9a9140001b19e6cef7d49fa982036 Reviewed-on: https://go-review.googlesource.com/85516 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/share.go b/share.go index 3beea1d..2c783e8 100644 --- a/share.go +++ b/share.go
@@ -23,7 +23,7 @@ ) type snippet struct { - Body []byte + Body []byte `datastore:",noindex"` // golang.org/issues/23253 } func (s *snippet) ID() string {