Simple search

Discussion related to "Everything" 1.5.
Post Reply
w64bit
Posts: 338
Joined: Wed Jan 09, 2013 9:06 am

Simple search

Post by w64bit »

2 files:
123abc
12xy12

search for 12 12 it's listing both files.
It should not list only the second because space = AND?
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Simple search

Post by void »

To find two occurrences of 12, please try the following search:

*12*12*
w64bit
Posts: 338
Joined: Wed Jan 09, 2013 9:06 am

Re: Simple search

Post by w64bit »

I know, but if you are searching for "12 y" it's listed only the second file.
But if you search for "12 12" both files are listed.
Space = AND. So 12 twice.
Should the same logic be used for "12 12"?
An option "Ignore identical entries" in Search menu?
therube
Posts: 5723
Joined: Thu Sep 03, 2009 6:48 pm

Re: Simple search

Post by therube »

Try 'search for', think of it in the terms of a 'search for', rather then AND.

So, 'search for' 12 .AND. 'search for' 12.
You're simply telling Everything to search for 12, regardless of how many times you enter 12

'search for' 1 .AND. 'search for' Z
That will find 1z, z1, abc1defz, defzabc1, ...
But will not find 1abc or defz or...

Now try 'search for'.
'search for' 12, .AND. 'search for' any number of characters including zero, followed by, .AND. 'search for' 12.

So you need something to represent any number of characters including zero, & * fills that void.
1212 12abc12 abc12def12ghi

You could also use ?, assuming you know how many characters you want between a pair of 12's.
12?12 gives you 12a12, 12z12, ..., but not 12ab12.
12??12 gives you 12ab12, 121212, but not 12a12

You could use regex:
regex:12*12 - that's the same as 12*12 (windows wildcard)
regex:12.*12 - that's the same as 12?*12 (windows wildcards)
regex:12..12 - that's the same as 12??12 (windows wildcard)
w64bit
Posts: 338
Joined: Wed Jan 09, 2013 9:06 am

Re: Simple search

Post by w64bit »

AND was the confusion in my head.
I took it literally without thinking of 'search for'.
Thank you very much.
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Simple search

Post by void »

I have on my TODO list to make searching with the same search term subsequently to look for multiple occurrences in the filename.

For example:
searching for
12 12
should search for two or more occurrences of 12 in the filename.

-I have been reluctant to add it because there are issues with handling filters and complex expressions..
w64bit
Posts: 338
Joined: Wed Jan 09, 2013 9:06 am

Re: Simple search

Post by w64bit »

If it does more harm than good, please don't do it.
therube
Posts: 5723
Joined: Thu Sep 03, 2009 6:48 pm

Re: Simple search

Post by therube »

searching for
12 12
should search for two or more occurrences of 12 in the filename
I'd think that to be an odd construct.

And with long search lines, as one might be building a search out, & in particular searches that overflow (the visible search box), one is apt to inadvertently duplicate a search term, which currently returns expected results, where if it were to search for two or more occurrences, it would not.
Post Reply