Date
1 - 5 of 5
Index not recognized?
"nt...@gmail.com" <ntrh...@...>
Hi Sparshneel,
toggle quoted message
Show quoted text
The solution works well. Thank you very much!
On Wednesday, July 1, 2020 at 11:01:35 PM UTC-7 nt...@... wrote:
Thanks Sparshneel, let me try it out.
On Wednesday, July 1, 2020 at 10:50:22 PM UTC-7, sparshneel chanchlani wrote:To enable the index u need to close all instance for graph. Use the current instance enable the index. U could close the instance by using folly methods on JanusgrapManagement object.Mgmt=graph.openManagement();mgmt.getOpenInstances().stream().forEach(instance -> { mgmt.forceCloseInstance(instance);mgmt.updateIndex(index, SchemaAction.ENABLE_INDEX);-sparshneelOn Thu, Jul 2, 2020, 8:35 AM sparshneel chanchlani <spars...@...> wrote:Did u enable the index ??On Thu, Jul 2, 2020, 4:31 AM Nguyen Trung Hieu <nt...@...> wrote:We have a JanusGraph cluster run in production for quite some time. Currently there are millions of vertices in it.--The cluster is configured with force-index=true, meaning all queries must use indexes.The graph already has multiple composite indexes on (label, property), such as:
- Vertex label: X, property: P, unique=true
- Vertex label: Y, property: P, unique=true
...(note that it is the same property P).Today we have a new requirement: adding a new vertex label Z and creating an index on vertex label: Z, property: P (same property), unique=trueI run this transaction and was able to create them:
mgmt = graph.openManagement();
mgmt.makeVertextLabel("Z").make();
mgmt.commit()
mgmt = graph.openManagement();
mgmt.buildIndex("index_Z_P", ElementType.Vertex).addKey("P").indexOnly("Z").unique().buildCompositeIndex();
mgmt.commit()I think I do not have to Reindex since the vertex label is newly created.But after that, when I tried to query
g.V().hasLabel("Z").has("P", "xxx").valueMap()I got this error:
Could not find a suitable index to answer graph query and graph scans are disabledSo my questions:
- What is wrong with the setup? Do I need to reindex for this new index and if yes, would it take long time (since the graph already has millions of vertices). I am afraid it may do a full scan to all vertices in the cluster.
- If it takes long time, is there a way to enforce this new index, since we know that there is no such vertex in the graph at the current time that has label "Z".
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 janu...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/d68bd214-c87b-48fe-97d1-e0bf2c745f3fo%40googlegroups.com.
Nguyen Trung Hieu <ntrh...@...>
Thanks Sparshneel, let me try it out.
On Wednesday, July 1, 2020 at 10:50:22 PM UTC-7, sparshneel chanchlani wrote:
To enable the index u need to close all instance for graph. Use the current instance enable the index. U could close the instance by using folly methods on JanusgrapManagement object.Mgmt=graph.openManagement();mgmt.getOpenInstances().stream().forEach( instance -> { mgmt.forceCloseInstance(instance); mgmt.updateIndex(index, SchemaAction.ENABLE_INDEX);-sparshneelOn Thu, Jul 2, 2020, 8:35 AM sparshneel chanchlani <sparshneel...@gmail.com> wrote: Did u enable the index ??On Thu, Jul 2, 2020, 4:31 AM Nguyen Trung Hieu <nt...@...> wrote:We have a JanusGraph cluster run in production for quite some time. Currently there are millions of vertices in it.--The cluster is configured with force-index=true, meaning all queries must use indexes.The graph already has multiple composite indexes on (label, property), such as:
- Vertex label: X, property: P, unique=true
- Vertex label: Y, property: P, unique=true
...(note that it is the same property P).Today we have a new requirement: adding a new vertex label Z and creating an index on vertex label: Z, property: P (same property), unique=trueI run this transaction and was able to create them:
mgmt = graph.openManagement();
mgmt.makeVertextLabel("Z").make();
mgmt.commit()
mgmt = graph.openManagement();
mgmt.buildIndex("index_Z_P", ElementType.Vertex).addKey("P").indexOnly("Z").unique().buil dCompositeIndex();
mgmt.commit()I think I do not have to Reindex since the vertex label is newly created.But after that, when I tried to query
g.V().hasLabel("Z").has("P", "xxx").valueMap()I got this error:
Could not find a suitable index to answer graph query and graph scans are disabledSo my questions:
- What is wrong with the setup? Do I need to reindex for this new index and if yes, would it take long time (since the graph already has millions of vertices). I am afraid it may do a full scan to all vertices in the cluster.
- If it takes long time, is there a way to enforce this new index, since we know that there is no such vertex in the graph at the current time that has label "Z".
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 janusgra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/ d68bd214-c87b-48fe-97d1- e0bf2c745f3fo%40googlegroups. com.
sparshneel chanchlani <sparshneel...@...>
To enable the index u need to close all instance for graph. Use the current instance enable the index. U could close the instance by using folly methods on JanusgrapManagement object.
Mgmt=graph.openManagement();
mgmt.getOpenInstances().stream().forEach(
instance -> { mgmt.forceCloseInstance(instance);
mgmt.updateIndex(index, SchemaAction.ENABLE_INDEX);
-sparshneel
On Thu, Jul 2, 2020, 8:35 AM sparshneel chanchlani <sparshneel...@...> wrote:
Did u enable the index ??On Thu, Jul 2, 2020, 4:31 AM Nguyen Trung Hieu <ntrh...@...> wrote:We have a JanusGraph cluster run in production for quite some time. Currently there are millions of vertices in it.--The cluster is configured with force-index=true, meaning all queries must use indexes.The graph already has multiple composite indexes on (label, property), such as:
- Vertex label: X, property: P, unique=true
- Vertex label: Y, property: P, unique=true
...(note that it is the same property P).Today we have a new requirement: adding a new vertex label Z and creating an index on vertex label: Z, property: P (same property), unique=trueI run this transaction and was able to create them:
mgmt = graph.openManagement();
mgmt.makeVertextLabel("Z").make();
mgmt.commit()
mgmt = graph.openManagement();
mgmt.buildIndex("index_Z_P", ElementType.Vertex).addKey("P").indexOnly("Z").unique().buildCompositeIndex();
mgmt.commit()I think I do not have to Reindex since the vertex label is newly created.But after that, when I tried to query
g.V().hasLabel("Z").has("P", "xxx").valueMap()I got this error:
Could not find a suitable index to answer graph query and graph scans are disabledSo my questions:
- What is wrong with the setup? Do I need to reindex for this new index and if yes, would it take long time (since the graph already has millions of vertices). I am afraid it may do a full scan to all vertices in the cluster.
- If it takes long time, is there a way to enforce this new index, since we know that there is no such vertex in the graph at the current time that has label "Z".
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 janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/d68bd214-c87b-48fe-97d1-e0bf2c745f3fo%40googlegroups.com.
sparshneel chanchlani <sparshneel...@...>
Did u enable the index ??
On Thu, Jul 2, 2020, 4:31 AM Nguyen Trung Hieu <ntrh...@...> wrote:
We have a JanusGraph cluster run in production for quite some time. Currently there are millions of vertices in it.--The cluster is configured with force-index=true, meaning all queries must use indexes.The graph already has multiple composite indexes on (label, property), such as:
- Vertex label: X, property: P, unique=true
- Vertex label: Y, property: P, unique=true
...(note that it is the same property P).Today we have a new requirement: adding a new vertex label Z and creating an index on vertex label: Z, property: P (same property), unique=trueI run this transaction and was able to create them:
mgmt = graph.openManagement();
mgmt.makeVertextLabel("Z").make();
mgmt.commit()
mgmt = graph.openManagement();
mgmt.buildIndex("index_Z_P", ElementType.Vertex).addKey("P").indexOnly("Z").unique().buildCompositeIndex();
mgmt.commit()I think I do not have to Reindex since the vertex label is newly created.But after that, when I tried to query
g.V().hasLabel("Z").has("P", "xxx").valueMap()I got this error:
Could not find a suitable index to answer graph query and graph scans are disabledSo my questions:
- What is wrong with the setup? Do I need to reindex for this new index and if yes, would it take long time (since the graph already has millions of vertices). I am afraid it may do a full scan to all vertices in the cluster.
- If it takes long time, is there a way to enforce this new index, since we know that there is no such vertex in the graph at the current time that has label "Z".
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 janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/d68bd214-c87b-48fe-97d1-e0bf2c745f3fo%40googlegroups.com.
Nguyen Trung Hieu <ntrh...@...>
We have a JanusGraph cluster run in production for quite some time. Currently there are millions of vertices in it.
The cluster is configured with force-index=true, meaning all queries must use indexes.
The graph already has multiple composite indexes on (label, property), such as:
- Vertex label: X, property: P, unique=true
- Vertex label: Y, property: P, unique=true
...
(note that it is the same property P).
Today we have a new requirement: adding a new vertex label Z and creating an index on vertex label: Z, property: P (same property), unique=true
I run this transaction and was able to create them:
mgmt = graph.openManagement();
mgmt.makeVertextLabel("Z").make();
mgmt.commit()
mgmt = graph.openManagement();
mgmt.buildIndex("index_Z_P", ElementType.Vertex).addKey("P").indexOnly("Z").unique().buildCompositeIndex();
mgmt.commit()
I think I do not have to Reindex since the vertex label is newly created.
But after that, when I tried to query
g.V().hasLabel("Z").has("P", "xxx").valueMap()
I got this error:
Could not find a suitable index to answer graph query and graph scans are disabled
So my questions:
- What is wrong with the setup? Do I need to reindex for this new index and if yes, would it take long time (since the graph already has millions of vertices). I am afraid it may do a full scan to all vertices in the cluster.
- If it takes long time, is there a way to enforce this new index, since we know that there is no such vertex in the graph at the current time that has label "Z".
Thanks,