开发者

GAE Indexing (all over again)

My GAE app has no indexes in the Datastore Indexes tab, it stores only temporary data in the Blob format (never more than 1 meg, that is, only 1 blob entity), but still, it makes about a thousand Index Writing Ops, and the "used" proportion of the datastore keeps growing.

I know there is a possibilty to purge the indexes by using a command line utility Google provides with the SDK, but is there a way to completely avoid indexing the data that should not be indexed at all? Or at least purge them from the app itself开发者_StackOverflow社区?

UPD: I use Java.


In order to avoid to create useless index on properties your app does not need to filter, you could set to False the indexed parameter of the Property class.

indexed

Whether this property should be included in the built-in and developer-defined indexes. If False, entities written to the datastore will never be returned by queries that sort or filter on this property, similar to Blob and Text properties.

Documentation here.


I found a very simple solution to this thing: you can tell GAE that a certain property should not be indexed by using JDO annotations:

    @Persistent
    @Extension(vendorName = "datanucleus", key = "gae.unindexed", value = "true")
    private Blob b;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