Re: [tw5] Re: search operator word with dash

2020-01-27 Thread trend...@outlook.com
I think I've come up with a solution.

\define list-contain()
<$list filter="[enlist{search/query!!list}]" variable="list">
<$list filter="[tag[myTag]contains:list]" variable="result">
<>

\end

\define list-remove()
<$list filter="[enlist{search/query!!list}]" variable="list">
<$list filter="[tag[myTag]!contains:list]" variable="result">
<>

\end

\define contain-clean()
<$wikify name="input" text=<>>
<$list filter="[enlist:raw] +[sortan[]] +[split[ ]]" variable="list">
<$list filter="[enlist:dedupe]" variable="result">
<>

\end

\define remove-clean()
<$wikify name="input" text=<>>
<$list filter="[enlist:raw] +[sortan[]] +[split[ ]]" variable="list">
<$list filter="[enlist:dedupe]" variable="result">
<>

\end

 Search Results:

<$wikify name="input-1" text=<>  ><$wikify name="input-2" 
text=<>  >
<$list filter="[enlist] +[remove]" variable="result">
<>


It seems to work for both single and multiple searches.

Thanks everyone for helping.

Kind regards, Trend.



From: tiddlywiki@googlegroups.com  on behalf of 
trend...@outlook.com 
Sent: Monday, January 27, 2020 2:12 PM
To: tiddlywiki@googlegroups.com 
Subject: RE: [tw5] Re: search operator word with dash


@ Mark S

This seems like a nice step in the right direction.

I see that the filter is searching for each search term and appending all 
results for each term to a list.



Would it be possible to select only the tiddlers that are mentioned twice (or 
as much as there are search terms) ? I tried but didn’t succeed.





@Mohammad

Very clever thinking. Nice trick! And thanks for the test setup.



Yes I do want the exact search term. But the problem is when using multiple 
search terms.



When using your setup. If I search for term-1 AND term-14 I want the result to 
be tiddler C (having both term-1 AND term-14).



I don’t want the result to be the tiddlers that have term-1 OR term-14 OR both.





@all helping out

//I will take a look at the list field again and see if I can change it to 
something else. // Everybody happy!









--
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
tiddlywiki+unsubscr...@googlegroups.com<mailto:tiddlywiki+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/DBBPR03MB5142ADE5D1407FA4B83D27FDF80B0%40DBBPR03MB5142.eurprd03.prod.outlook.com<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftiddlywiki%2FDBBPR03MB5142ADE5D1407FA4B83D27FDF80B0%2540DBBPR03MB5142.eurprd03.prod.outlook.com%3Futm_medium%3Demail%26utm_source%3Dfooter=02%7C01%7C%7C88c765fa9f92435f4d1008d7a32a98be%7C84df9e7fe9f640afb435%7C1%7C0%7C637157275646647195=S7fqLB2yCaA72vftoji4M1PSApH9M4cuwHmvKHuylb0%3D=0>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/DBBPR03MB51425B623A603604803389A7F80B0%40DBBPR03MB5142.eurprd03.prod.outlook.com.


RE: [tw5] Re: search operator word with dash

2020-01-27 Thread trend...@outlook.com
@ Mark S
This seems like a nice step in the right direction.
I see that the filter is searching for each search term and appending all 
results for each term to a list.

Would it be possible to select only the tiddlers that are mentioned twice (or 
as much as there are search terms) ? I tried but didn’t succeed.


@Mohammad
Very clever thinking. Nice trick! And thanks for the test setup.

Yes I do want the exact search term. But the problem is when using multiple 
search terms.

When using your setup. If I search for term-1 AND term-14 I want the result to 
be tiddler C (having both term-1 AND term-14).

I don’t want the result to be the tiddlers that have term-1 OR term-14 OR both.


@all helping out
//I will take a look at the list field again and see if I can change it to 
something else. // Everybody happy!




-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/DBBPR03MB5142ADE5D1407FA4B83D27FDF80B0%40DBBPR03MB5142.eurprd03.prod.outlook.com.


Re: [tw5] Re: search operator word with dash

2020-01-26 Thread 'Mark S.' via TiddlyWiki
So you have multiple terms in your search, and multiple terms in your list 
field? Try:

<$list filter="[list[search/query!!list]]" variable="listitem"> 
<$list filter="[tag[my-tag]contains:mylist]">


.

