Search content automatically without "content:" modifier?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
guacamole
Posts: 2
Joined: Wed Feb 16, 2022 10:37 pm

Search content automatically without "content:" modifier?

Post by guacamole »

Hello,

Is there any way to set Everything to automatically search content without having to add the "content:" modifier to the search query?

Thanks in advance!
void
Developer
Posts: 15522
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search content automatically without "content:" modifier?

Post by void »

Please try creating a Filename or Content filter:
  • In Everything, from the Search menu, click Add to filters....
  • Set the Name to:
    Filename or Content
  • Change the Search to:
    #replaceterms:#(:search:#):,#(:<#term:|content:#term:>#):
  • Change the Macro to:
    filenameorcontent<search>
  • Click OK.
Filters can be activated from the Search menu, Filter bar (View -> Filters), right clicking the status bar, filter macro or filter keyboard shortcut.
Active the Filename or Content filter to search for filenames or content.

For the best performance, consider indexing content from Tools -> Options -> Content.
guacamole
Posts: 2
Joined: Wed Feb 16, 2022 10:37 pm

Re: Search content automatically without "content:" modifier?

Post by guacamole »

Thank you, that seems to be working!

I also moved this new search filter to the top of the list in Manage Filters, will this make it the "default" filter?

Thanks again!
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Search content automatically without "content:" modifier?

Post by raccoon »

The 'default filter' is whatever you have specified under Tools -> Options -> General -> Home -> Filter:
void
Developer
Posts: 15522
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search content automatically without "content:" modifier?

Post by void »

Note: you can customize your Everything filter:
  • In Everything, from the Search menu, click Organize filters....
  • Select Everything and click Edit....
  • Change the Search to:
    #replaceterms:#(:search:#):,#(:<#term:|content:#term:>#):
  • Change the Macro to:
    filenameorcontent<search>
  • Click OK.
  • Click OK.
Thy Grand Voidinesss
Posts: 652
Joined: Wed Jun 01, 2022 5:01 pm

Re: Search content automatically without "content:" modifier?

Post by Thy Grand Voidinesss »

[I came here from this discussion: viewtopic.php?p=64817#p64817]
void wrote: Wed Feb 23, 2022 8:45 am Please try creating a Filename or Content filter:
  • In Everything, from the Search menu, click Add to filters....
  • Set the Name to:
    Filename or Content
  • Change the Search to:
    #replaceterms:#(:search:#):,#(:<#term:|content:#term:>#):
  • Change the Macro to:
    filenameorcontent<search>
  • Click OK.
[...]
This works - but it also shows on list with results all items that happen to have in their names whatever I will put in the box of Search Edit


So how can I find all files that have written within them e.g.

Code: Select all

my-name
and not files named like

Code: Select all

this is my-name
my-name and last name
by the means of choosing a Filter and then writing in Search Edit

Code: Select all

my-name
?
Last edited by Thy Grand Voidinesss on Mon May 13, 2024 7:50 pm, edited 3 times in total.
meteorquake
Posts: 388
Joined: Thu Dec 15, 2016 9:44 pm

Re: Search content automatically without "content:" modifier?

Post by meteorquake »

A side suggestion here, when you right-click in the preview box you could have a "Search for content" menu item analogous to when you click a column heading, which would place a

Code: Select all

content:
phrase in the search edit box.

David
void
Developer
Posts: 15522
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search content automatically without "content:" modifier?

Post by void »

So how can I find all files that have written in them e.g.
To create a filter to search file content only:
  • In Everything, from the Search menu, click Add to filters....
  • Set the Name to:
    Content
  • Change the Search to:
    content:$param:
  • Click OK.


I have on my TODO list to add my own text preview handler with search functionality.
Thank you for the suggestion.
Thy Grand Voidinesss
Posts: 652
Joined: Wed Jun 01, 2022 5:01 pm

Re: Search content automatically without "content:" modifier?

Post by Thy Grand Voidinesss »

Thy Grand Voidinesss wrote: Sat Apr 13, 2024 10:25 am [...]
So how can I find all files that have written within them e.g.

Code: Select all

my-name
and not
[...]
void wrote: Mon Apr 15, 2024 3:21 am To create a filter to search file content only:
[...]
#replaceterms:#(:search:#):,#(:<#term:|content:#term:>#):
[...]
I have finally tested this - and it seems to work A-OK, as it is not being fooled by similar phrases and it also looks in apparently all file formats [because I was stunned to find out in just how many of them that test-text of mine my-name has appeared for various reasons]

It took me that long because with over 2 000 000 files reported in my Everything the whole search process had to take around 22 hours [which was disrupting my daily workflow] - and now I have two question regarding this horrendous amount of time needed for such task:

A] What does the search process of this Filter looks for if the box of Search Edit remain empty? Does Everything attempts to cache all content of all files? And if it finishes such content-search-without-actually-specified-content-looked-for then will I be able to find instantly any phrase? [Or will that be virtually impossible, unless I have on the volume with Everything as much free space as those 2 000 000 files take on my other volumes plus I also / or have terabytes of RAM?]

B] If my above positive assumption is true [i.e. it is doable and without extra terabytes of storage and / or memory], then can the expression of this Filter be indexed - so that Everything will be always able to find instantly any phrase [i.e. without me waiting a whole day for just one search to finish]?

[When I writing this post I changed that Filter to the default Everything one and removed my test phrase that I had looked for - but then switched back to it and put in Search Edit that same my-name test phrase: and my Everything started apparently once more to perform the whole searching process from start]
Post Reply