Orientdb: Manual index entries not persisted through a server restart

Created on 15 Mar 2016  ·  4Comments  ·  Source: orientechnologies/orientdb

Create a manually created index:
CREATE INDEX md5 UNIQUE_HASH_INDEX;
then manually population the index via inserts with keys and rids.
Then querying the index
e.g. SELECT FROM INDEX:md5 WHERE key = '06700B2BD5AA941B9755B49C129BD66E'
returns the stored rid as expected, but if the server is restarted, nothing is returned.
However
SELECT COUNT(*) FROM INDEX:md5
will return the correct count for the previous inserts...

The type of index does not seem to matter.

bug

Most helpful comment

@fpertl I have investigated the issue and found that automatic key type detection behaviour is unreliable, we have decided to deprecate untyped indexes. As a workaround pease specify an index key type while creating the index, like this:

CREATE INDEX md5 UNIQUE_HASH_INDEX STRING;

All 4 comments

Hi, what version do you use ?

I'm using 2.1.10 community.

@fpertl I have investigated the issue and found that automatic key type detection behaviour is unreliable, we have decided to deprecate untyped indexes. As a workaround pease specify an index key type while creating the index, like this:

CREATE INDEX md5 UNIQUE_HASH_INDEX STRING;

Thanks for resolving this :)

Was this page helpful?
0 / 5 - 0 ratings