How to create multiple index on two fields in google Objectify which should not be included in update and create request?

165 views Asked by At

I want to create multiple index in an entity on ID and creation date There is one condition i dont want to use these index on update and create of that object I am using Google objectify I will use these multiple index in my search query Please help?

1

There are 1 answers

1
jirungaray On

Objectify has a feature called partial indexes , which define conditions that a certain property has to meet in order to get indexed.

You could hack that so that those indexed fields are only indexed if a given attribute (ej lastOperation) is not create or update.

Bear in mind tampering with index updates might lead to invalid query results as the index records (used for search) wont match the actual entity values.