I have an application that is storing and indexing numeric fields in Google Datastore. Internally these are being created and indexed using Java/Objectify with the Entity that is being persisted annotated with the @Index
annotation for the fields that we wish to search on...
@Index
private Long fieldOne;
@Index
private Long fieldTwo;
All works well until I try to search for entities using these indexed fields. fieldOne
has a value of 5709068098338816
and searching on that works fine using the GQL:
SELECT *
FROM MyEntity
WHERE fieldOne = 5709068098338816
However, fieldTwo has a value of 3572054303678568400
and this is where my issues start. For some reason I am unable to search using this value in either GQL or using objectify. The following GQL returns no results even though I can see the value in google datastore:
SELECT *
FROM MyEntity
WHERE fieldTwo = 3572054303678568400
I can see that this is both stored and indexed in Google Datastore.
My question is this, Is there a limit to the size of an indexed number in Google Datastore? Is it possible that this value is somehow to large to be indexed correctly or could I have missed something else completely? This value is below the maximum Long value so I am not sure what is going on.
Any help would be much appreciated. Cheers!