The shallow_user type contains only fields that are "fast" to fetch, as it's always returned as a member of other (potentially expensive to fetch) types.
Accordingly, we can't add any fields to shallow_user
that aren't "fast" and in generally, won't add things that aren't really commonly needed. I don't think the last_access_date
is required often enough to take the perf hit.
As to the reason for separate user and shallow_user types, if we didn't have them it'd be far too easy to craft queries that include too much of users to be reasonable to execute (trivial example, /search
with a tag and all user fields would hit something like 5 tables in the cache-miss case on top of actually running the search).
We could use filters I suppose, but we'd be in an awkward situation where certain combinations of fields would have to be forbidden. Simpler to just have a different type, at least in my opinion.
user
. This is exactly the problem filters solve. Please Kevin can we get rid of the shallow_user?shallow_user
object for now. How would I retrieve the full user object in a/search
query using filters?accept_rate
andlast_access_date
fields but not thereputation
field. So rather than asking for fields to copied from the user object to shallow_user you can just untick the fields you don't want. The same also goes for network_user./search
query returned the full user object - yeah I missed that part. I don't think what you're asking for will be feasible. To be honest, I don't see them even adding the field I wanted. I don't know how their stuff is structured in the backend, but I can imagine that it will be very expensive to return a full user object with each (relevant) query.shallow_user
object in the first place. Then again, this could all be heresay :)