You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
Datastore automatically makes builtin indexes for every field, even if we never make requests using that field (as in adding filters to the Query object, not by going through all the entries with Java code).
The problem is that for the fields that have long, complicated content (i.e. description and ingredients) the index grows very fast.
It is normal that an index is bigger than the content it spans over (especially in small databases), but our indexes are excessive: for 13 entries that take 3.44 KB of space we have 22.41KB of indexes. 15.38KB of these indexes are for the description and ingredients fields, and we can drop those as we're not using them.
To avoid making indexes for these fields, we can use setExcludeFromIndexes() while writing new data. That means that not only do we need to add that to our Java code, we also need to re-do (delete and add again) all existing entries for that to work fully.