Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datastore Entity Builder: Support unindexed properties #158

Closed
simon-temple opened this issue Sep 9, 2015 · 9 comments
Closed

Datastore Entity Builder: Support unindexed properties #158

simon-temple opened this issue Sep 9, 2015 · 9 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@simon-temple
Copy link

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 )

@simon-temple
Copy link
Author

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

@aozarov
Copy link
Contributor

aozarov commented Sep 9, 2015

@simon-temple
Copy link
Author

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
Copy link

volgin commented 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
Copy link

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

@volgin
Copy link

volgin commented May 4, 2016

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

@eddavisson
Copy link

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
Copy link

volgin commented May 4, 2016

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.

@eddavisson
Copy link

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.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
github-actions bot pushed a commit that referenced this issue Jun 23, 2022
…cies to v2.13.0 (#158)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-shared-dependencies</summary>

### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#&#8203;2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22)

[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0)

##### Dependencies

-   update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#&#8203;709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554))
-   update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#&#8203;713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe))
-   update dependency com.google.api:api-common to v2.2.1 ([#&#8203;710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414))
-   update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#&#8203;701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36))
-   update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#&#8203;711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78))
-   update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#&#8203;708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1))
-   update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#&#8203;712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51))
-   update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#&#8203;703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990))
-   update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#&#8203;705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579))
-   update dependency io.grpc:grpc-bom to v1.47.0 ([#&#8203;707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666))
-   update dependency org.checkerframework:checker-qual to v3.22.1 ([#&#8203;706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39))
-   update dependency org.checkerframework:checker-qual to v3.22.2 ([#&#8203;717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0))
-   update gax.version to v2.18.2 ([#&#8203;718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b))
-   update google.common-protos.version to v2.9.0 ([#&#8203;714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c))
-   update google.core.version to v2.8.0 ([#&#8203;719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d))
-   update iam.version to v1.4.0 ([#&#8203;700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861))
-   update iam.version to v1.4.1 ([#&#8203;716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage-transfer).
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this issue Jun 29, 2022
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this issue Jul 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.2.0](googleapis/java-storage-transfer@v1.1.0...v1.2.0) (2022-07-01)


### Features

* Enable REST transport for most of Java and Go clients ([googleapis#159](googleapis/java-storage-transfer#159)) ([484473a](googleapis/java-storage-transfer@484473a))


### Bug Fixes

* update gapic-generator-java with mock service generation fixes ([googleapis#162](googleapis/java-storage-transfer#162)) ([5b46c0c](googleapis/java-storage-transfer@5b46c0c))


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([googleapis#158](googleapis/java-storage-transfer#158)) ([8e48e49](googleapis/java-storage-transfer@8e48e49))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Aug 16, 2022
…1.2.3 (#158)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-iam-admin](https://togithub.com/googleapis/java-iam-admin) | `1.2.1` -> `1.2.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-iam-admin/1.2.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-iam-admin/1.2.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-iam-admin/1.2.3/compatibility-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-iam-admin/1.2.3/confidence-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-iam-admin).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTMuMCIsInVwZGF0ZWRJblZlciI6IjMyLjE1My4wIn0=-->
github-actions bot pushed a commit that referenced this issue Sep 15, 2022
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Sep 16, 2022
🤖 I have created a release *beep* *boop*
---


## [0.6.0](googleapis/java-bigquerymigration@v0.5.0...v0.6.0) (2022-09-15)


### Features

* Add MySQL dialect to bigquerymigration v2 client library ([#154](googleapis/java-bigquerymigration#154)) ([fa6894c](googleapis/java-bigquerymigration@fa6894c))


### Dependencies

* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#160](googleapis/java-bigquerymigration#160)) ([571b6be](googleapis/java-bigquerymigration@571b6be))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#162](googleapis/java-bigquerymigration#162)) ([3331d43](googleapis/java-bigquerymigration@3331d43))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Sep 30, 2022
🤖 I have created a release *beep* *boop*
---


## [1.3.3](googleapis/java-vmmigration@v1.3.2...v1.3.3) (2022-09-29)


### Dependencies

* Update dependency cachetools to v5 ([#162](googleapis/java-vmmigration#162)) ([673c232](googleapis/java-vmmigration@673c232))
* Update dependency certifi to v2022.9.24 ([#142](googleapis/java-vmmigration#142)) ([40be099](googleapis/java-vmmigration@40be099))
* Update dependency charset-normalizer to v2.1.1 ([#146](googleapis/java-vmmigration#146)) ([c82b8bd](googleapis/java-vmmigration@c82b8bd))
* Update dependency click to v8.1.3 ([#147](googleapis/java-vmmigration#147)) ([99e10f7](googleapis/java-vmmigration@99e10f7))
* Update dependency gcp-releasetool to v1.8.8 ([#143](googleapis/java-vmmigration#143)) ([778f845](googleapis/java-vmmigration@778f845))
* Update dependency google-api-core to v2.10.1 ([#148](googleapis/java-vmmigration#148)) ([7b74afa](googleapis/java-vmmigration@7b74afa))
* Update dependency google-auth to v2.12.0 ([#149](googleapis/java-vmmigration#149)) ([6585870](googleapis/java-vmmigration@6585870))
* Update dependency google-cloud-core to v2.3.2 ([#144](googleapis/java-vmmigration#144)) ([cb815f8](googleapis/java-vmmigration@cb815f8))
* Update dependency google-cloud-storage to v2.5.0 ([#150](googleapis/java-vmmigration#150)) ([89e854a](googleapis/java-vmmigration@89e854a))
* Update dependency google-crc32c to v1.5.0 ([#151](googleapis/java-vmmigration#151)) ([dc88700](googleapis/java-vmmigration@dc88700))
* Update dependency googleapis-common-protos to v1.56.4 ([#145](googleapis/java-vmmigration#145)) ([5c8312d](googleapis/java-vmmigration@5c8312d))
* Update dependency importlib-metadata to v4.12.0 ([#152](googleapis/java-vmmigration#152)) ([c4ffddc](googleapis/java-vmmigration@c4ffddc))
* Update dependency jeepney to v0.8.0 ([#153](googleapis/java-vmmigration#153)) ([d84c437](googleapis/java-vmmigration@d84c437))
* Update dependency jinja2 to v3.1.2 ([#154](googleapis/java-vmmigration#154)) ([6682d82](googleapis/java-vmmigration@6682d82))
* Update dependency keyring to v23.9.3 ([#155](googleapis/java-vmmigration#155)) ([3d1a2d6](googleapis/java-vmmigration@3d1a2d6))
* Update dependency markupsafe to v2.1.1 ([#156](googleapis/java-vmmigration#156)) ([5666a1e](googleapis/java-vmmigration@5666a1e))
* Update dependency protobuf to v3.20.2 ([#157](googleapis/java-vmmigration#157)) ([e422694](googleapis/java-vmmigration@e422694))
* Update dependency protobuf to v4 ([#163](googleapis/java-vmmigration#163)) ([39884b8](googleapis/java-vmmigration@39884b8))
* Update dependency pyjwt to v2.5.0 ([#158](googleapis/java-vmmigration#158)) ([af206d0](googleapis/java-vmmigration@af206d0))
* Update dependency requests to v2.28.1 ([#159](googleapis/java-vmmigration#159)) ([83eb4d1](googleapis/java-vmmigration@83eb4d1))
* Update dependency typing-extensions to v4.3.0 ([#160](googleapis/java-vmmigration#160)) ([9d2cf45](googleapis/java-vmmigration@9d2cf45))
* Update dependency zipp to v3.8.1 ([#161](googleapis/java-vmmigration#161)) ([1ad1a9c](googleapis/java-vmmigration@1ad1a9c))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants