Skip to content

Cannot drop full-text index #1288

@linozen

Description

@linozen

ArcadeDB Version:

v23.10.1-SNAPSHOT

OS and JDK Version:

Linux 6.5.6-76060506-generic - OpenJDK 64-Bit Server VM 11.0.20.1

Expected behavior

Drop the index

Actual behavior

Throw the following error:

com.arcadedb.exception.SchemaException: Cannot drop the index 'Beer[name]' (error=java.lang.ClassCastException: class com.arcadedb.index.lsm.LSMTreeFullTextIndex cannot be cast to class com.arcadedb.index.lsm.LSMTreeIndex (com.arcadedb.index.lsm.LSMTreeFullTextIndex and com.arcadedb.index.lsm.LSMTreeIndex are in unnamed module of loader 'app'))
	at com.arcadedb.schema.EmbeddedSchema.lambda$dropIndex$2(EmbeddedSchema.java:470)
	at com.arcadedb.database.EmbeddedDatabase.executeInWriteLock(EmbeddedDatabase.java:1427)
	at com.arcadedb.database.EmbeddedDatabase.recordFileChanges(EmbeddedDatabase.java:1467)
	at com.arcadedb.schema.EmbeddedSchema.recordFileChanges(EmbeddedSchema.java:1288)
	at com.arcadedb.schema.EmbeddedSchema.dropIndex(EmbeddedSchema.java:432)
	at com.arcadedb.query.sql.parser.DropIndexStatement.executeDDL(DropIndexStatement.java:63)
	at com.arcadedb.query.sql.executor.DDLExecutionPlan.executeInternal(DDLExecutionPlan.java:60)
	at com.arcadedb.query.sql.parser.DDLStatement.execute(DDLStatement.java:60)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:73)
	at com.arcadedb.query.sql.SQLQueryEngine.command(SQLQueryEngine.java:101)
	at com.arcadedb.database.EmbeddedDatabase.command(EmbeddedDatabase.java:1334)
	at com.arcadedb.server.ServerDatabase.command(ServerDatabase.java:467)
	at com.arcadedb.server.http.handler.PostCommandHandler.executeCommand(PostCommandHandler.java:123)
	at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:91)
	at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:99)
	at com.arcadedb.server.http.handler.AbstractServerHttpHandler.handleRequest(AbstractServerHttpHandler.java:126)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
	at java.base/java.lang.Thread.run(Thread.java:829)

Steps to reproduce

  1. Start up with docker:
docker run --rm  -p 2480:2480 -p 2424:2424 -p 6379:6379 -p 5432:5432 -p 8182:8182 \
                 --env JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata \
  -Darcadedb.server.defaultDatabases=Imported[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz} \
  -Darcadedb.server.plugins=Postgres:com.arcadedb.postgres.PostgresProtocolPlugin,GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin " \
             arcadedata/arcadedb:latest
  1. Create property and full-text index on OpenBeer dataset
CREATE PROPERTY Beer.name STRING; 

BTW: Why do I need to do this? The property already exists but without this step, I cannot create the index.

CREATE INDEX ON Beer (name) FULL_TEXT

Then if you try to delete the index the error reproduced above occurs:

DROP INDEX `Beer[name]`

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions