{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5461","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5461/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5461/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5461/events","html_url":"https://github.com/orientechnologies/orientdb/issues/5461","id":121934869,"number":5461,"title":"Trying to add property or index to class - Execution Exception","user":{"login":"cleverbug","id":2648612,"avatar_url":"https://avatars.githubusercontent.com/u/2648612?v=3","gravatar_id":"","url":"https://api.github.com/users/cleverbug","html_url":"https://github.com/cleverbug","followers_url":"https://api.github.com/users/cleverbug/followers","following_url":"https://api.github.com/users/cleverbug/following{/other_user}","gists_url":"https://api.github.com/users/cleverbug/gists{/gist_id}","starred_url":"https://api.github.com/users/cleverbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleverbug/subscriptions","organizations_url":"https://api.github.com/users/cleverbug/orgs","repos_url":"https://api.github.com/users/cleverbug/repos","events_url":"https://api.github.com/users/cleverbug/events{/privacy}","received_events_url":"https://api.github.com/users/cleverbug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-13T18:17:23Z","updated_at":"2015-12-13T23:45:31Z","closed_at":null,"body":"Hi,\r\n\r\nas part of our test with OrientDB we've come across this weird behaviour:\r\n* import a User class (with 8 cluster) with millions of vertexes\r\n* try and add a property ( same thing happened with a multi field index, though)\r\n* get an error during the execution\r\n\r\n```\r\n\r\ncreate property User.name STRING\r\n\r\nError: com.orientechnologies.orient.core.exception.OCommandExecutionException: Property 'User.name' already exists. Remove it before to retry.\r\n\r\norientdb {db=graphDb}> info class User                                                                              \r\n\r\nCLASS 'User'\r\n\r\nSuper classes........: [V]\r\nDefault cluster......: user (id=11)\r\nSupported clusters...: user(11), user_1(12), user_2(13), user_3(14), user_4(15), user_5(16), user_6(17), user_7(18)\r\nCluster selection....: round-robin\r\nOversize.............: 0.0\r\n\r\nPROPERTIES\r\n-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+\r\n NAME                          | TYPE        | LINKED TYPE/CLASS             | MANDATORY | READONLY | NOT NULL |    MIN    |    MAX    | COLLATE  |\r\n-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+\r\n username                      | STRING      | null                          | false     | false    | false    |           |           | default  |\r\n email                         | STRING      | null                          | false     | false    | false    |           |           | default  |\r\n lastName                      | STRING      | null                          | false     | false    | false    |           |           | default  |\r\n uid                          | STRING      | null                          | false     | false    | false    |           |           | default  |\r\n firstName                     | STRING      | null                          | false     | false    | false    |           |           | default  |\r\n-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+\r\n\r\nINDEXES (1 altogether)\r\n-------------------------------+----------------+\r\n NAME                          | PROPERTIES     |\r\n-------------------------------+----------------+\r\n User.uid                     | uid           |\r\n-------------------------------+----------------+\r\norientdb {db=graphDb}> select from user limit 10;\r\n\r\n----+-----+------+---------------+---------------+--------+---------------------------+---------+--------+------+------+------------+----------+---------\r\n#   |@RID |@CLASS|uid           |lastName       |username|email                      |firstName|birthday|userId|gender|birthdayYear|out_Friend|in_Friend\r\n----+-----+------+---------------+---------------+--------+---------------------------+---------+--------+------+------+------------+----------+---------\r\n0   |#11:0|User  |1234     |null           |        |email@email.com        |First |00-00   |1   |null  |0           |null      |null     \r\n```\r\n\r\nSame thing happened when I tried and create an index with:\r\n```\r\ncreate index User.name on User (firstName,lastName) FULLTEXT ENGINE LUCENE\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/164311183","html_url":"https://github.com/orientechnologies/orientdb/issues/5461#issuecomment-164311183","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5461","id":164311183,"user":{"login":"cleverbug","id":2648612,"avatar_url":"https://avatars.githubusercontent.com/u/2648612?v=3","gravatar_id":"","url":"https://api.github.com/users/cleverbug","html_url":"https://github.com/cleverbug","followers_url":"https://api.github.com/users/cleverbug/followers","following_url":"https://api.github.com/users/cleverbug/following{/other_user}","gists_url":"https://api.github.com/users/cleverbug/gists{/gist_id}","starred_url":"https://api.github.com/users/cleverbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleverbug/subscriptions","organizations_url":"https://api.github.com/users/cleverbug/orgs","repos_url":"https://api.github.com/users/cleverbug/repos","events_url":"https://api.github.com/users/cleverbug/events{/privacy}","received_events_url":"https://api.github.com/users/cleverbug/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T23:45:31Z","updated_at":"2015-12-13T23:45:31Z","body":"Here's the error with the index:\r\n```\r\ncreate index User.name on User (firstName,lastName) FULLTEXT ENGINE LUCENE\r\n\r\n\r\nCreating index...\r\nError: com.orientechnologies.orient.core.index.OIndexException: Index with name user.name already exists.\r\n```\r\n\r\nAlthough, looking at the log, it seems that the index was created:\r\n```\r\n2015-12-13 22:32:09:975 INFO  {db=graphDb} --> OK, indexed XXX items in YYY ms \r\n```\r\n\r\nand the index does show:\r\n```\r\nselect expand(indexes) from metadata:indexmanager\r\n\r\n----+------+------+--------+---------+---------+---------+-----------+------------+------------------+--------------------------+-------------------------------\r\n#   |@CLASS|mapRid|clusters|algorithm|name     |indexVers|type       |valueContain|metadata          |indexDefinitionClass      |indexDefinition                \r\n----+------+------+--------+---------+---------+---------+-----------+------------+------------------+--------------------------+-------------------------------\r\n....\r\n2   |null  |null  |[8]     |LUCENE   |User.name|1        |FULLTEXT   |SBTREEBON...|null              |com.orientechnologies.o...|{className:User,indexDefinit...\r\n...\r\n----+------+------+--------+---------+---------+---------+-----------+------------+------------------+--------------------------+-------------------------------\r\n```\r\n\r\nAlso, is it me or I'm not getting how you then query by the index?\r\n\r\n```\r\nSELECT FROM INDEX:User.name where key LUCENE 'Gazzetta*' limit 10    \r\n\r\n----+------+-------------------------------+------------\r\n#   |@CLASS|key                            |rid         \r\n----+------+-------------------------------+------------\r\n0   |null  |OCompositeKey{keys=[Gazzetta*]}|#16:47036837\r\n```\r\n\r\nWas kinda expecting to receive the User with the name like Gazzetta."}}