[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-05 Thread alessandrorota04
Hi, can you post your code ? Regards, Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For more

[orientdb] Re: Query comprehension question

2015-06-09 Thread alessandrorota04
Hi, for the second case only, try this query select from (traverse outE(access),out(access) from #12:17) where @class= 'access' and (in = #13:8 or out= #12:17) Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To unsubscribe

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
Hi, class Data must implement Serializable and provide for this class get method. Try this code first.setProperty(name,anything); first.setProperty(DATA, data.getList()); Regards, Alessandro -- --- You received this message because you are subscribed to the Google

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
Hi, try this code Data data = new Data(); data.addData(a,b,c); Gson gson = new Gson(); String json = gson.toJson(data); Vertex first = graph.addVertex(null); first.setProperty(name,anything); first.setProperty(allprop,json.toString()); Regards, Alessandro

[orientdb] Re: Database 'GratefulDeadConcerts' is not configured on server

2015-06-08 Thread alessandrorota04
Hi, you can try to reinstall orientdb-2.1-rc3 Regards, Alessandro -- --- 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

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
Hi, i have tried this code and it seems to work OrientGraph graph = new OrientGraph(memory:test); Data data = new Data(); data.setNome(New Data); data.addData(a,b,c); JSONObject json=new JSONObject(); json.put(data, data); Vertex first =

[orientdb] Re: Orientdb graph database storing objects in vertices

2015-06-08 Thread alessandrorota04
Hi, I have created a small example with the class Data and the class Test Let me know if it works. Alessandro -- --- 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

[orientdb] Re: Select distinct vertices according to edge filter

2015-06-03 Thread alessandrorota04
Hi Lior, try this query select distinct(id) as id from (select expand( $c ) let $a = ( SELECT outV() as id FROM Called WHERE start_time10 AND end_time11 ), $b = ( SELECT inV() as id FROM Called WHERE start_time10 AND end_time11 ), $c = unionAll( $a, $b )) Alessandro -- --- You

[orientdb] Re: Select distinct vertices according to edge filter

2015-06-03 Thread alessandrorota04
Hi, for the first question you can use the DISTINCT clause, for example : SELECT distinct(outV()) FROM Called WHERE start_timeX AND end_timeY Bye, Alessandro Il giorno lunedì 1 giugno 2015 20:36:59 UTC+2, Lior Neudorfer ha scritto: Hi, two small questions from an OrientDB beginner... I

[orientdb] Re: Does the AVG() method supports some parameter to return decimal values as well?

2015-06-03 Thread alessandrorota04
Hi, if your rating is an integer variable, the method avg() will return an integer value. So either you change the type of the variable, or use this query select AVG(rating.asFloat()) from Ratings Alessandro -- --- You received this message because you are subscribed to the Google

[orientdb] Re: select custom function in graph.command

2015-06-10 Thread alessandrorota04
Hi Bryan, can you post your schema ? Regards, Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For more

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-10 Thread alessandrorota04
Hi, can you post your schema, because i don't sure if i have understand it very well. Alessandro -- --- 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

[orientdb] Re: The vertex has been deleted

2015-06-04 Thread alessandrorota04
Hi Mohammad, I tried your code using the graph java api and v2.0.10 of orientdb and it works. Try to write : OrientVertex vertex = graph.addVertex(class:test); graph.commit() OrientGraph graph2 = graphFactory.getTx(); vertex.setProperty(test, value); Regards, Alessandro -- --- You

[orientdb] Re: The vertex has been deleted

2015-06-04 Thread alessandrorota04
Hi Mohammad, you can post all the code of the class test. Regards, Alessandro -- --- 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

[orientdb] Re: Query comprehension question

2015-06-09 Thread alessandrorota04
Hi, when you use traverse out() you get only the outgoing vertexes, I have wrote in the query outE() because I want to get also the outgoing edges. With the out= I want to get the edge that have as outgoing vertex, the vertex with @rid=#12:17 Alessandro -- --- You received this message

[orientdb] Re: Help on query syntax

2015-06-09 Thread alessandrorota04
Hi, can you post your schema ? Regards, Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For more

[orientdb] Re: OrientDB direct/indirect edges

2015-06-23 Thread alessandrorota04
Hi Pasquale, for the first question try this code OrientGraph g=new OrientGraph(path); OClass cl=g.createVertexType(MyVertex, V); OClass cl2=g.createEdgeType(MyEdge, E); cl2.createProperty(out,OType.LINK, cl); Regards, Alessandro -- --- You received this message because you are subscribed

[orientdb] Re: OrientDB direct/indirect edges

2015-06-23 Thread alessandrorota04
Hi , for the second question i think that you must create two edges with different orientation OrientEdge eFriend=g.addEdge(class:friend, ListPerson.get(j), ListPerson.get(j+1), null); OrientEdge eFriend=g.addEdge(class:friend, ListPerson.get(j+1), ListPerson.get(j), null); Alessandro --

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, try this function with the parameter record = {rid:123,val:{name:Norman,phone:Home}} var obj = JSON.parse(record); var rid= obj.rid; var val = obj.val; var name= val.name; var phone= val.phone; return name; Regards, Alessandro -- --- You received this message because you are

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, if you try with broswe you can get only the value Norman Alessandro -- --- 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

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, if you try with broswe you can get only the value Norman https://lh3.googleusercontent.com/-XhisYFd7bEc/VYwSC3DiNbI/ABY/i0z7OJ4-GBM/s1600/Funzione.png Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-25 Thread alessandrorota04
Hi Norman, I think that being the format JSON, when you return the object you will have also the fields @type and @version. Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To unsubscribe from this group and stop receiving emails

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-25 Thread alessandrorota04
Hi Bill, if you use orientdb-2.1-rc3, the following instructions work update App add xOut = [#14:1] where @rid=#12:1 update #12:1 add xOut = [#14:1] Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To unsubscribe from this group and

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-25 Thread alessandrorota04
Hi Bill, which version of OrientDb are you using? Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For

[orientdb] Re: How to modify a LINKSET after initial vertex creation

2015-06-25 Thread alessandrorota04
Hi Bill, I try the query from the browse in Visual Studio and it works. Alessandro -- --- 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

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-24 Thread alessandrorota04
Hi, you can't get rid with r.getProperty('rid') because rid isn't a property but it is a metadata you can try this code var rid=r.getId().toString(); return rid; Regards, Alessandro -- --- You received this message because you are subscribed to the Google

[orientdb] Re: using results obtained from previous let statements in next statements

2015-06-24 Thread alessandrorota04
Hi, for your example you can try this query select count(*) from oemdetail where Build = $b[0].name let $b = (select sanityBuild from currenttable where version = '11.6.0') or this function var g=orient.getGraph(); var b=g.command('sql','select sanityBuild from currenttable where version =

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-24 Thread alessandrorota04
Hi Norman, can you post all the code of your function, the parameters ( and the types) and your schema Alessandro -- --- 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

[orientdb] Re: Get the longest path in a graph

2015-06-19 Thread alessandrorota04
Hi Luis, try the method getDistance(String rid_from, String rid_to) in the attached file LongestPath.java Regards, Alessandro -- --- 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,

[orientdb] Re: Creating embedded field values using server side javascript.

2015-06-19 Thread alessandrorota04
Hi Olof, if you want to put an embedded list into an embedded map try this code OClass cl=g.createVertexType(ip, V); cl.createProperty(str_a, OType.STRING); cl.createProperty(emb_b, OType.EMBEDDEDMAP); ListString lista=new ArrayListString(); lista.add(#12:1); lista.add(#12:2); ListString

[orientdb] Re: Access JSON parameters inside Javascript fuction

2015-06-26 Thread alessandrorota04
Hi Norman, try this function with the parameter record {from_rid: #12:0,to_rid: 12:1, edge_type: friend,edge_properties:{property1:value_property, property2:value2_property}} var obj = JSON.parse(record); var ridFrom= obj.from_rid; var ridTo = obj.to_rid; var edge_type= obj.edge_type; var

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-11 Thread alessandrorota04
Hi, which version of OrientDB are you using? Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For

[orientdb] Re: select custom function in graph.command

2015-06-11 Thread alessandrorota04
Hi Bryan, I had received your file and I'm working on , when I'm done I'll let you know Alessandro -- --- 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

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-11 Thread alessandrorota04
Hi, I have created this graph https://lh3.googleusercontent.com/-gCbuVFUIyqU/VXmM9RmRecI/ABA/p_5CZSvWbpQ/s1600/graph.png and when i run the query i get the following result https://lh3.googleusercontent.com/-JLhZ6drpemk/VXmNZ3fGiQI/ABI/-G5fs7lZ6Kk/s1600/risposta.png In the

[orientdb] Re: sub query not returning result

2015-06-16 Thread alessandrorota04
Hi Hamid, can you post all the code ? Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For more

[orientdb] Re: Examples for EMBEDDED, LINKEDLIST and LINKEDSET

2015-06-15 Thread alessandrorota04
Hi, this in the example with document database ODatabaseDocumentTx db = new ODatabaseDocumentTx(path); db.open(root,root); ODocument c = new ODocument(Contract); c.field(name, contract 1); c.save(); ListOIdentifiable linklist = new ArrayListOIdentifiable(); linklist.add(c); ODocument p = new

[orientdb] Re: Issue with Adding Edge. OSerializationException

2015-06-12 Thread alessandrorota04
Hi, the method getTags() is undefined for the type Object. Can you post all code ? Regards, Alessandro -- --- 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

[orientdb] Re: case insensiti index

2015-06-12 Thread alessandrorota04
Hi, I think that the property and the index are dependent. If you create a property foo not ci and you create an index ci when you run the query select from Test where foo='test' you get both records with 'test' and 'Test' Regards, Alessandro -- --- You received this message because you are

[orientdb] Re: embedded , embeddedList ect

2015-06-18 Thread alessandrorota04
Hi, I think that this behavoir is that expected. Embeddedlist allows duplicate values, but the list isn't ordered and then when you add a value in embeddedlist this value will be the last. Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups

[orientdb] Re: A Hint for the IN-Operator needed

2015-06-15 Thread alessandrorota04
Hi, you can find an example of using unionall here http://orientdb.com/docs/last/SQL.html For example select expand($c) let $a = (select from categories), $b = (select from contract), $c = unionAll( $a, $b ) Regards, Alessandro -- --- You received this message because you are subscribed

[orientdb] Re: Create edge from the same class data

2015-05-29 Thread alessandrorota04
Hi Kapil, have you got a screenshot of your schema ? Bye, Alessandro Il giorno venerdì 29 maggio 2015 09:12:37 UTC+2, Kapil Ranade ha scritto: I have imported hierarchical data into OrientDB from RDMBS using OETL. In RDBMS we used to store parentId in the same row. e.g. the table

[orientdb] Re: Create edge from the same class data

2015-06-01 Thread alessandrorota04
Hi Kapil, try this function var g=orient.getGraph(); var b=g.command('sql','select from Nodex') for(i=0;ib.length;i++){ var id=b[i].getProperty(id); var rid=b[i].getId().toString() + ; var sql2=create edge hasParent from + rid + to ( select from Nodex where parent_id = ' + id + ');

[orientdb] Re: Querying based on an attribute

2015-06-01 Thread alessandrorota04
Hi, try this query select expand(in('Accepts').in('Specializes')) from (select expand(out('Specializes').out('Accepts')[name= 'aetna']) from Specialty) Bye, Alessandro Il giorno venerdì 8 maggio 2015 22:35:58 UTC+2, Topping Bowers ha scritto: Hello! I'm trying to do a query that says select

[orientdb] Re: [Problem] [First Try] reloading objects java

2015-06-01 Thread alessandrorota04
Hi Jean, try this code in the class ObjectStorer OObjectIteratorClassOrder i = tx.browseClass(Order.class) ; for (Order or : i){ or.getName(); ListOrderItem listOrderItem=or.getItems(); for(OrderItem it:listOrderItem){ it.getName(); it.getId(); it.getValue(); } System.out.println (or); } Bye,

[orientdb] Re: A Graph Query question

2015-05-28 Thread alessandrorota04
Hi Brett, I created this graph. https://lh3.googleusercontent.com/-eBuwdEviNlA/VWbG3rKU0JI/AAM/VnARgS89xx4/s1600/graph.png and when I run the query I get these results. https://lh3.googleusercontent.com/-v_308smPzS8/VWbIQR7iLmI/AAY/T7S2fiFV3kE/s1600/query.png I hope it can

[orientdb] Re: A Graph Query question

2015-05-28 Thread alessandrorota04
Hi Brett, if I understand the problem, try this query select name , in('Discuss').in('Started').out('Started')[roomId] from Item Bye, Alessandro Il giorno sabato 23 maggio 2015 04:17:19 UTC+2, Brett Coffin ha scritto: I am building a chat room engine and I have a graph like so:

[orientdb] Re: Where to start

2015-05-27 Thread alessandrorota04
Hi Luis, this is a simple example, I create two Vertex and one Edge OrientGraph g=new OrientGraph(path); // create class Person OClass cl=g.createVertexType(Person, V); cl.createProperty(name, OType.STRING); cl.createProperty(surname, OType.STRING); // create edge Friend

[orientdb] Re: select custom function in graph.command

2015-06-30 Thread alessandrorota04
Hi Bryan, I think that is a bug and I don't know how to solve the problem. Alessandro -- --- 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

[orientdb] Re: Difference between graph shutdown and graph drop?

2015-07-02 Thread alessandrorota04
Hi, you can use the graph.shutdown() when you want to release the OrientGraph instance. Regards, Alessandro -- --- 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

[orientdb] Re: Help on query syntax

2015-06-11 Thread alessandrorota04
Hi Giovanni, I have tried the query SELECT EXPAND( out('hasDetail') ) FROM Module WHERE code = 'Module' and I have got only the vertex Module with the code Module https://lh3.googleusercontent.com/-nTMG__qvPHc/VXlFvHS79fI/AAo/MY3f3LPQwsk/s1600/module.png Regards, Alessandro -- ---

[orientdb] Re: Update en embedded list of string field by adding another string value

2015-06-11 Thread alessandrorota04
Hi, I failed with sql and then i have tried with java api OrientGraph g=new OrientGraph(currentPath); String colorToAdd=blue; IterableVertex result=g.command(new OSQLSynchQueryVertex(select from Person where perName='Luca')).execute(); for(Vertex v:result){ OTrackedList

[orientdb] Re: Deleting a class with a name containing special characters

2015-05-25 Thread alessandrorota04
Hi, first try to delete the verteces of the class and after delete the class. Bye, Alessandro Il giorno martedì 12 maggio 2015 00:29:38 UTC+2, retrography ha scritto: Hi Everyone, I have made a class by mistake that has special characters in its name. It is called: = _orphan_files I

[orientdb] Re: How to limit N item per group

2015-05-25 Thread alessandrorota04
Hi, try use the top clause limit. Bye, Alessandro Il giorno mercoledì 13 maggio 2015 01:14:37 UTC+2, z0mbie42 ha scritto: Hi all, I have a model like this : (User)-[SentMessage]-(message)-[MessageTo]-(ChatRoom) and i want to retrieve only the 10 last messages In a given ChatRoom for now

[orientdb] Re: Querying based on an attribute

2015-05-25 Thread alessandrorota04
Hi, try this SQLquery select * from (select expand(out('Specializes').out('Accepts') from Specialty)) where name='aetna' Bye, Alessandro Il giorno venerdì 8 maggio 2015 22:35:58 UTC+2, Topping Bowers ha scritto: Hello! I'm trying to do a query that says select all vertexes where there is a

[orientdb] Re: A Graph Query question

2015-05-25 Thread alessandrorota04
Hi Brett, try this SQLquery select name,in('Discuss').roomId from (select expand(out('Started').out('Discuss')) from User where name = 'julie') Bye, Alessandro Il giorno sabato 23 maggio 2015 04:17:19 UTC+2, Brett Coffin ha scritto: I am building a chat room engine and I have a graph like so:

[orientdb] Re: EmbeddedSet vs LinkSet

2015-08-13 Thread alessandrorota04
Hi Athanassios, I hope these two examples can help you. EmbeddedSet: it will create a field animals that contain dog, cat, parrot insert into Person(name,animals) values('alessandro',['dog','cat','parrot','dog'])

[orientdb] Re: delete vertex not working with out where

2015-08-13 Thread alessandrorota04
Hi, Could you send me your database so that I can test it or tell me the type of property1. The previous function written in Java with JavaScript is the following: var g=orient.getGraph(); for(j=0;j3;j++){ g.command('sql','DELETE VERTEX MyVertex LIMIT 100'); g.commit(); } Regards,

[orientdb] Re: Cannot change property type from LINK to STRING

2015-08-13 Thread alessandrorota04
Hi Athanassios, I have the same problem. I found this link http://t12750.db-orientdb-user.databasetalk.us/error-when-trying-to-alter-property-type-t12750.html and I think that the functionality of change property type is not yet supported. Regards, Alessandro -- --- You received this

[orientdb] Re: EmbeddedSet vs LinkSet

2015-08-13 Thread alessandrorota04
Hi, I think that there aren't differences between EmbeddedSet of Link and LinkSet. Alessandro -- --- 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

[orientdb] Re: Date search query example using a LUCENE FULLTEXT index

2015-08-17 Thread alessandrorota04
Hi Mark, try this query SELECT FROM Book WHERE [title, language, author, genre, description, created] LUCENE ( (title:midwest*) AND (author:stradal*) AND created:['2015-01-01 00:00:00'] TO ['2015-09-01 00:00:00}' ) Regards, Alessandro -- --- You received this message because you are

[orientdb] Re: OTrackedMap returns a different type on second retrieval

2015-08-17 Thread alessandrorota04
Hi José, can you send me the complete code of your function so I can understand why this ecception is generated ? Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To unsubscribe from this group and stop receiving emails

[orientdb] Re: Date search query example using a LUCENE FULLTEXT index

2015-08-17 Thread alessandrorota04
Hi Mark, try to create two index as in the image below https://lh3.googleusercontent.com/-o9gnuMHmCJc/VdHs4disrhI/AFY/ahnTsavN7_Q/s1600/index.png and try this query SELECT FROM Book WHERE [title, language, author, genre, description] LUCENE ((title:midwest*) AND (author:stradal*)) and

[orientdb] Re: OrientGraphQuery.has() method does not work in version 2.1

2015-08-21 Thread alessandrorota04
Hi, I had the same problem with parent.query().direction(Direction.OUT).has(name, child name).vertices().iterator(); You can use this command IterableVertex it=g.command(new OSQLSynchQueryVertex(select from (select expand(out()) from +parent.getId()+) where name='child name')).execute();

[orientdb] Re: using oetl to import table from mysql

2015-08-17 Thread alessandrorota04
Hi Sam, in the file .json you can define the type of your fields as follows { csv: { separator: ,, columns:[ date:datetime, type:string, phone:string, old_token:string, new_token:string] } }, Regards, Alessandro -- --- You received this message because you are

[orientdb] Re: update/upsert in orient db using document api, using 2.0.13 CE

2015-08-17 Thread alessandrorota04
Hi, you can see the attachments and test the code I put the condition of the upsert on the field ObjId Regards, Alessandro -- --- 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

[orientdb] Re: select custom function in graph.command

2015-06-29 Thread alessandrorota04
Hi Bryan, I'm sorry if I have not responded more. I have tried several times and the function getBestReply works correctly from Studio but when the function is called from java api don't work. Alessandro -- --- You received this message because you are subscribed to the Google Groups

[orientdb] Re: How to store JSON - as object or string?

2015-06-29 Thread alessandrorota04
Hi Joao, this is an example of code for Embedded List from java api OrientGraph g=new OrientGraph(currentPath); OClass cl=g.createVertexType(Person, V); cl.createProperty(name, OType.STRING); cl.createProperty(lista, OType.EMBEDDEDLIST); ListAuto lista1=new ArrayListAuto(); lista1.add(new

[orientdb] Re: Studio: insertion with nidation

2015-06-29 Thread alessandrorota04
Hi Marco, I use orientdb-2.1-rc4 and I have defined this schema https://lh3.googleusercontent.com/-_twlggp1CAk/VZD8OxOgGgI/ACY/3rCzBQJH6LE/s1600/schema.png and I have try these queries https://lh3.googleusercontent.com/-UidP8ePaEzE/VZD8YN-ckiI/ACg/gZMF1tfn8n0/s1600/query.png

[orientdb] Re: OETL import: Is there any way to import EmbeddedMap

2015-07-28 Thread alessandrorota04
Hi Alex, can you send me your file .json ? Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For more

[orientdb] Re: What is the proper way to read only one elementh of Embedded list?

2015-07-28 Thread alessandrorota04
Hi, you can not read the entire list. To read the last item uses your code List list=(ListODocument) document.field(AdresList); System.out.println(list.get(list.size()-1)); while to read the i-th element you can use System.out.println(list.get(i)); Regards, Alessandro -- --- You received

[orientdb] Re: What is the proper way to read only one elementh of Embedded list?

2015-07-28 Thread alessandrorota04
Hi, if you want to get the i-th element try this code: int i=5; String query=select AdresList[+i+] as item from Person; IterableODocument result5=db.command(new OSQLSynchQueryODocument(query)).execute(); for(ODocument v:result5){ System.out.println(v.field(item)); } Regards, Alessandro --

[orientdb] Re: What is the proper way to read only one elementh of Embedded list?

2015-07-28 Thread alessandrorota04
Hi, to read the last item you can use IterableODocument result=db.command(new OSQLSynchQueryODocument(select last(AdresList) as last from Person)).execute(); for(ODocument v:result){ System.out.println(v.field(last)); } Alessandro -- --- You received this message because you are subscribed

[orientdb] Re: #URGENT #ETL #LINK #LIGHTWEIGHT_EDGES #BIDIRECTIONAL_REFERENCE

2015-07-28 Thread alessandrorota04
Hi, I did not manage to create a bi-directional lightweight with .json configuration by using ETL. If you want you can create the link from the class A to the class B using ETL and after you can use this javascript function to create the edges from B to A. var g=orient.getGraph(); var

[orientdb] Re: Can't get a query with CONTAINSALL to work

2015-07-31 Thread alessandrorota04
Hi, you can use this query: select from Person where $parents containsAll (@rid in $current.in_Child) and $parents.size() = in('Child').size() and @rid#11:3 let $parents= (select expand(in('Child')) from #11:3) Regards, Alessandro -- --- You received this message because you are subscribed

[orientdb] Re: UPDATE Array Value

2015-08-04 Thread alessandrorota04
Hi Michael, I have the same problem I created a function javascript or java code to solve the problem JavaScript function : parameter = i and newValue var g=orient.getGraph(); var b=g.command('sql','select from model'); var values=[; for(j=0;jb.length;j++){ var data=b[j].getProperty('data');

[orientdb] Re: SQL last edge

2015-07-29 Thread alessandrorota04
Hi Simon, you can use this query select expand(last(out('book_has_author'))) from Book Regards, Alessandro -- --- 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

[orientdb] Re: Java Tinkerpop method dropDatabase() with iDatabaseName parameter

2015-07-29 Thread alessandrorota04
Hi Daniel, look at the chapter Drop Database at this link http://orientdb.com/docs/last/Server-Management-Java.html or https://code.google.com/p/orient/wiki/ServerManagementJava You must specify the storage name in dropDatabase method. public OServerAdmin dropDatabase(String storageType) throws

[orientdb] Re: ETL: import csv without dividing table

2015-07-29 Thread alessandrorota04
Hi, can you post the schema of your classes ? Regards, Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com.

[orientdb] Re: ETL: import csv without dividing table

2015-07-29 Thread alessandrorota04
Hi Nicolas, I think that is not possible with ETL. Attached You can find the java code for what you need. Regards, Alessandro -- --- 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,

[orientdb] Re: Can't get a query with CONTAINSALL to work

2015-07-30 Thread alessandrorota04
Hi, This example should help : select from Person where children contains ( married = true ) // select people who have at least one child with married = true select from Person where children containsAll ( married = true ) // select people who have all the children with married = true Regards,

[orientdb] Re: Get the class heirarchy of a vertex

2015-07-31 Thread alessandrorota04
Hi Chris, can you send me your schema ? Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For more

[orientdb] Re: Orient DB :OSQLSynchQuery

2015-08-11 Thread alessandrorota04
Hi, I try your code and I think that the problem is (IterableVertex) txGraph.command(cmd1).execute(). When you use this instruction for the first time it works, but if you use it a second time it doesn't works. Try using the command once and convert IterableVertex in ListVertex and after you

[orientdb] Re: Aggregating weights, and random walk

2015-08-11 Thread alessandrorota04
Hi Josh, for the second question you can use a server-side function like this var g=orient.getGraph(); var query=select name, sum(weigth) from (select weigth,inV().name as name from (select expand(outE('metadata_of')); query+= from (select from Document where name in + names + ))) group by

[orientdb] Re: UPDATE Array Value

2015-08-05 Thread alessandrorota04
Hi Michael, try this code: Javascript: var g=orient.getGraph(); var b=g.command('sql','select from model'); var values=[; for(j=0;jb.length;j++){ var data=b[j].getProperty('data'); var size=data.size(); if(isize i=0){ data.set(i,newValue); var

[orientdb] Re: Distributed architecture - help setting replica

2015-08-14 Thread alessandrorota04
Hi, could help you look at this link https://groups.google.com/forum/#!searchin/orient-database/HOT$20ALIGNAMENT$20STILL$20NOT/orient-database/5NCen4Zxfjs/5R1sVIrd7FAJ Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To

[orientdb] Re: Aggregating weights, and random walk

2015-08-12 Thread alessandrorota04
Hi Josh, I did not understand your first question, can you explain what you want to achieve ? What you mean by centrality of the metadata ? Your structure is like that in Figure 1 or such as that in Figure 2, or neither ?

[orientdb] Re: delete vertex not working with out where

2015-08-12 Thread alessandrorota04
Hi, I tried to cancel 3,000,000 of vertices with this java code and I had no problems. for(int j=0;j3;j++){ g.command(new OCommandSQL(DELETE VERTEX MyVertex LIMIT 100)).execute(); g.commit(); } Let me know how it goes. Regards, Alessandro. -- --- You received this message because you

[orientdb] Re: delete vertex not working with out where

2015-08-10 Thread alessandrorota04
Hi, try to use DELETE VERTEX MyVertex LIMIT 100. Alessandro -- --- 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 orient-database+unsubscr...@googlegroups.com. For

[orientdb] Re: delete vertex not working with out where

2015-08-10 Thread alessandrorota04
Hi, try to use DELETE VERTEX MyVertex LIMIT 100 instead of DELETE VERTEX MyVertex BATCH 100. Alessandro -- --- 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

[orientdb] Re: delete vertex not working with out where

2015-08-10 Thread alessandrorota04
Hi, if you want to delete all vertexes of a class use this command truncate class MyClass unsafe Regards, Alessandro -- --- 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

[orientdb] Re: Cannot load database's configuration. The database seems to be corrupted.

2015-08-14 Thread alessandrorota04
Hi, try to use OrientDb server and connect via remote protocol. Regards, Alessandro -- --- 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

[orientdb] Re: How to determine full path with multiple starting points?

2015-07-22 Thread alessandrorota04
Hi Gary, if you want to get the path you can use this query: select $path from (traverse in(link) from [ starting nodes ]) Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB group. To unsubscribe from this group and stop receiving

[orientdb] Re: OETL import: Is there any way to import EmbeddedMap

2015-07-27 Thread alessandrorota04
Hi Alex, I have solved the problem so: 1) this is the column val in the .csv https://lh3.googleusercontent.com/-gKQ-cMy95uY/VbYsdkLvPPI/ADA/YTKydvjZavc/s1600/csv.png 2) this is the column val in my db

[orientdb] Re: GROUP BY not working as expected

2015-07-27 Thread alessandrorota04
Hi Ivan, try this query select stat, sum(val) as val from ( select mea.s as stat, mea.v as val from ( select mea from Measurement where @rid=#12:0 unwind mea )) group by stat https://lh3.googleusercontent.com/-9ngvzTT_NW0/VbX813ByX9I/ACw/b7FJkPARM3k/s1600/Measurement.png Regards,

[orientdb] Re: Curious about Time Series Use Case

2015-07-22 Thread alessandrorota04
Hi, at this link http://orientdb.com/orientdb-improved-sql-filtering/ I have founded Squared brackets [] allow to: - filtering by one index, example out()[0] - filtering by multiple indexes, example out()[0,2,4] - filtering by ranges, example out()[0-9] - filtering by equal conditions (only

[orientdb] Re: Update edge property

2015-07-14 Thread alessandrorota04
Hi, try this example update #18:0 set name='newName' Regards, Alessandro -- --- 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

[orientdb] Re: Time Series Java API example

2015-07-14 Thread alessandrorota04
Hi Simon, of course you can add a new log to a certain hour After create the log insert into log(priority) values ('very high') you can update the hour and add the log that you have created update #12:0 add logs= [#11:4] #12:0 is the rid of the hour #11:4 is the rid of the log Regards,

[orientdb] Re: Curious about Time Series Use Case

2015-07-20 Thread alessandrorota04
Hi Eric, the query would be something like : SELECT expand(out('haveMonth')[month=3].out('haveDay')[day=20].out('haveHour')[hour=10].out('haveLogs')) FROM Year WHERE year = 2012 Regards, Alessandro -- --- You received this message because you are subscribed to the Google Groups OrientDB

[orientdb] Re: Problems parsing OrientDB sql commands with nested quotes ?

2015-07-20 Thread alessandrorota04
Hi Athanassios, you have a problem if you use ' because of text Wong Kar Wai's that contains '. Regards, Alessandro -- --- 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

[orientdb] Re: insert as select nested json problem

2015-07-20 Thread alessandrorota04
Hi Anton, try this function with the parameter message {id: 123, text: aaa, user: [{id: 200, name: bbb},{ id: 201, name: ccc}]} var obj = JSON.parse(message); var user=obj.user; var g=orient.getGraph(); for(i=0;iuser.length;i++){ var content='id' : '+ user[i].id+' , 'name' : '+

  1   2   3   4   >