The problem with "list" field is that it is tied to tags. Make a tiddler 
"test". Then make a tiddler using "new here" off of test and call it 
"stuff" (it's down on the drop-down menu). Then make another tiddler the 
same way and call it "stuff2".
On "stuff" or "stuff2" click on the tag "test". There will be a dropdown 
list. Click and hold on one of the items in the dropdown list to re-arrange 
it. Now open the "test" tiddler. The "list" field will contain "stuff" and 
"stuff2". This is really useful
behaviour at times, but it's why you might want to use some other field 
(like "mylist" in my example) to contain an array of values. It might not 
make any difference -- it depends on your data. 



On Sunday, January 26, 2020 at 4:38:22 PM UTC-8, tren...@outlook.com wrote:
>
>
> @Mark S
> I tried your solution and it works with 1 search term. But unfortunately 
> not with multiple terms. 
>
> *I started out with the list field because some operations default 
> automatically to it and it is a list. along the way I had to make use of 
> other fields as well. So perhaps I will reconsider using the list field at 
> all. Although at this point it doesn't really matter. But it's always good 
> to have a bit more clarity on that. Thanks!*
>
> Any ideas on the "core problem" search multiple terms strict ?
>
> Kind regards, Trend.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5658ef2a-b166-4ea6-8119-9a182a659e49%40googlegroups.com.


Re: [tw5] Re: search operator word with dash

2020-01-26 Thread trend...@outlook.com
@Tony
I was thinking the same.

I have the terms in the list field of tiddler "search/query". It could be 1 
term or many. Depending on the amount of terms one would like to search.

I don't know how to approach this uncertain scenario. For "each term" do "this" 
search.

Any ideas/directions ?



@Mark S
I tried your solution and it works with 1 search term. But unfortunately not 
with multiple terms.

I started out with the list field because some operations default automatically 
to it and it is a list. along the way I had to make use of other fields as 
well. So perhaps I will reconsider using the list field at all. Although at 
this point it doesn't really matter. But it's always good to have a bit more 
clarity on that. Thanks!

Any ideas on the "core problem" search multiple terms strict ?

Kind regards, Trend.


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/DBBPR03MB514245FFA314412D0E749E4FF80B0%40DBBPR03MB5142.eurprd03.prod.outlook.com.


Re: [tw5] Re: search operator word with dash

2020-01-26 Thread 'Mark S.' via TiddlyWiki
Perhaps something like this:

<$list filter="[tag[my-tag]contains:mylist{search/query!!list}]"> 

.

Note that I changed "list" to "mylist". As PMario hinted, the "list" field 
has a special usage in TW. If any of your term-x fields are used as tags, 
then the "list" field could be accidentally overwritten. So it's probably 
better to use some other field, unless you're read for the consequences.

Good luck!


n Sunday, January 26, 2020 at 12:33:24 PM UTC-8, tren...@outlook.com wrote:

> Hi Mario,
>
> Thank you for your answer.
>
> search/query!!list gathers a number of (different) search terms.  (e.g. 
> term-1 other-15 other-1 category-5)
> The search terms are used to make a list of tiddlers that have at least 
> all those terms in their list field. 
>
> It can be combined with searches for other things like text (in attached 
> notes) it uses the search/query!!text field for this. It is also possible 
> to exclude 1 or 2 terms from the search . And a number of other fields like 
> dates (to select a period) are also part of the "final search results". All 
> different search terms are added to the tiddler "search/query".
>
> I have a "content search" tiddler that makes it easy to add the "terms" 
> (they are like tags in a list field). It is possible to add many 
> tags/terms. 
> Below the input section for the search terms is a list with the search 
> results.
>
> Your solution works for 1 search term. How could I expand it to search for 
> multiple terms ?
>
> Regards, Trend.
>
> ----------
> *From:* tiddlywiki@googlegroups.com  on 
> behalf of PMario 
> *Sent:* Sunday, January 26, 2020 5:49 PM
> *To:* TiddlyWiki 
> *Subject:* [tw5] Re: search operator word with dash 
>  
> Hi, 
>
> Why is your search term stored in a list like: search/query!!list ??
>
> -m
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/124e531d-ba11-4aa8-8cf8-bcd3e479bbbd%40googlegroups.com
>  
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftiddlywiki%2F124e531d-ba11-4aa8-8cf8-bcd3e479bbbd%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter=02%7C01%7C%7Ce2535a914dc24c54cc8608d7a27fbc65%7C84df9e7fe9f640afb435%7C1%7C0%7C637156541810668683=Iq1btI%2F1fwUIEslPuv6C9AN8Ba%2BQaHrsWgP63eg36Ws%3D=0>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/57cacbe1-d03c-4584-a933-74ef15ddc132%40googlegroups.com.


Re: [tw5] Re: search operator word with dash

2020-01-26 Thread TonyM
Trend

Perhaps you need to search once for each term in the list.

Regards
tony

On Monday, January 27, 2020 at 7:33:24 AM UTC+11, tren...@outlook.com wrote:
>
> Hi Mario,
>
> Thank you for your answer.
>
> search/query!!list gathers a number of (different) search terms.  (e.g. 
> term-1 other-15 other-1 category-5)
> The search terms are used to make a list of tiddlers that have at least 
> all those terms in their list field. 
>
> It can be combined with searches for other things like text (in attached 
> notes) it uses the search/query!!text field for this. It is also possible 
> to exclude 1 or 2 terms from the search . And a number of other fields like 
> dates (to select a period) are also part of the "final search results". All 
> different search terms are added to the tiddler "search/query".
>
> I have a "content search" tiddler that makes it easy to add the "terms" 
> (they are like tags in a list field). It is possible to add many 
> tags/terms. 
> Below the input section for the search terms is a list with the search 
> results.
>
> Your solution works for 1 search term. How could I expand it to search for 
> multiple terms ?
>
> Regards, Trend.
>
> --
> *From:* tiddl...@googlegroups.com   > on behalf of PMario >
> *Sent:* Sunday, January 26, 2020 5:49 PM
> *To:* TiddlyWiki >
> *Subject:* [tw5] Re: search operator word with dash 
>  
> Hi, 
>
> Why is your search term stored in a list like: search/query!!list ??
>
> -m
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to tiddl...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/124e531d-ba11-4aa8-8cf8-bcd3e479bbbd%40googlegroups.com
>  
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftiddlywiki%2F124e531d-ba11-4aa8-8cf8-bcd3e479bbbd%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter=02%7C01%7C%7Ce2535a914dc24c54cc8608d7a27fbc65%7C84df9e7fe9f640afb435%7C1%7C0%7C637156541810668683=Iq1btI%2F1fwUIEslPuv6C9AN8Ba%2BQaHrsWgP63eg36Ws%3D=0>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/da9f8ae6-ba27-4052-a7fd-9cc041c2c8fc%40googlegroups.com.


Re: [tw5] Re: search operator word with dash

2020-01-26 Thread trend...@outlook.com
Hi Mario,

Thank you for your answer.

search/query!!list gathers a number of (different) search terms.  (e.g. term-1 
other-15 other-1 category-5)
The search terms are used to make a list of tiddlers that have at least all 
those terms in their list field.

It can be combined with searches for other things like text (in attached notes) 
it uses the search/query!!text field for this. It is also possible to exclude 1 
or 2 terms from the search . And a number of other fields like dates (to select 
a period) are also part of the "final search results". All different search 
terms are added to the tiddler "search/query".

I have a "content search" tiddler that makes it easy to add the "terms" (they 
are like tags in a list field). It is possible to add many tags/terms.
Below the input section for the search terms is a list with the search results.

Your solution works for 1 search term. How could I expand it to search for 
multiple terms ?

Regards, Trend.


From: tiddlywiki@googlegroups.com  on behalf of 
PMario 
Sent: Sunday, January 26, 2020 5:49 PM
To: TiddlyWiki 
Subject: [tw5] Re: search operator word with dash

Hi,

Why is your search term stored in a list like: search/query!!list ??

-m

--
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
tiddlywiki+unsubscr...@googlegroups.com<mailto:tiddlywiki+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/124e531d-ba11-4aa8-8cf8-bcd3e479bbbd%40googlegroups.com<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftiddlywiki%2F124e531d-ba11-4aa8-8cf8-bcd3e479bbbd%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter=02%7C01%7C%7Ce2535a914dc24c54cc8608d7a27fbc65%7C84df9e7fe9f640afb435%7C1%7C0%7C637156541810668683=Iq1btI%2F1fwUIEslPuv6C9AN8Ba%2BQaHrsWgP63eg36Ws%3D=0>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/DBBPR03MB5142A5A22DB2A496393ABA69F8080%40DBBPR03MB5142.eurprd03.prod.outlook.com.