| Previous | Next |
| QUERY_E_DIR_ON_REMOVABLE_DRIVE | QUERY_E_ALLNOISE_AND_NO_RELDOC |
QUERY_S_NO_QUERY
The catalog indexes content but currently rejects queries
QUERY_S_NO_QUERY is the failure HRESULT 0x8004160C (-2147215860 signed; 2147751436 unsigned). Its severity bit is 1, facility is 4 (FACILITY_ITF), and code is 0x160C. AllStat describes it as “The catalog is in a state where indexing continues, but queries are not allowed.”
Contract and failing stage
This result belongs to legacy Windows query execution and is returned while checking query readiness while ingestion or maintenance remains active. The exact condition is: an asymmetric catalog state; despite the historical S name, 0x8004160C has failure severity. This stage matters because converting the result to a generic COM failure removes the information needed to choose the owner and retry policy.
This value belongs to the legacy Indexing Service query-execution contract. It can surface through the Indexing Service OLE DB provider or related query interfaces, but it should not be presented as a generic result from every modern Windows Search API. Current Windows Search SQL documentation can clarify related clause concepts, but it does not establish that every current search API returns this legacy query-execution constant.
Conditions that produce it
- an incomplete raw value and severity hides the distinction needed to separate this HRESULT from a later catalog or service failure.
- changes in catalog generation between validation and execution can reproduce the result even when the user-visible input looks unchanged.
- Retrying this result with the same maintenance event leaves the decisive contract violation intact.
- This result can appear when query-readiness check disagrees with the state expected while checking query readiness while ingestion or maintenance remains active.
- a stale or transformed duration of the state can make the component observe that an asymmetric catalog state; despite the historical S name, 0x8004160C has failure severity.
The strongest hypothesis for it must account for the operation—checking query readiness while ingestion or maintenance remains active—and the documented condition. A failed command or empty rowset is only the visible symptom; it does not identify which restriction, projection, sort, scope, timeout or catalog state violated the query contract.
Evidence to preserve
- compare failing and known-good values for raw value and severity under the same provider or handler version.
- record the source and normalization path of catalog generation, not only its display form.
- use maintenance event to test whether the failure belongs to parsing, execution, indexing or capability negotiation.
- preserve query-readiness check before objects or work items are released.
- associate duration of the state with the exact UTC timestamp and correlation identifier.
- compare failing and known-good values for provider command text and dialect under the same provider or handler version.
Evidence for it should reflect what the component actually received. Redact private literals if necessary, but keep clause boundaries, canonical properties, parameter types, dialect and parser or provider offsets.
Diagnostic sequence
- Capture raw value and severity and catalog generation at the call boundary that returns this result.
- confirm the operation reached checking query readiness while ingestion or maintenance remains active with the intended maintenance event.
- perform the decisive check: correlate the same endpoint’s catalog generation with initialization, recovery, upgrade or administrative state.
- reduce the case until changing query-readiness check alone changes the HRESULT or proves it irrelevant.
- apply the recovery only after verifying duration of the state; preserve the original result for comparison.
A useful control for it changes one dimension at a time. Begin with a known-good minimal command against the same catalog and restore projection, restriction, sorting, grouping and scope one component at a time.
Recovery and retry
Use delayed bounded retry only for a documented finite transition and investigate a persistent nonqueryable state. Retry it only after the responsible input or state changes and the previous operation has completed or been cancelled. Backoff helps only with measured transient load or timeout; it cannot repair invalid clauses, projection metadata, scopes or command state.
What the code does not prove
It does not by itself prove catalog corruption, service outage, access denial or absence of matches; the query stage and provider records must identify the failing clause or state. Without code-specific evidence for it, the value also cannot identify which wrapper, configuration, handler or service transition introduced the condition.
Related HRESULT values
QUERY_E_TIMEDOUT means accepted work ran too long; this value rejects query service before normal execution. Keep the symbolic HRESULT beside the stage name in telemetry because nearby constants may require different owners, user messages and retry rules despite the same visible symptom.
Developer and administrator guidance
Retain final command text, dialect, catalog generation, parameter values, timeout, cancellation state and chained OLE DB error records. Do not log credentials or unrestricted document content. Before rebuilding the catalog or restarting the provider for it, reproduce the minimal command and preserve its chained errors.
Practical scenario
After recovery, document counts increase before query readiness. The client waits for an explicit ready transition instead of treating the S name as success. A regression test for it should assert the decisive evidence, change only the responsible condition, and include one neighboring HRESULT so future code cannot collapse distinct failures into a generic message.
Official Microsoft references
- Microsoft: Indexing Service query-execution values
- Microsoft: OLE DB provider for Indexing Service
- Microsoft: ISearchQueryHelper
- Microsoft: HRESULT values
Looking for a different code? Search another status or error code.
