[orientdb] Re: Good query for for edges regarding start and end vertex.

2016-12-05 Thread Ray Neiheiser
It's very strange also with:

StreamSupport.stream(startNodes.spliterator(), false).flatMap(vertex1 -> 
StreamSupport.stream(vertex1.getEdges(Direction.OUT, 
relationshipId).spliterator(), false)).collect(Collectors.toList())
It seems like I am unable to detect the outgoing edges of the vertices.
They seem to be all null.

I've added them like this:


Iterable startNodes = this.getVertexList(storage.getStartNode(), graph);
Iterable endNodes = this.getVertexList(storage.getEndNode(), graph);

for (Vertex startNode : startNodes)
{
for (Vertex endNode : endNodes)
{
String edgeClass = "class:" + storage.getId();
Edge edge = startNode.addEdge(edgeClass, endNode);

for (Map.Entry entry : 
storage.getProperties().entrySet())
{
edge.setProperty(entry.getKey(), entry.getValue());
}
edge.setProperty(Constants.TAG_HASH, 
HashCreator.sha1FromRelationship(storage));
edge.setProperty(Constants.TAG_SNAPSHOT_ID, snapshotId);
}
}
graph.commit();

And it only detect ingoing vertices not the outgoing ones.


Am Freitag, 2. Dezember 2016 23:07:29 UTC-2 schrieb Ray Neiheiser:
>
> That seems like an option.
> But isn't there any option in gremlin/blueprints for it?
>
> Titan also uses gremlin and I can use:
>
> GraphTraversal tempOutput =  
> graph.traversal().V(nodeStartList.toArray()).bothE().filter(__.otherV().is(P.within(nodeEndList.toArray(;
>
> Which will give me exactly what I want.
>
>
> Am Freitag, 2. Dezember 2016 01:23:04 UTC-2 schrieb Ivan Mainetti:
>>
>> not sure if this may work for you, but you could query via sql something 
>> like
>>
>> select from E where out contains [, , > >] and in contains [, , ] and > property>="something"
>>
>>
>>
>> Il giorno mercoledì 30 novembre 2016 15:19:24 UTC+1, Ray Neiheiser ha 
>> scritto:
>>>
>>> I have some performance problems with reading edges depending on their 
>>> start and end nodes. Is there a better way than checking every edges end 
>>> vertex of every start vertex?
>>>
>>> Iterable startNodes = 
>>> getVertexList(relationshipStorage.getStartNode(), graph);
>>> Iterable endNodes = 
>>> getVertexList(relationshipStorage.getEndNode(), graph);
>>>
>>> List list = 
>>> StreamSupport.stream(startNodes.spliterator(), false)
>>> .flatMap(vertex1 -> 
>>> StreamSupport.stream(vertex1.getEdges(Direction.OUT, 
>>> relationshipId).spliterator(), false))
>>> .filter(edge -> 
>>> StreamSupport.stream(endNodes.spliterator(), false).anyMatch(vertex -> 
>>> edge.getVertex(Direction.OUT).equals(vertex)))
>>> .collect(Collectors.toList());
>>>
>>>

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] Re: How can I complete this query? arrays inside arrays

2016-12-05 Thread Academia Learning Centro de inglés y de formación
So if it works to me (add [0]) but how could I know in which position is 
the array is the temperature field, or how else could I get it?

select value.content.data.events.data.items.value.magnitude*[0]*
from CompositionVersions
where 'Temperature' in value.content.data.events.data.items.name.value


El lunes, 5 de diciembre de 2016, 11:08:03 (UTC+1), Academia Learning 
Centro de inglés y de formación escribió:
>
> Hello guys I have an element with a json value and inside it has several 
> arrays inside arrays.
>
> I want to retrieve the values of the field Temperature *only *of the 
> arrays that are of the temperature type. 
>
> But this query returns all the values with only one of the arrays is of 
> type Temperature.
>
> select value.content.data.events.data.items.value.magnitude 
> from CompositionVersions 
> where 'Temperature' in value.content.data.events.data.items.name.value
>
>
> Thanks
>

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] ST_disjoint comare dynamically

2016-12-05 Thread thulaseeswara reddy gajjala
hi  any one can help on this query.

select St_disjoint( select st_geomfromtext( st_astext(name) )from 
PolYgonwsg where @rid='#628:0')),  select st_geomfromtext( 
st_astext(name))from PolYgonwsg where  @rid='#629:0'))

