Jason Plurad <plu...@...>
How did you define the 'timestamp' property and the vertex-centric index that uses it? Seems strange to me that you're looking for has('timestamp, '') rather than comparing Long values.
toggle quoted message
Show quoted text
On Friday, September 22, 2017 at 10:12:44 AM UTC-4, Suny wrote: yes. the first time i query it took 129826 ms, and then 600-700 ms later on (which i believe is because of caching). Without that it is taking around 128000ms On Friday, September 22, 2017 at 10:10:57 AM UTC-4, Jason Plurad wrote: is this slow? g.V().has('type',textContains( 'car')).inE().has('timestamp', eq('')).inV().id() On Friday, September 22, 2017 at 10:07:26 AM UTC-4, Suny wrote: Thanks. I am dealing with count here. I need the attributes list on those vertices.
g.V().has('type',textContains('car')) - This is coming out very fast, which i assume is because of index in ES.
g.V().has('type',textContains('car')).inE().has('timestamp',eq('')).inV().valueMap() - This is slow. I have 1500 vertices and each vertex has about 3-5 attributes on it. I implemented vertex-centric index, on timestamp property but not sure if it is being used.
On Friday, September 22, 2017 at 8:54:54 AM UTC-4, Jason Plurad wrote: No, explain() doesn't give any clear indication currently whether an index will be utilized. I opened up an issue for that. What counts are you dealing with here? g.V().has('type',textContains('car')).count()g.V().has('type',textContains('car')).inE().count()g.V().has('type',textContains('car')).inE().has('timestamp',eq('')).count()
On Thursday, September 21, 2017 at 1:59:37 PM UTC-4, Suny wrote: I implemented vertex-centric index on edge label.
Here is the query i am doing
g.V().has('type',textContains('car')).inE().has('timestamp',eq('')).inV().valueMap()
The documentation says - JanusGraph is intelligent enough to use vertex-centric indices when available.
So can i assume that Janusgraph uses the vertex-centric index for this query ? On Thursday, September 21, 2017 at 11:05:37 AM UTC-4, Daniel Kuppitz wrote: Only in the underlying storage backend.
Cheers, Daniel
On Thu, Sep 21, 2017 at 7:57 AM, Suny <sahi...@...> wrote: Thanks. Is the vertex-centric index not stored in Elastic search. Is it only in JG ?
On Thursday, September 21, 2017 at 10:28:47 AM UTC-4, Daniel Kuppitz wrote:Thanks, All the in edges will have same label. Does it still traverse through all edges or directly find the edges with empty timestamp ?
I assume that Janus can only leverage a vertex centric index, if you specify the label, since that was the case in Titan and I don't think I heard about any changes in this area.
So in cases where i need to do lot of traversal, ES is not helpful ?
Again, ES is helpful for the initial vertex lookup. Once you start to traverse through the graph, you can only rely on vertex centric indices (or a good model that doesn't require much filtering).
Also can you explain a bit more on OLAP query
Cheers, Daniel
On Thu, Sep 21, 2017 at 7:07 AM, Suny <sahi...@...> wrote: Thanks, All the in edges will have same label. Does it still traverse through all edges or directly find the edges with empty timestamp ?
So in cases where i need to do lot of traversal, ES is not helpful ?
Also can you explain a bit more on OLAP query On Wednesday, September 20, 2017 at 2:35:27 PM UTC-4, Daniel Kuppitz wrote:You should - provide an edge label for inE()
- have a vertex centric index on timestamp
- use a simple filter, instead of traversing back to the previous vertex (unless you rely on duplicates in your result)
Something like this:
g.V().has('type', textContains('car')). filter(inE('edge-label').has('timestamp','')). valueMap()
If you expect very large results, you'd be better off using an OLAP query.
Can I make JG to use ES for traversal too ?
ES is only useful for initial / global vertex lookups.
Cheers, Daniel
On Wed, Sep 20, 2017 at 7:41 AM, Suny <sahi...@...> wrote:
Hi,
I am using JG with Cassandra and ES.
I have a type attribute on all vertices based on which i can differentiate group of vertices.
The query i want to do is
:> g.V().has('type',textContains('car')).inE().has('timestamp','').inV().valueMap()
I created an index on type attribute. If I just query for :> g.V().has('type',textContains('car')) it is coming back very fast with result. If I add the traversal part it is slowing down.
So, JG is using ES to retrieve the vertices of type 'car' and then for traversal it is using just JG. Can I make JG to use ES for traversal too ?
If i add index on edge attribute 'timestamp', does this fasten the query ?
Thanks
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/5aeb2fdc-6199-45f4-8953-866118c2d81a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/94e4f5f4-8670-403d-9038-fd64382b61a5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/e24480c8-52eb-4dd7-b511-b2722ad1bc2b%40googlegroups.com.
|