-
Notifications
You must be signed in to change notification settings - Fork 1
Description
#115 set index: false on the top-level geometry object, useful for when we're indexing place records directly. That PR improved performance on the Typesense side but it also reduced the payload size of the results list sent to Core Data Places because TS sends metadata related to indexed fields in the payload.
However, the schema setting from that PR doesn't work for the nested geometry fields that are put in the index when indexing non-place records that contain related places.
I worked on this (i.e. fought with Typesense) a bit today and it seems like getting this to work relies on dealing with some fussy TS behavior that isn't well-documented.
One idea I thought of while writing this: I think nested fields might inherit the index setting of their top-level parent. So a nested relationship 6c58f6af-94e9-48ac-941c-498e85ab3362 with index: true will pass that setting down to 6c58f6af-94e9-48ac-941c-498e85ab3362.geometry and 6c58f6af-94e9-48ac-941c-498e85ab3362.geometry.coordinates, etc. The initial 6c58f6af-94e9-48ac-941c-498e85ab3362 gets index: true because of the wildcard setting. I think TS supports regex in wildcard field names, so it might be possible to have different default settings for fields with UUID names.