thanks

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] Re: How Do I use stored geometries in the Spatial functions?

2016-12-05 Thread thulaseeswara reddy gajjala
HI Luca,

How can I compare dynamically like this,

select St_disjoint(  st_geomfromtext(select st_astext(name)from PolYgonwsg) 
, st_geomfromtext(select st_astext(name)from smallpolygon) );

hear I am applying  St_disjoint() on two different tables which have same 
polygon data its not getting.
is I am doing wrong? or is there any way to compare two different row's or 
two different tables data dynamic values not a static data like


Select ST_Contains(ST_geomFromText('POLYGON((77.16796875 
26.068502530912397,75.7177734375 21.076171072527064,81.650390625 
19.012137871930328,82.9248046875 25.196864372861896,77.16796875 
26.068502530912397))'), ST_GeomFromText('POINT(77.420654296875 
23.23929558106523)'))

On Saturday, February 20, 2016 at 10:01:05 AM UTC+5:30, Luca Son wrote:

> I'm posting the answer given on StackOverflow about this question:
>
>
> http://stackoverflow.com/questions/35498121/how-do-i-use-stored-geometries-in-the-spatial-functions
>

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] How can I complete this query? arrays inside arrays

2016-12-05 Thread Academia Learning Centro de inglés y de formación
Hello guys I have an element with a json value and inside it has several 
arrays inside arrays.

I want to retrieve the values of the field Temperature *only *of the arrays 
that are of the temperature type. 

But this query returns all the values with only one of the arrays is of 
type Temperature.

select value.content.data.events.data.items.value.magnitude 
from CompositionVersions 
where 'Temperature' in value.content.data.events.data.items.name.value


Thanks

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] Location of the Binary API code

2016-12-05 Thread 'scott molinari' via OrientDB
Hi,

This may seem like a strange and nooby question, but where in the expanses 
of the ODB code can I find the actual binary API code?

Scott

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


[orientdb] Re: [HELP] find document inside list

2016-12-05 Thread Academia Learning Centro de inglés y de formación
This does not work, I need to find a field inside a json value, which 
inside has more nested fields and values, but I do not know the path

El viernes, 2 de diciembre de 2016, 11:51:36 (UTC+1), user.w...@gmail.com 
escribió:
>
> Hi,
>
> try this:
>
> select from EHR where compositionsList.class contains "composition"
>
> Hope it helps
>
> Regards,
> Michela
>

-- 

--- 
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 options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Mass insertion of vertices very slow, is it necessary Performance Tuning?

2016-12-05 Thread Aceitunas y encurtidos Quijote
Hi, I do this:

//Comprobamos si existe ya elemento Composition padre para esta 
composicion-version
String queryComposition = "select from Composition where idComposition = '" 
+ idComposition + "' ";
Iterable result = graph.command(new 
OSQLSynchQuery(queryComposition)).execute();

//Si existia
if (result.iterator().hasNext()){

}



El viernes, 2 de diciembre de 2016, 20:19:32 (UTC+1), l.garulli escribió:
>
> Ok, when you create edges, how do you look for a vertex if it already 
> exists?
>
> Best Regards,
>
> Luca Garulli
> Founder & CEO
> OrientDB LTD 
>
> On 1 December 2016 at 14:22, Aceitunas y encurtidos Quijote <
> encurtid...@gmail.com > wrote:
>
>> If I am doing searches to add edges and I do not have indexes
>>
>> El jueves, 1 de diciembre de 2016, 13:02:09 (UTC+1), l.garulli escribió:
>>>
>>> Are you doing lookups and in this case, do you have indexes defined on 
>>> the lookup fields?
>>>
>>> Best Regards,
>>>
>>> Luca Garulli
>>> Founder & CEO
>>> OrientDB LTD 
>>>
>>> On 1 December 2016 at 08:48, Aceitunas y encurtidos Quijote <
>>> encurtid...@gmail.com> wrote:
>>>
 Hello, you are finished inserting:
 Inserted 1000 EHRs, 10 compositions in 58062579 ms.

 The size of the database is 940mb

 -- 

 --- 
 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-databa...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>>
>> --- 
>> 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-databa...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
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 options, visit https://groups.google.com/d/optout.