I am wondering if there is a way to simultaneously search both file name & location as well as the content (and tags) at the same time.
I am testing out using XYPlorer to allow me to search through my files of recipes, and would like to be able to enter a search term like "chicken" and have it pull up any recipes with chicken in the filename OR content OR tags. I believe I understand how to use the search tabs and search each one of those fields individually or with having something in the filename AND in the content, but would like to be able to do the "OR" case without having to run 3 separate searches.
I am currently using XYPlorerFree 17.00.0100 but would also like to know if it is not possible with the free version, if such a thing is possible with the paid version.
search filename and content simultaneously
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: search filename and content simultaneously
Welcome to the forum.
From the help file:
scripting which would allow to do what you want but it would still require two quicksearch() commands because
the content search is a switch and can't be applied (afaik) in a logical "OR" manner
For example a very minimal script (without any condition checking!):
This would ask for all three fields, makes 2 quicksearches and puts the deduped result into
a paperfolder and displays it.
From the help file:
So no, you can't execute this specific OR-combined search from the "Find Files" tab. The paid version supportsA file must pass each active filter to be found. In other words, the logical relationship between the filters is AND.
scripting which would allow to do what you want but it would still require two quicksearch() commands because
the content search is a switch and can't be applied (afaik) in a logical "OR" manner
For example a very minimal script (without any condition checking!):
Code: Select all
$file = input("Find file name:", , , , "");
$tag = input("Find tag:", , , , "");
$content = input("Find content:", , , , "");
$result1 = quicksearch("name:*$file* | tags:$tag");
$result2 = quicksearch("/contents=$content");
paperfolder("Quicksearch", formatlist($result1 . <crlf> . $result2, "esd", <crlf>), , "nl");
a paperfolder and displays it.
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66679
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: search filename and content simultaneously
A search for tags can be directly injected into the Name field by use of the selector "tags:", so this works in a Boolean expression (":" is prefixed to mark it as Boolean) and will list all items having "chicken" either in the name OR as tag:
However, content search is not supported in this way.
Code: Select all
:chicken OR tags:chickenFAQ | XY News RSS | XY X
-
user
- Posts: 5
- Joined: 11 Nov 2016 02:48
Re: search filename and content simultaneously
Thank you for the info. I may have to look into the scripting and paid version as I learn more.
-
admin
- Site Admin
- Posts: 66679
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: search filename and content simultaneously
Check out the next beta version... 
FAQ | XY News RSS | XY X
-
user
- Posts: 5
- Joined: 11 Nov 2016 02:48
Re: search filename and content simultaneously
Very nice addition. Thank you!
One question as I'm still new to the software and trying to figure out how it works: When I use the info pane to search, I notice that it opens a "Search Results" tab for me, and displays my results there. If I go back to my "browser" tab, and execute a new search, it repopulates the original "Search Results" tab with the new search results. It appears that if I unselect the "Lock Location" option on the original "Search Results" tab, then when I go back to the "browser" tab and try a different search it opens a new "Search Results" tab.
Can someone explain to me what is going on here? I'm sure I just don't understand the intended function and design of the settings. Is there anyway to get it to open a new "Search Results" tab by default without having to "unlock" the existing "Search Results" tab?
One question as I'm still new to the software and trying to figure out how it works: When I use the info pane to search, I notice that it opens a "Search Results" tab for me, and displays my results there. If I go back to my "browser" tab, and execute a new search, it repopulates the original "Search Results" tab with the new search results. It appears that if I unselect the "Lock Location" option on the original "Search Results" tab, then when I go back to the "browser" tab and try a different search it opens a new "Search Results" tab.
Can someone explain to me what is going on here? I'm sure I just don't understand the intended function and design of the settings. Is there anyway to get it to open a new "Search Results" tab by default without having to "unlock" the existing "Search Results" tab?
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: search filename and content simultaneously
Configuration | Find Files & Branch View | Find Files | Show search results in: New tab?
One of my scripts helped you out? Please donate via Paypal
-
user
- Posts: 5
- Joined: 11 Nov 2016 02:48
Re: search filename and content simultaneously
Thank you! With so many options it might have taken me a while to find that one...
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: search filename and content simultaneously
Finding something in the config is an easy thing when you know how something is named.
Menu - Tools - Configuration... - "Jump to Setting..."
You were looking for something search related so enter "search" in the bottom left box
Read the results in the upper pane.
Sure, in this case it isn't immediately obvious which setting is the right one but from the names the
4th and the 6th could have made sense
The 4th would have led you to the setting right under the ones you actually needed and the 6th would
have highlighted the exact match
Menu - Tools - Configuration... - "Jump to Setting..."
You were looking for something search related so enter "search" in the bottom left box
Read the results in the upper pane.
Sure, in this case it isn't immediately obvious which setting is the right one but from the names the
4th and the 6th could have made sense
The 4th would have led you to the setting right under the ones you actually needed and the 6th would
have highlighted the exact match
One of my scripts helped you out? Please donate via Paypal
-
user
- Posts: 5
- Joined: 11 Nov 2016 02:48
Re: search filename and content simultaneously
Thanks for the tip!
XYplorer Beta Club