Always search unindexed content

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Vorlon
Posts: 7
Joined: Wed Jul 12, 2017 9:22 pm

Always search unindexed content

Post by Vorlon »

This is an awesome feature!

Wish: Include a checkbox for "Always search unindexed content" to avoid needing "

Code: Select all

notindexed:content:
" on every content search. I often search for content in big log files that I dont really want the indexing engine to have to constantly be re-indexing (due to being modified all the time).
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Always search unindexed content

Post by NotNull »

In Everything 1.4, you can create your own search macros (for example hastext:) by creating a new filter:
With that you can search for hastext:"some text"
2022-01-19 00_13_57-Organize Filters.png
2022-01-19 00_13_57-Organize Filters.png (10.14 KiB) Viewed 8633 times


In Everything 1.5, you can also create a 'macro-alias' for notindexed:content:
  • Type the following in the searchbar and press ENTER

    Code: Select all

    /define hastext=notindexed:content:
To show all aliases: /define
To show a specific alias: /define hastext
To remove an alias: /undef hastext

After pressing ENTER, the results of these commands are shown in the statusbar for a couple of seconds.


Note:
- To my surprise, notindexed:content:"some text" shows also results that *were* indexed.
- Maybe /define and /undef should be called /alias and /unalias instead :)
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Always search unindexed content

Post by raccoon »

What is indexed versus unindexed content?

Doesn't Everything only search the content of files that you tell it to, on demand? Isn't it always unindexed?

The normal content:<text> search "just works" for me without fussing with it.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Always search unindexed content

Post by NotNull »

Indexed content is content that is added to the database (through Options > Indexes > Content), is loaded in RAM and when searched for will give almost instant results.
The content: function will only search in indexed content.
So if you configured Index file content to just include all *.txt files, a search like the following will produce zero results: ext:cmd;bat content:echo


The non-indexed:content: function searches content on disk as well as in the database. That is by design. I had/have issues with the name.
The non-indexed: modifier doesn't do what it's name implies, searching in non-indexed (i.e. not available in database) content.
The current behaviour - search on disk as well as in RAM) is the better, more practical implementation imo [1]. Just that name ...
(although I can't think of a better one ....)


For reference:
Search Modifiers wrote:
no-indexed:
non-indexed:
not-indexed:
indexed:


Search properties and content on disk (not from the index) or search properties from the index.

For example:
notindexed:length:>5m

Default: Search indexed properties only. If the property is not included in the index, search the property from disk.
[1] and if one would really insist on showing only files that don't have their content indexed: not-indexed:content:text !content:text )
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Always search unindexed content

Post by raccoon »

NotNull wrote: Wed Jan 19, 2022 9:04 amThe content: function will only search in indexed content.
I don't have _any_ Indexed Content. Why does content: still work for me, always has? Does turning on Content Indexing change the behavior of this function?
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Always search unindexed content

Post by void »

Everything is not designed to mix indexed content/properties and unindexed content/properties.

When you enable content indexing, content: will only search indexed content by default.

Same applies to properties (for example: the Length property).
When you enable Length property indexing, length: will only search indexed information.

notindexed: will search content/properties on disk (ignoring any indexed content/properties).
Even when content/properties are indexed, notindexed: will bypass the index and go to disk.



Please try the following filter:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to:
    All Content
  • Change the Search to:
    <"c:\path to indexed content\" content:search:> | <!"c:\path to indexed content\" notindexed:content:search:>
    where "c:\path to indexed content\" is the folder containing your content-indexed files.
    If you have multiple paths, use "c:\path to indexed content 1\"|"c:\path to indexed content 2\"|"c:\path to indexed content 3...\"
  • Change the Macro to:
    ac<search>
Now you can search for ac:"my content search" to search either indexed content or unindexed content.


- To my surprise, notindexed:content:"some text" shows also results that *were* indexed.
notindexed: will still search content from disk for content-indexed files.

Searching content from disk when content is already indexed is silly.
I will look into reworking notindexed: so it only searches content that is not indexed.


Does turning on Content Indexing change the behavior of this function?
Yes, when content indexing is enabled, content: will only search indexed-content.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Always search unindexed content

Post by NotNull »

void wrote: Wed Jan 19, 2022 10:56 am I will look into reworking notindexed: so it only searches content that is not indexed.
I don't think that is necessary; if it was called (silly name; just as exaqmple) from-disk:content:searchtext, it would make more sense.
But on second (or third?) thought, not-indexed: is technically correct; just not very intuitive.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Always search unindexed content

Post by void »

I'm still looking into changing the notindexed: search modifier.
I'm OK with the current behavior, just the name needs to change.

Internally, notindexed: simply means ignore indexed property values and go to disk.



Fow now, Everything 1.5.0.1296a adds an is-indexed: search function.

This will help simplify the following search:
<"c:\path to indexed content\" content:search:> | <!"c:\path to indexed content\" notindexed:content:search:>

to:

<isindexed:content content:search:> | <!isindexed:content notindexed:content:search:>



Please try the following filter:

(remove the previous All Content filter from Search -> Organize Filters -> All Content -> Delete)
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to:
    All Content
  • Change the Search to:
    <isindexed:content content:search:> | <!isindexed:content notindexed:content:search:>
  • Change the Macro to:
    ac<search>
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Always search unindexed content

Post by NotNull »

void wrote: Thu Jan 20, 2022 5:35 am I'm still looking into changing the notindexed: search modifier.
I'm OK with the current behavior, just the name needs to change.
So, anyone reading this with a suggestion for a new name for not-indexed: ?
EricB
Posts: 53
Joined: Wed Jun 26, 2013 8:56 am

Re: Always search unindexed content

Post by EricB »

How about only-unindexed: ?
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Always search unindexed content

Post by void »

I like from-disk: or fromdisk:
It's clear what this does.

I will use fromdisk: in examples from now on.
Thank you for the suggestions.

Example:
<isindexed:content content:search:> | <!isindexed:content fromdisk:content:search:>
(If content is indexed, search content from the index OR if content is not indexed, search content from disk)


The search modifier was initially named -no-indexed:
then non-indexed: and not-indexed: aliases were added.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Always search unindexed content

Post by void »

Everything 1.5.0.1299a adds a fromdisk: search modifier.

I will use fromdisk: from now on.
Post Reply