NationalSecurityAgency/ghidra · error · LSHException
Could not drop index: {}
Error message
Could not drop index: {} What it means
Thrown in dropIndex when ResponseAdjustIndex response is null, i.e. the server rejected the AdjustVectorIndex (doRebuild=false) command. BulkSignatures surfaces the server's BSimError message as an LSHException 'Could not drop index: <message>'. A non-null but unsuccessful response (e.g. operation not supported) is handled as a logged error, not thrown.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java:600
}
}
/**
* Drops the current BSim database index which can allow for faster signature ingest after
* which a {@link #rebuildIndex()} may be performed. Dropping the index may also be done to
* obtain more accurate results albeit at the cost of performance.
*
* @throws IOException if there's an error establishing the database connection
* @throws LSHException if there's an error issuing the query
*/
public void dropIndex() throws IOException, LSHException {
DatabaseInformation info = establishQueryServerConnection(false);
AdjustVectorIndex query = new AdjustVectorIndex();
query.doRebuild = false;
ResponseAdjustIndex response = query.execute(querydb);
if (response == null) {
BSimError lastError = querydb.getLastError();
throw new LSHException("Could not drop index: " + lastError.message);
}
String dbDetail = "for database " + info.databasename + " (" + bsimServerInfo + ")";
if (!response.success) {
String msg = "Could not drop the index " + dbDetail;
if (!response.operationSupported) {
msg += ": operation not supported";
}
Msg.error(this, msg);
}
else {
Msg.info(this, "Successfully dropped index " + dbDetail);
}
}
/**
* Rebuilds the current BSim database index.
*
* @throws IOException if there's an error establishing the database connectionView on GitHub (pinned to d5f144c24d)
Solutions
- Read the message to learn the server's reason.
- Confirm an index exists before dropping (rebuildIndex/dropIndex only make sense after population).
- Retry on transient failures; report persistent unsupported/protocol errors.
- Ensure privileges allow index operations.
Example fix
// before bsim.dropIndex(); // no index / unsupported -> LSHException // after // only drop after the DB is populated and an index exists; otherwise skip
Defensive patterns
Strategy: try-catch
Validate before calling
// only drop when an index is known to exist on a populated, supported DB
Try / catch
try {
bsim.dropIndex();
} catch (LSHException e) {
// message: "Could not drop index: <server>"; if unsupported or none exists, log and continue
} Prevention
- Only call dropIndex on a populated database that has an index.
- Confirm the backend supports vector-index operations.
- Treat unsupported as informational once verified.
When it happens
Trigger: Calling dropIndex on a database with no index to drop, a backend that does not support index operations, or during a connection/protocol failure that yields a null response.
Common situations: Dropping an index that was never built; backend (e.g. certain H2 configs) lacks vector-index support; transient server error; insufficient privileges.
Related errors
- Could not rebuild index: {}
- Prewarm failed: {}
- Could not perform delete: {}
- Could not perform getexeinfo: {}
- Could not change metadata: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/b9b0d837157d86aa.
Report an issue: GitHub.