- Issue created by @andrewbelcher
- 🇦🇹Austria drunken monkey Vienna, Austria
I’m pretty sure creating a custom datasource is the correct and most promising way to implement this. The datasource plugin is what defines what constitutes an “item” in the index, and if your items aren’t entities but just parts of them then it seems you’ll need a custom datasource plugin to do that. Otherwise you’re almost guaranteed to run into conflicts with the item IDs which some parts assume to refer to whole entities (or, rather, translations) while other parts are changed to actually handle just entity chunks.
I think adapting the configuration UI in a way that makes it as clear as possible is a relatively simple task in this context. You could, e.g., instead of providing a new datasource just override the plugin class used by the
entity:*
datasources and then maybe (if you need both the normal and this special “chunked” functionality) provide an option switching between the handling of whole entities and chunking them.One potential pitfall is that it sounds like editing a node to make the body text longer/shorter might change the number of chunks this node will be split into? That would mean issuing
trackItemsInserted()
/trackItemsDeleted()
calls for those chunks in the update hook, which could be a bit confusing. But nothing that can’t be handled, I’d say, as long as you’re aware of it. Automatically closed - issue fixed for 2 weeks with no activity.