subfilter within filter, subfilter end sortsub

45 views
Skip to first unread message

Jean-Pierre Rivière

unread,
Apr 29, 2021, 7:25:39 AM4/29/21
to TiddlyWiki
I have some problem with subfilters. I will directly give a simple context where my problem arise.

I have dictionary tiddler named "dico" with 3 indexed value:
a: a1^bazaar
b: b1^advance
c: c1^alert

now comes a testing code within another tiddler:
=================
<$vars partafter="[indexing[dico]split[^]last[]]"
es="[indexing[dico]split[^]search[e]]"
nocs="[indexing[dico]split[^]!search[c]]"
effect="[indexing[dico]]"
>

for the effect of indexing:

* single value : {{{ [[a]indexing[dico]] }}}
* list of values: <$list filter="[[dico]indexes[]subfilter<effect>addprefix[ * ]]"/>

first task: getting the indexes listed according to the part after "^". (b,c,a wanted)

<$list filter="[[dico]indexes[]sortsub<partafter>]"/>

second task: get rid of indexes whose part after the "^" contains any "e" (b,c wanted)

<$list filter="[[dico]indexes[]filter<es>]"/>

third task: get rid of indexes whose part after the "^" doesn't contain any "c" (a,c wanted)

<$list filter="[[dico]indexes[]filter<nocs>]"/>

fourth task: just display the part after the "^" for each entry : (bazaar,advance,alert wanted)

<$list filter="[[dico]indexes[]subfilter<partafter>]"/>

</$vars>
=================

I have included the json export of my indexing.js tiddelr providing thi "indexing" filter (which is a must-have for me).

to sum up: sortsub works as you understand it should.

filter seems problematic with regards to the third objective going wrong. is that an effect of negation?

subfilter seems broken as the "last" filter op operate on the whole not on every sequences.

So my question is: what are my errors? what did I do wrong?

TIA!

-- 
Jean-Pierre
_user_filters_indexing.js.json

Jean-Pierre Rivière

unread,
Apr 29, 2021, 2:01:05 PM4/29/21
to TiddlyWiki
I have developed a dumping filter operator to check what is the tubes inside a filter.

This has shown me that I was just wrong about what the operators were doing.

So, I'm killing this thread here. Don't bother about it!

Reply all
Reply to author
Forward
0 new messages