[Not a bug] content: doesn't find some files, utf8content: does

Discussion related to "Everything" 1.5 Alpha.
Post Reply
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

[Not a bug] content: doesn't find some files, utf8content: does

Post by oO0XX0Oo »

Hi,

no idea why this happens. Practically everything that I save is written as UTF-8 without BOM.

The number of results found searching via
ext:txt utf8content:hkey

is 70

Via
ext:txt content:hkey

it's only 13

I've opened most of the 13 files just to make sure that (at least Sublime Text 4) classifies them as UTF-8 without BOM.

I'm using the latest x64 beta (1.5.0.1278a)...

Can I deliver some debug output to find out why this happens?
Last edited by oO0XX0Oo on Wed Oct 06, 2021 11:32 am, edited 1 time in total.
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: content: doesn't find some files, utf8content: does

Post by void »

content: uses the system extension-associated iFilter to search content.

utf8content: will treat the file content as UTF-8.



The iFilter is most likely misinterpreting the content.
Everything 1.5 will no longer use iFilters for text/plain files.
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

Re: content: doesn't find some files, utf8content: does

Post by oO0XX0Oo »

Thanks void.

I've made some tests:

Code: Select all

filtreg.exe (Microsoft SDK command line tool)
===
.txt --> Plain Text filter (%systemroot%\system32\query.dll)


filtdump.exe (Microsoft SDK command line tool)
===

filtdump.exe "D:\Temp\Default file manager.txt"

FILE: D:\Temp\Default file manager.txt
IFILTER: CLSID == {C1243CA0-BF96-11CD-B579-08002B30BFEB}
IFILTER: Using IPersistStream
IFILTER: IFilter->Init returned IFILTER_FLAGS_OLE_PROPERTIES flag


CHUNK: ---------------------------------------------------------------
    Attribute = {B725F130-47EF-101A-A5F1-02608C9EEBAC}\19 (System.Search.Contents)
    idChunk = 1
    BreakType = 0 (No Break)
    Flags (chunkstate) =  (Text)
    Locale = 0 (0x0)
    IdChunkSource = 1
    cwcStartSource = 0
    cwcLenSource = 0

TEXT: ----------------------------------------------------------------

Current user:
[HKEY_CURRENT_USER\Software\Classes\Directory\Shell\XYplorer\Command]
[HKEY_CURRENT_USER\Software\Classes\Drive\Shell\XYplorer\Command]

All users:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Shell\XYplorer\Command]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\Shell\XYplorer\Command]
For me it looks like the inbuilt iFilter interprets the content of the file correctly and
hkey
should be found with
content:hkey

Everything 1.5 will no longer use iFilters for text/plain files
As I said I'm using the current alpha of v1.5 so this change isn't implemented yet but a planned one, right?
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: content: doesn't find some files, utf8content: does

Post by void »

As I said I'm using the current alpha of v1.5 so this change isn't implemented yet but a planned one, right?
Thanks for pointing this out.

This must be a bug with Everything 1.5.
Everything 1.5 should be treating txt files as text/plain. (ignoring any iFilters)

Could you please send a txt file that:
matches a
ext:txt utf8content:hkey
search
does not match a
ext:txt content:hkey
search.

eg:
ext:txt utf8content:hkey !content:hkey

I'm seeing a few hits for txt files with UTF-16 BOM on my end which is expected.

Please send the txt file to support@voidtools.com
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: content: doesn't find some files, utf8content: does

Post by NotNull »

Is there anything defined in Menu:Tools > Options > Indexes > Content?

When there is, the content: functiion will limit it's results to the files/folders defined here.
In other words: will only find indexed text. Results are shown instantaneous.

utf8content: will search on disk and is not limited to indexed text. Results are shown as they are found.


BTW: thank you for filtreg! Handy.
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

Re: content: doesn't find some files, utf8content: does

Post by oO0XX0Oo »

@void

Done.


@NotNull
Is there anything defined in Menu:Tools > Options > Indexes > Content?
Sure, e.g.: *.md;*.txt (and a few more (scripting and programming source code extensions))

For some reason Everything indexes .txt files but is not able to find their content (with content:) afterwards (at least not for all of them despite being UTF-8 without BOM ones)
BTW: thank you for filtreg!
No problem. The only tools I know of that can really help with iFilter problems
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

Re: content: doesn't find some files, utf8content: does

Post by oO0XX0Oo »

Em...

Forget this, fast^^

The error is sitting in front of the monitor, Everything is not to be blamed^^

The folder that contained the missing file(s) was not included in

Indexes - Content - Include only folders

Sorry for any trouble I've caused, me culpa!
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: content: doesn't find some files, utf8content: does

Post by void »

I am glad to hear you found the issue.

Thank you for the txt file.
The txt file was found for me with the content:hk search.



When content indexing is enabled, content: will only search your indexed content.
There is a notindexed: search modifier which might be useful for finding content that is not indexed:

for example:
ext:txt notindexed:content:hk

notindexed:
Last edited by void on Wed Oct 06, 2021 11:33 am, edited 1 time in total.
Reason: fixed nonindexed: -> notindexed:
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

Re: content: doesn't find some files, utf8content: does

Post by oO0XX0Oo »

Thanks again, void!

I've added a new filter for non-indexed searches

Code: Select all

Name  : Not indexed
Search: notindexed:content:QUERY:
Macro : ni<QUERY>
and only provide the necessary file extension(s) via e.g.
ext:txt
manually when using this filter.
I do not have e.g. the system drive (C:) in my index so I won't be flooded when doing such a search (without using any path in the pattern)...

Thanks for the hint, that's a very useful modifier!
Post Reply