Results based on content in a peculiar way

Discussion related to "Everything" 1.5.
Post Reply
err_24546
Posts: 79
Joined: Wed Oct 11, 2023 1:47 am

Results based on content in a peculiar way

Post by err_24546 »

Let's say I have the contents of all .ocf files indexed (they're just .txt files with a fancy extension). Each of these files is a "sidecar file" for another file, which:
* Is in the same folder as the .ocf, with the same name but without the extension (e.g. myfile.txt, its sidecar would be myfile.txt.ocf).
* Or is in a specific folder. In that case, the sidecar name is in the full path as a subfolder (e.g. h:\folder\my_file.txt would have a sidecar at c:\ocf_files\h\folder\my_file.txt.ocf).

How could I get all the files whose sidecar file contains certain text?
Is it possible to do a search like that?

Thanks.
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Results based on content in a peculiar way

Post by void »

Code: Select all

SEARCH("mytag",GETPROPERTY($path:"\"$name:".ocf","content")) | SEARCH("mytag",GETPROPERTY("C:\ocf_files\"SUBSTITUTE($path:"\"$name:".ocf",":",""),"content"))
where mytag is your search.
This search will be extremely slow.
Combine with other search filters for the best performance.

Formulas
err_24546
Posts: 79
Joined: Wed Oct 11, 2023 1:47 am

Re: Results based on content in a peculiar way

Post by err_24546 »

Thanks void.
Does having the content of my .ocf files indexed make a difference in speed?
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Results based on content in a peculiar way

Post by void »

Yes, indexing ocf content will improve performance.

GETPROPERTY() will use indexed property values (content) if available.

The search will still be rather slow, so combine with other search filters for the best performance.
Post Reply