Skip to content

Creating index with IF NOT EXISTS doesn't work via HTTP #1192

@Ukuser36

Description

@Ukuser36

I am using 23.6.1 and have setup a TYPE Companies with key CompanyID. When there is no index the following will work fine in the ArcadeDB web-interface and fine via HTTP. However when the index exists, running it again will work fine in the web-interface but not via HTTP. Very odd - gives a 500 error.

CREATE INDEX IF NOT EXISTS ON Companies (CompanyID) UNIQUE

So - works fine in Web - with index / without index, works fine on HTTP when no index but errors when there is.

I have also tried to run DROP INDEX ``Companies.CompanyID`` IF EXISTS prior and although the API reports 200 - when I look in the web-interface the index is still there. As such, when I re-run the CREATE INDEX it again fails with 500. If I manually delete the index, then my HTTP post runs fine.

Furthermore, running the drop index in the Web interface I get Cannot execute command Index not found: Companies.CompanyID but click the DB, Companies pane and I see `

CompanyID | Companies | INTEGER | false | false | false |   |   |   |   | Unique, Type(LSM_TREE) | Drop Property Drop Index
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --`

So it looks like the DROP INDEX doesn't work.

Expected behaviour: No error when run via HTTP multiple times and Error if DROP INDEX fails

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions