GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Datastore Entity Builder: Support unindexed properties · Issue #158 · googleapis/google-cloud-java

Datastore Entity Builder: Support unindexed properties #158

New issue
Copy link
New issue
Copy link
Closed
Closed
Datastore Entity Builder: Support unindexed properties#158
Copy link
Assignees
simon-temple
Labels
🚨 criticalP0 critical issue. Requires immediate fixtriage meI really want to be triaged.

Description

@simon-temple
simon-temple
opened on Sep 9, 2015
Issue body actions

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 )

Activity

  1. simon-temple commented on Sep 9, 2015

    @simon-temple
    simon-temple
    on Sep 9, 2015
    Author
    More actions

    This looks like a change to all classes that extend Value:
    BlobValue, StringValue, BooleanValue etc.
    to expose the Value.indexed attribute

  2. aozarov commented on Sep 9, 2015

    @aozarov
    aozarov
    on Sep 9, 2015
    Contributor
    More actions

    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

  3. simon-temple commented on Sep 9, 2015

    @simon-temple
    simon-temple
    on Sep 9, 2015
    Author
    More actions

    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!

  4. simon-temple
    closed this as completedon Sep 9, 2015
  5. volgin commented on May 4, 2016

    @volgin
    volgin
    on May 4, 2016
    More actions

    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?

  6. eddavisson commented on May 4, 2016

    @eddavisson
    eddavisson
    on May 4, 2016
    More actions

    The Cloud Datastore API currently requires that each individual value in the list sets excludeFromIndexes(true).

  7. volgin commented on May 4, 2016

    @volgin
    volgin
    on May 4, 2016
    More actions

    I just tried it - the property is still indexed in the Datastore.

  8. eddavisson commented on May 4, 2016

    @eddavisson
    eddavisson
    on May 4, 2016
    More actions

    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.

  9. volgin commented on May 4, 2016

    @volgin
    volgin
    on May 4, 2016
    More actions

    I created 20 new entities using this code:

    IncompleteKey playlistKey = IncompleteKey.builder(PROJECT, "PL").build();
    FullEntity.Builder<IncompleteKey> playlistBuilder = FullEntity.builder(playlistKey);
    playlistBuilder.set("title", StringValue.builder(playlistName).excludeFromIndexes(true).build());
    
    Builder recordingsBuilder = ListValue.builder();
    for (Long recording : recordings) {
        recordingsBuilder.addValue(LongValue.builder(recording).excludeFromIndexes(true).build());
    }
    playlistBuilder.set("recordings", recordingsBuilder.build());
    datastore.add(playlistBuilder.build());
    

    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.

  10. eddavisson commented on May 4, 2016

    @eddavisson
    eddavisson
    on May 4, 2016
    More actions

    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.

  11. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨 criticalP0 critical issue. Requires immediate fix
    on Apr 6, 2020
  12. JustinBeckwith
    assigned
    simon-temple
    on Feb 1, 2021
  13. github-actions
    added 3 commits that reference this issue on Jun 23, 2022

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    8e48e49

    chore: regenerate README (googleapis#158)

    9777b88

    chore(main): release 1.2.0 (googleapis#160)

    d678418
  14. github-actions
    added a commit that references this issue on Aug 16, 2022

    chore(deps): update dependency com.google.cloud:google-iam-admin to v…

    745a6aa
  15. github-actions
    added 2 commits that reference this issue on Sep 15, 2022

    chore(main): release 1.1.6-SNAPSHOT (#158)

    f2ca732

    chore(main): release 0.6.0 (#158)

    eb18947
  16. github-actions
    added a commit that references this issue on Sep 30, 2022

    chore(main): release 1.3.3 (#164)

    0431ab4
  17. chingor13
    added a commit that references this issue on Jan 6, 2026

    build(deps): update dependency org.apache.maven.plugins:maven-project…

    0f09c02
  18. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore(deps): update dependency com.google.cloud.samples:shared-config…

    4025bb7
  19. suztomo
    added a commit that references this issue on Mar 30, 2026

    build(deps): update dependency org.codehaus.mojo:build-helper-maven-p…

    f2faea9
  20. lqiu96
    added a commit that references this issue on Apr 1, 2026

    build(deps): update dependency org.codehaus.mojo:build-helper-maven-p…

    7fe83a7
  21. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore(regen): isolate gRPC change (#158)

    6cca399

    chore(regen): isolate gRPC change (#158)

    4b99726
  22. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore(regen): Re-generated to pick up changes in the API or client li…

    fbf8ffb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @simon-temple
    simon-temple

Labels

🚨 criticalP0 critical issue. Requires immediate fixtriage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.