How to detect if Everything is currently indexing in the background? (IPC / Everything 1.5)

Discussion related to "Everything" alpha and beta versions.
Laus
Posts: 24
Joined: Sun Jul 04, 2021 11:44 am

How to detect if Everything is currently indexing in the background? (IPC / Everything 1.5)

Post by Laus »

Hello,

I am using the Everything 1.5 alpha IPC interface via the named pipe `\.\PIPE\Everything IPC` (instance `1.5a`) from a Python client. I am porting parts of the Everything3 SDK and have noticed the following behavior:

- `COMMAND_IS_DB_LOADED` (8) returns `1` / `True` → the database is loaded.
- Nevertheless, Everything continues to index in the background (e.g. USN journal catch-up, folder sizes, MFT scan, new volumes, etc.).

Because of this, `is_db_loaded()` is not a reliable indicator for “Everything is idle and finished indexing.”

I have reviewed the available IPC commands in `Everything3.h` / `Everything3.c` and did not find a dedicated `IS_INDEXING` or similar command. The only related ones I see are:

- `COMMAND_IS_DB_LOADED = 8`
- `COMMAND_IS_PROPERTY_INDEXED = 9` (checks if a specific property is indexed, not if indexing is active)

Is there an official or recommended way to detect whether Everything is currently indexing in the background via IPC?\
For example:

1. A dedicated command or response flag I missed?
2. A change in the journal (`COMMAND_GET_JOURNAL_INFO`) that indicates active indexing?
3. Any other signal (file count changes over time, CPU usage, etc.) that is safe to poll?

Here is a minimal Python example of what I currently check:

```python
from everything3Pipe import Everything3Pipe

try:
ev = Everything3Pipe().connect()
except Everything3Error as e:
print(f"Failed to init: {e}")
print(
"Ist die Everything-Anwendung gestartet und der IPC-Pipe-Server aktiv."
)
ev = None

if ev.is_db_loaded():
print("DB loaded, but indexer my be running.")
else:
print("DB not loaded")
```

I would like to avoid polling `count_results()` over several seconds as a heuristic if there is a cleaner IPC-based method.

Any hints or pointers to the relevant SDK documentation would be greatly appreciated.

Thank you in advance.

Best regards, Laus

BTW, The python wrapper for the API can be found here: https://github.com/git-emil/everything3Pipe
void
Developer
Posts: 20462
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to detect if Everything is currently indexing in the background? (IPC / Everything 1.5)

Post by void »

Everything should only index once.

What is listed under Tools -> Debug -> Statistics -> Build -> Last rebuild reason?



When COMMAND_IS_DB_LOADED returns true, the index has been successfully loaded or created.
After COMMAND_IS_DB_LOADED returns true, you can send a query to get results.
It is possible for Everything to perform a reindex after the db has been loaded.
Check the rebuild reason as mentioned above.



There's no mechanism to check if Everything is processing the USN Journal or doing a background folder rescan.

There's no mechanism to check if Everything is idle and finished indexing. This wouldn't be possible, because Everything may start a reindex after the call returns.

Best you can do is get your results, if there's 0 results, call COMMAND_IS_DB_LOADED and see if Everything has started a reindex.


Is there an official or recommended way to detect whether Everything is currently indexing in the background via IPC?\
No, I recommend just polling COMMAND_IS_DB_LOADED.



Everything is designed to only index once, so ideally, COMMAND_IS_DB_LOADED should be enough to determine if indexing has completed.
Check out the Plugin SDK which has API calls like db_would_block



I will consider a COMMAND_GET_INDEXING_PROGRESS call.
Xavierarmand
Posts: 50
Joined: Fri Nov 24, 2023 12:19 am

Re: How to detect if Everything is currently indexing in the background? (IPC / Everything 1.5)

Post by Xavierarmand »

Without using this in scripting I'd like to this in EVs gui itself. A simple status bar segment states Updating index. could be helping.

I have a couple indexes nas set to update every 6 hours. Would be great to know when it happening.