Hi,

I have followed the steps in the wiki but I still have the
same problem. I have no problems when I load the nodes of the graph but
when I try to load the edges the program becomes very very slow. I have
calculated that the program lasts 5 days more or less to load the all
graph. 


The load of the nodes is as follows:

    public static void createImageNodes(BatchInserter neo, 
LuceneIndexBatchInserter indexService) throws IOException {

               BufferedReader bfEntry = null;

            try {
                bfEntry = new BufferedReader(new 
FileReader("rdbms_images.csv"));
            } catch(FileNotFoundException e) {
                System.out.print("Error: Fitxer no trobat");

            }

            long node;
            String linea = bfEntry.readLine();
            String attrID, attrNLC, attrFILENAME;
            StringTokenizer tokens;
            while((linea = bfEntry.readLine())!=null) {


                tokens = new StringTokenizer(linea,";");
                attrID = tokens.nextToken();
                properties.put("ID", attrID);
                attrNLC = tokens.nextToken();

                properties.put("NLC", attrNLC);
                attrFILENAME = tokens.nextToken();
                properties.put("FILENAME", attrFILENAME);
                properties.put("TYPE", "image");

                node = neo.createNode(properties);
                indexService.index(node, "ID", attrID);
                indexService.index(node, "NLC", attrNLC);
                indexService.index(node, "FILENAME", attrFILENAME);

                indexService.index(node, "TYPE", "image");
                nNodes++;
            }
            indexService.optimize();
    }

And the load of the edges is as follows:


public static void createRelationsBetweenTitles(BatchInserter neo, 
LuceneIndexBatchInserter indexService) throws IOException {
      
               BufferedReader bfEntry = null;
            try {
                bfEntry = new BufferedReader(new 
FileReader("rdbms_refs_title.csv"));

            } catch(FileNotFoundException e) {
                System.out.print("Error: Fitxer no trobat");
            }

            Iterator<Long> it;
            String linea = bfEntry.readLine();

            long head, tale;
            while((linea = bfEntry.readLine()) != null) {

                String tokens[] = new String[4];
                tokens = linea.split(";");
                it = indexService.getNodes("ID", tokens[0]).iterator();

                tale = it.next();
                while(!neo.getNodeProperties(tale).get("TYPE").equals("title")) 
{
                    tale = it.next();
                }
                it = indexService.getNodes("ID", tokens[1]).iterator();

                head = it.next();
                while(!neo.getNodeProperties(head).get("TYPE").equals("title")) 
{
                    head = it.next();
                }
                properties.put("NLC", tokens[2]);

                properties.put("TYPE", tokens[3]);
                properties.put("RelationshipType", "REF_TITLE");
                neo.createRelationship( tale, head, 
MyRelationshipTypes.REF_TITLE, properties );

            }
    }

Any idea?

Thank you for your help.

Vanesa.
_________________________________________________________________
¿Quieres los nuevos emoticonos en 3D? ¡Descárgatelos gratis!
http://www.vivelive.com/emoticonos3d/index2.html
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to