How to query for and then drop index of a given type?

I want write a cypher query that shows the index names of a certain type so that I can drop them. I'm using Neo4J-Enterprise v4.4.6 on an AWS EC2 instance running the most recent version of Rocky Linux (CentOS 8).

The documentation asserts that this can be done:

One of the output columns from SHOW INDEXES is the name of the index. This can be used to drop the index with the DROP INDEX command.

I can't find a cypher incantation that puts the name in scope so that I can then drop it.

For example, I can get the name (and type) like this:

SHOW INDEXES YIELD name, type WHERE type='LOOKUP'

This displays the name in Neo4J browser ("index_343aff4e", "index_f7700477" in my case).

How do I then pass the name to `DROP INDEX ..."?

I've tried various permutations of "WITH" and even tried a subquery with no joy.

For example, I tried the following:

CALL {
    SHOW INDEXES YIELD name, type WHERE type='LOOKUP'
}
RETURN name, type

Cypher complains that "SHOW" doesn't work inside the sub-query.

I don't see anything in the docs or on stackoverflow that clarifies this.

@tms

show indexes yield *

will report many more columns then the default show indexes.
this does include a column named createStatement

To get a Drop statement one can run

show indexes yield name return 'DROP INDEX ' + name + ';' ;

will create the DROP statements