It's a bit hard to explain, what I'm trying to achieve, so I'll try to start with an example:
Let's say I have a journal and on each journalpage I have some data in the frontmatter section like my working times. e.g.
---
starttime: 09:00
endtime: 15:00
---
Now I have some functions to calculate the workingtime for a day. That works fine with queries, too. However, when I have quite a lot days to calculate (e.g. if I want to see the working time for a whole month or even a year), that query runs quite a while.
My idea would be to add kind of "hidden" additional field to the page object, containing the calculated time, so I could access the ready calculated data, e.q. via query that, too.
Adding the field itself should not be a problem (if I understood the index.indexObjects(page, objects) API correctly).
However, I wonder, if it is possible to somehow do the calculation while indexing, as the indexer have to read the page anyway on startup and on page changes.
So is it possible for a user to somehow extend the indexer in that manner?
Thanks for all ideas and / or explanations ![]()
P.S.: Another solution could be to add the calculated data to the frontmatter-section, too. But then I have to update the values on every change, which sounds quite complicated...