Help with a filter - not the behaviour I wanted from limit operator

Hi, I wondered if anyone could help me with the following filter issue?

Background: I wrote a plugin to flag knowledge based tiddlers which are due for a review (read through) based on time interval which is set by the user for each tiddler - so I might want to review a tiddler every 100 days. It’s just a way of making sure that valuable chunks of knowledge stay fresh.

Here is the filter - it is used when I have got behind in my reviewing of tiddlers and have a back log, it just means I set say 200 tiddlers at a time as if I had actually looked at them just so I can clear the backlog - I store review period as a number of days but for simplicity with the days operator it is stored as a negative integer.

<$list filter="[all[tiddlers]!is[system]has:field[last-reviewed3]!days:last-reviewed3{!!interval3}limit[200]]">

So first I test if a tiddler is one that is in the "review scheme’ by testing for the field ‘last-reviewed’ then I test if the tiddler is overdue using the ‘days’ operator and finally in this example I indicate that I only want to remove 200 tiddlers from the backlog.

The problem is that fewer than 200 tiddlers end up being reset, I suspect that this is because the limit operator is doing it’s job earlier in the filter, almost as if 200 tiddlers are being selected and then the other criteria are being applied.

I thought filters were evaluated left to right?

I could choose just to remove the limit filter but I would like to better understand the situation.

Filters are executed from left to right.

You could try this filter: <$list filter="[all[tiddlers]!is[system]has:field[last-reviewed3]!days:last-reviewed3{!!interval3}] +[limit[200]]">

Thanks, unfortunately it seems to have the same behaviour, almost as if the limit operator is being executed out of sequence. When I removed the limit operator all overdue tiddlers were processed as expected - there were no overdue tiddlers after the operation - so it has the correct behaviour, for my own use I may decide simply to do without this refinement it was not really important, I just wanted to see if I was missing some piece of knowledge.

Is it conceivable that the limit operator does not observe the left to right rule I wonder?

Of course there might be something wrong with my code but I would be a bit surprised because of the behaviour when I removed the limit operator, I would expect inconsistencies there as well but the behaviour was as expected.

does it work with a lesser number eg limit[2] ?

what is the value of

<$list filter="[all[tiddlers]!is[system]has:field[last-reviewed3]!days:last-reviewed3{!!interval3}count[]]">