Page 1 of 1
combined search, all of tags with eather rating
Posted: 29 Jan 2020 19:47
by rur54
Hi sorry I am writting from phone so dont have exact script I am using on me.
I am using script with html gui to find all selected tags containing either rating 1 or 2 in database.
I am stuck, not sure how to search for it correctly.
When search for
tagA AND tagB
I get all files in database containing "tagA and tagB". That part is good.
But when I search for
tagA AND tagB AND rating 1 OR 2
I expect to get files containing tagA and B with either rating 1 or 2
Insted i get all files containing rating 1 or 2 that contain tagA or tagB and all others that do not have them.
What would be correct syntax for that kind if combined search?
Any lead is appreciated.
Cheers
Re: combined search, all of tags with eather rating
Posted: 29 Jan 2020 20:35
by highend
What exactly is "rating" in this case. Where does it come from?
Re: combined search, all of tags with eather rating
Posted: 29 Jan 2020 21:06
by rur54
Hi, thank you. I am sorry I was not too specific.
Rating can be any extra tags# variable.
I think I have "star ratings" set for ex1, showing in column "rating".
Re: combined search, all of tags with eather rating
Posted: 29 Jan 2020 21:47
by highend
(tags:tagA OR tagB) AND (ex1:1 OR 2)
Re: combined search, all of tags with eather rating
Posted: 29 Jan 2020 22:11
by rur54
Ah thank you. I did not think of ( )...
I will try this once home.
Cheers
Re: combined search, all of tags with eather rating
Posted: 30 Jan 2020 10:06
by rur54
I could not get your example with () working.
My xyplorer version is 20.10
What does work for me is this
goto "*?:ex1:2 AND tags:tagA,tagB /t";
It finds all files containing tag A and B that have two stars only.
I tried and failed:
ex1:2|3
ex1:2;3
(ex1:2 OR 3)
2 | 3 /fld=rating
Do I need to upgrade xyplorer to get () working?
Cheers
Re: combined search, all of tags with eather rating
Posted: 30 Jan 2020 10:47
by highend
This does work (currrent beta):
goto "*?:ex1:(1 | 2) AND tags:(tagA & tagB)";
goto "*?:ex1:(1 | 2) AND tags:(tagA,tagB)";
why the above doesn't work with a trailing " /t"? No clue...
Re: combined search, all of tags with eather rating
Posted: 31 Jan 2020 13:38
by rur54
Thank you.
Your example works perfectly on its own.
I have a question for "NOT tags"
On my form besides tags and stars I have paths, comment, label, and maybe other custom fields and "not contains" inputs.
Prevously with path example I used simply path:*\\some\\path*
With your example I have to make it like path:(*\\some\\path*) otherwise starts scanning whole computer.
This is what I have that works for me
goto "*?:ext1:(1 | 2) AND lbl:(Orange | Blue) AND tags:(tagA,tagB) AND cmt:(something) AND path:(*some\\path\\string*);
Now Blue label has "tagC" I want to filter out but any variation of "NOT" I tried either fails or sets off the whole drive search.
Would help show me the right way to do tags:(!tagC) please?
Cheers
note:
I dont know why but some examples from help file did not work for me either.
Like the one with ?*.txt & (cont:rock | punk)
Re: combined search, all of tags with eather rating
Posted: 31 Jan 2020 14:18
by highend
Would help show me the right way to do tags:(!tagC) please?
Sorry but I don't have that much time to prepare scenarios with a dozen "extra columns|tag|label|path" combinations to find out if a search works correctly.
Apart from that I don't even understand what "Now Blue label has "tagC" I want to filter out" means. A blue label is a label, how can this have a tag at all?...
If you want help on this than create a script that sets up a test environment by labeling, tagging, set rating, etc. for files that the script creates for this purpose on a
user definable path
Like the one with ?*.txt & (cont:rock | punk)
I don't know, didn't test them. Maybe it's just a bug that they don't work?
Re: combined search, all of tags with eather rating
Posted: 31 Jan 2020 22:26
by rur54
No worries, thank you. You helped a lot already. Showed me different ways.
Forget about my earlier post.
Go back to your original example with
Tags:(tagA, tagB) ... how would you (or anyone that reads else) add NOT tags option with it?
Again thanks and dont worry about it if you dont have time.
Cheers
Re: combined search, all of tags with eather rating
Posted: 31 Jan 2020 22:56
by highend
goto "*?:ex1:(2 | 3) AND tags:(tagA & tagB & !tagC)";
Setup:
- 2 files
- Both have a rating of 3
- First file has tagA,tagB
- Second file has all three tags
Using the goto above leads to: Only the first file is found
Although, without /t, it searches all files and folders...
Re: combined search, all of tags with eather rating
Posted: 31 Jan 2020 23:36
by rur54
I really appreciate your help.
With what you have given me is great but breaks my existing script.
So once I figure out how to do it properly using the examples you have given me and make it work and I am happy with it I would be glad to post it for all here as I feel (in my case) it is very useful.
An example what I am after when searching database only using all these :
Find me tagged with all "drawing" AND "sketch" but NOT "ink" AND comment contains "personal"
Should have either 1 or 2 stars and either "print" or "publish" label
Search in path "my\\work"
I think this is good enough.
I will play with it some more.
Cheers