1. We have DB created by 1.5 library with local engine. It is schema free, so all records are V type and E type. All indexes are manual
2. Is it possible covert exist DB to 1.7 plocal with schema hybrid and auto indexes. Still can not get it. > > Do you mean that you need to create classes and move records to the > classes ? > > > On Fri, Mar 21, 2014 at 12:09 PM, Valentin Popov > <[email protected]<javascript:> > > wrote: > >> I mean we have a database 1.5.1 with manual indexes schema less on local >> engine. So all vertexes and edges are type V and E. >> >> We need using 1.7.x libs convert schema to schema hybrid and export it, >> after import it to plocal engine. >> >> >> Regards >> >> >> >> Sorry, I did not understand. >>> What do you mean ? >>> >>> >>> On Fri, Mar 21, 2014 at 11:55 AM, Valentin Popov <[email protected]>wrote: >>> >>>> Moving from 1.5.x (manual indexes, local, schema less) to 1.7.x (schema >>>> hybrid, auto index). >>>> >>>> My plan is change scheme on 1.5.x from schema less to schema hybrid >>>> follow such code and after export it: >>>> >>>> String dbLocation = "/Library/Application Support/MailArchiva/ROOT/ >>>> database/archiva.db"; >>>> >>>> String exportFile = "/Library/Application Support/MailArchiva/ROOT/ >>>> database/export.json"; >>>> >>>> final ODatabaseDocumentTx database = new ODatabaseDocumentTx("local:"+ >>>> dbLocation); >>>> >>>> database.open("admin", "admin"); >>>> >>>> ORecordIteratorClass<ODocument> record = database.browseClass("V"); >>>> >>>> // database.begin(); >>>> >>>> for (ODocument oDocument : record) { >>>> >>>> Integer itemTypei = (Integer) oDocument.field("itemtype"); >>>> >>>> ItemType type = BluePrintDatabase.getItemTypeFromInt(itemTypei); >>>> >>>> String className = oDocument.getClassName(); >>>> >>>> oDocument.setClassName(type.getClassName()); >>>> >>>> oDocument.removeField("itemtype"); >>>> >>>> } >>>> >>>> database.commit(); >>>> >>>> ODatabaseExport databaseExport = null; >>>> >>>> try { >>>> >>>> databaseExport = new ODatabaseExport(database, exportFile, >>>> newOCommandOutputListener() { >>>> >>>> @Override >>>> >>>> public void onMessage(String arg0) { >>>> >>>> System.out.println(arg0); >>>> >>>> } >>>> >>>> }); >>>> >>>> databaseExport.exportDatabase(); >>>> >>>> databaseExport.close(); >>>> >>>> } catch (IOException e) { >>>> >>>> e.printStackTrace(); >>>> >>>> } >>>> >>>> database.close(); >>>> >>>> Orient.instance().shutdown(); >>>> >>>> >>>> >>>> But I get some issues with that approach, it looks like Vertexes >>>> classes are not converted. >>>> >>>> >>>> Started export of database 'archiva.db' to /Library/Application >>>> Support/MailArchiva/ROOT/database/export.json.gz... >>>> >>>> >>>> Exporting database info... >>>> >>>> OK >>>> >>>> >>>> Exporting clusters... >>>> >>>> OK (18 clusters) >>>> >>>> >>>> Exporting schema... >>>> >>>> OK (17 classes) >>>> >>>> >>>> Exporting records... >>>> >>>> >>>> - Cluster 'internal' (id=0)... >>>> >>>> OK (records=3/3) >>>> >>>> >>>> - Cluster 'index' (id=1)... >>>> >>>> OK (records=4/4) >>>> >>>> >>>> - Cluster 'manindex' (id=2)... >>>> >>>> >>>> OK (records=12/12) >>>> >>>> >>>> - Cluster 'default' (id=3)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'orole' (id=4)... >>>> >>>> OK (records=3/3) >>>> >>>> >>>> - Cluster 'ouser' (id=5)... >>>> >>>> OK (records=3/3) >>>> >>>> >>>> - Cluster 'ofunction' (id=6)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'oschedule' (id=7)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'orids' (id=8)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'v' (id=9)... >>>> >>>> >>>> OK (records=395/395) >>>> >>>> >>>> - Cluster 'e' (id=10)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'user' (id=11)... >>>> >>>> OK (records=1/1) >>>> >>>> >>>> - Cluster 'folder' (id=12)... >>>> >>>> >>>> OK (records=15/15) >>>> >>>> >>>> - Cluster 'item' (id=13)... >>>> >>>> >>>> OK (records=378/378) >>>> >>>> >>>> - Cluster 'v_root' (id=14)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'v_folder' (id=15)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'v_user' (id=16)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> - Cluster 'v_blob' (id=17)... >>>> >>>> OK (records=0/0) >>>> >>>> >>>> >>>> Done. Exported 814 of total 814 records >>>> >>>> Any ideas how to do export with schema modification from 1.5.x local >>>> correct, and import such export to new 1.7. plocal >>>> >>>> Regards >>>> Valentin >>>> >>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "OrientDB" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Best regards, >>> Andrey Lomakin. >>> >>> Orient Technologies >>> the Company behind OrientDB >>> >>> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "OrientDB" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Best regards, > Andrey Lomakin. > > Orient Technologies > the Company behind OrientDB > > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
