Date   

Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

I think I found the issue, I was using default mapping for all properties which are created in separate transactions.

I have a few questions -

1. Does JG support TEXTSTRING mapping SET cardinality?
2. Just want to be sure, if Default Mapping is equal to TEXT Mapping?

On Mon, Jan 10, 2022 at 10:08 PM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
It looks something like this ->


graph_search_graph-index-edge: {

mappings: {

- properties: {
   - all: { 
        type: "text"
      }, 
- graphId: {
     type: "text",
     -copy_to: [ "all"]
   }
- graphId__STRING: { type: "keyword" }

- svc_edge_key_s: {
      type: "text", 
      - copy_to: [ "all"]
}
}
}

On Mon, Jan 10, 2022 at 9:46 PM <sergeymetallic@...> wrote:
Could you please provide a ES mapping that was generated for this property?



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Concurrent Transactions on JG Edges

Aman <amandeep.srivastava1996@...>
 

Hi Marc,

Thank you for your response. This is how I'm using it:

1. I created a property key called version, which is incremented at the service layer every time an update is made on an element (vertex or edge). 

mgmt = graph.openManagement()
version = mgmt.makePropertyKey('version').dataType(Integer.class).make()
mgmt.setConsistency(name, ConsistencyModifier.LOCK)
mgmt.buildIndex("vertexIndex", Vertex.class).addKey(version, Mapping.DEFAULT.asParameter()).buildMixedIndex("esIndex")
mgmt.buildIndex("edgeIndex", Edge.class).addKey(version, Mapping.DEFAULT.asParameter()).buildMixedIndex("esIndex")
mgmt.commit()

In case mixed index already exists, I simply add the property in both vertex and edge mixed indices:
index = mgmt.getGraphIndex("edgeIndex or vertexIndex")
mgmt.addIndexKey(index, version)
In case

2. For every new edge label I create, I'm attaching this property to the edge.

mgmt = graph.openManagement() relatedTo = mgmt.makeEdgeLabel('relatedTo').make() mgmt.addProperties(relatedTo, version) mgmt.commit()

How I tested: When I'm making multiple concurrent calls via Jmeter to update an existing vertex, only one request passes, and rest throw a permanent locking exception. However, when I run same test for edges, multiple updates are successful. Few that fail are because of version check logic at service layer which kicks in a few ms after first few updates are successful.

I'm using Janus with Cassandra and Elastic Search.

Regards,

Aman


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

It looks something like this ->


graph_search_graph-index-edge: {

mappings: {

- properties: {
   - all: { 
        type: "text"
      }, 
- graphId: {
     type: "text",
     -copy_to: [ "all"]
   }
- graphId__STRING: { type: "keyword" }

- svc_edge_key_s: {
      type: "text", 
      - copy_to: [ "all"]
}
}
}

On Mon, Jan 10, 2022 at 9:46 PM <sergeymetallic@...> wrote:
Could you please provide a ES mapping that was generated for this property?



--
Regards,

Harshit Sharma
+91-9901459920


Re: Concurrent Transactions on JG Edges

hadoopmarc@...
 

Hi Aman,

The JanusGraph docs on consistency, cqlLocking do not limit its use to vertices. Can you please show how you translated the example from https://docs.janusgraph.org/advanced-topics/eventual-consistency/#data-consistency for vertex properties to the locking of edge properties?

Best wishes,    Marc


Re: Janusgraph not able to find suitable index for a index enabled property key

sergeymetallic@...
 

Could you please provide a ES mapping that was generated for this property?


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

Yes it is TEXTSTRING


On Mon, Jan 10, 2022 at 5:33 PM Boxuan Li <liboxuan@...> wrote:
Sorry, I meant to ask

Are you sure "key1" has TEXTSTRING mapping, rather than TEXT mapping?

On Mon, Jan 10, 2022 at 8:01 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Yes, key1 is of TEXT String mapping because I'm creating only TEXT or TEXTSTRING type of mapping.

I can try to update but looks like an upgrade from 0.5.2 to 0.6.0 involve some major changes and things are breaking in my local

On Mon, Jan 10, 2022 at 5:23 PM Boxuan Li <liboxuan@...> wrote:
You mentioned that 
 
g.V().has("key1", textContains("val") ) is working while 
g.V().has("key1","val13") is not working
 

Are you sure "key1" has TEXTSTRING mapping, rather than STRING mapping?

I am unable to reproduce it on 0.6.0. Can you try the 0.6.0 version?



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Concurrent Transactions on JG Edges

Amandeep Srivastava <amandeep.srivastava1996@...>
 

Hi, 

Is there a way by which I can prevent concurrent updates to edges? For vertices, I'm simply maintaining a version field with Lock consistency, so a concurrent update results in Permanent Locking Exception being thrown, but the same doesn't seem to work for edges.

--
Regards,
Aman


Concurrent Transactions on JG Edges

Aman <amandeep.srivastava1996@...>
 

Hi, 

Is there a way by which I can prevent concurrent updates to edges? For vertices, I'm simply maintaining a version field with Lock consistency, so a concurrent update results in Permanent Locking Exception being thrown, but the same doesn't seem to work for edges.

--
Regards,
Aman


Re: Janusgraph not able to find suitable index for a index enabled property key

Boxuan Li
 

Sorry, I meant to ask

Are you sure "key1" has TEXTSTRING mapping, rather than TEXT mapping?

On Mon, Jan 10, 2022 at 8:01 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Yes, key1 is of TEXT String mapping because I'm creating only TEXT or TEXTSTRING type of mapping.

I can try to update but looks like an upgrade from 0.5.2 to 0.6.0 involve some major changes and things are breaking in my local

On Mon, Jan 10, 2022 at 5:23 PM Boxuan Li <liboxuan@...> wrote:
You mentioned that 
 
g.V().has("key1", textContains("val") ) is working while 
g.V().has("key1","val13") is not working
 

Are you sure "key1" has TEXTSTRING mapping, rather than STRING mapping?

I am unable to reproduce it on 0.6.0. Can you try the 0.6.0 version?



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

Yes, key1 is of TEXT String mapping because I'm creating only TEXT or TEXTSTRING type of mapping.

I can try to update but looks like an upgrade from 0.5.2 to 0.6.0 involve some major changes and things are breaking in my local

On Mon, Jan 10, 2022 at 5:23 PM Boxuan Li <liboxuan@...> wrote:
You mentioned that 
 
g.V().has("key1", textContains("val") ) is working while 
g.V().has("key1","val13") is not working
 
Are you sure "key1" has TEXTSTRING mapping, rather than STRING mapping?

I am unable to reproduce it on 0.6.0. Can you try the 0.6.0 version?



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Boxuan Li
 

You mentioned that 
 
g.V().has("key1", textContains("val") ) is working while 
g.V().has("key1","val13") is not working
 
Are you sure "key1" has TEXTSTRING mapping, rather than STRING mapping?

I am unable to reproduce it on 0.6.0. Can you try the 0.6.0 version?


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

But this has query is working for other properties which are created in the same transaction as that of the index. They also have mapping as TEXTSTRING


On Mon, Jan 10, 2022 at 3:55 PM <sergeymetallic@...> wrote:
For these kind of queries you need TEXTSTRING mapping. As an alternative you can create composite index to "equals" queries



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

sergeymetallic@...
 

For these kind of queries you need TEXTSTRING mapping. As an alternative you can create composite index to "equals" queries


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

I tried following query
g.V().has("key1", textContains("val") ) is working while 
g.V().has("key1","val13") is not working

On Mon, Jan 10, 2022 at 1:51 PM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
Do we need reindexing even for properties created after index?

On Mon, Jan 10, 2022 at 1:39 PM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
sorry for the typo,  it is addIndexKey() only what I'm using. 

Example-

Created a vertex label -> vertexA
created a property key -> vertexA_key_s
create mixedIndex if not exist -> vertex_index 
add property key "vertexA_key_s" in vertex_index

Created a vertex label -> vertexB
created a proproperty key -> vertexB_key_s
create mixedIndex if not exist -> vertex_index 
add property key "vertexB_key_s" in vertex_index

Created a edge label -> edge1
created a proproperty key -> edge1_key_s
create mixedIndex if not exist -> edge_index 

*Note -> We are crating index (vertex_index, edge_index) on the start of the service with some system properties like graphID, name, etc)

PrintIndexes in janusgraph -

Vertex Index Name. |    Type.  | Unique.  | Backing.   | key:   Status
--------------------------------------------------------------------------------------------
vertex_index. |    Mixed | false.  | search.   | vertexA_key_s: ENABLED
| vertexB_key_s: ENABLED


Edge Index (VCI) Name. |    Type.  | Unique.  | Backing.   | key  | Status
--------------------------------------------------------------------------------------------
edge_index. |    Mixed | false.  | search.   | vedge1_key_s: ENABLED


In elastic i'm able to search on that property using endpoint /_search?q=oltp_vertexA_key_s




On Mon, Jan 10, 2022 at 12:51 PM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

Thanks for the explanation. I noticed your example code contains the following snippet:

if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)

I don’t have a computer with me right now, but IIRC there is no “addIndex” API. Do you mean by “addIndexKey”?

Another question: let’s say you create a new mixed index with property A. Later, you add a new property B to it using “mgmt.addIndexKey” API. Then you create a vertex with both property A and property B. Now, are you only able to leverage the mixed index to query property A only, but not property B? Also, what new document(s) do you observe on ES? A concrete example would be greatly appreciated if possible.

Best,
Boxuan

On Mon, Jan 10, 2022 at 3:04 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Boxuan,

Thanks for the quick response. Actually, I'm following a strict schema in my service. 
i.e we first register a schema and then use it for vertex/edge creation.

So I'm not creating schema and vertex/edge in the same transaction. Only property key and index creation are happening in one transaction that is also at starting of the service only. From next time is index already exists then my service adds new properties to it.

These new properties are created after the creation of the index in a separate transaction are visible in management API printIndexes and printSchema. Also, they are visible in elastic mapping.



On Mon, Jan 10, 2022 at 12:26 PM Boxuan Li <liboxuan@...> wrote:
Sorry I misread your email. I thought you were using TEXT mapping only.

You said you were able to create index, add vertices and edges, and query them utilizing index in the same transaction, but not in a new transaction. Can you give complete code examples that demonstrate how you do so in the same transaction AND in a new transaction, as Marc asked? Specifically, do include how you open and commit/rollback transactions.

In addition, I wonder if this always happens no matter how long you wait, or only happens in a short period of time. Schema propagation takes some time, and you may see a sync delay across JanusGraph instances. If you create the index on one JanusGraph instance, and immediately insert & query data in another JanusGraph instance, it might be the case that schema propagation is not done yet and your other JanusGraph instance is not aware of the recently created index.

Another thing you could check is the Elasticsearch. After creating the index, do you see the index on your ES cluster? After inserting vertices/edges, do you see documents created at ES side?

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:41 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.

On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

Do we need reindexing even for properties created after index?


On Mon, Jan 10, 2022 at 1:39 PM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
sorry for the typo,  it is addIndexKey() only what I'm using. 

Example-

Created a vertex label -> vertexA
created a property key -> vertexA_key_s
create mixedIndex if not exist -> vertex_index 
add property key "vertexA_key_s" in vertex_index

Created a vertex label -> vertexB
created a proproperty key -> vertexB_key_s
create mixedIndex if not exist -> vertex_index 
add property key "vertexB_key_s" in vertex_index

Created a edge label -> edge1
created a proproperty key -> edge1_key_s
create mixedIndex if not exist -> edge_index 

*Note -> We are crating index (vertex_index, edge_index) on the start of the service with some system properties like graphID, name, etc)

PrintIndexes in janusgraph -

Vertex Index Name. |    Type.  | Unique.  | Backing.   | key:   Status
--------------------------------------------------------------------------------------------
vertex_index. |    Mixed | false.  | search.   | vertexA_key_s: ENABLED
| vertexB_key_s: ENABLED


Edge Index (VCI) Name. |    Type.  | Unique.  | Backing.   | key  | Status
--------------------------------------------------------------------------------------------
edge_index. |    Mixed | false.  | search.   | vedge1_key_s: ENABLED


In elastic i'm able to search on that property using endpoint /_search?q=oltp_vertexA_key_s




On Mon, Jan 10, 2022 at 12:51 PM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

Thanks for the explanation. I noticed your example code contains the following snippet:

if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)

I don’t have a computer with me right now, but IIRC there is no “addIndex” API. Do you mean by “addIndexKey”?

Another question: let’s say you create a new mixed index with property A. Later, you add a new property B to it using “mgmt.addIndexKey” API. Then you create a vertex with both property A and property B. Now, are you only able to leverage the mixed index to query property A only, but not property B? Also, what new document(s) do you observe on ES? A concrete example would be greatly appreciated if possible.

Best,
Boxuan

On Mon, Jan 10, 2022 at 3:04 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Boxuan,

Thanks for the quick response. Actually, I'm following a strict schema in my service. 
i.e we first register a schema and then use it for vertex/edge creation.

So I'm not creating schema and vertex/edge in the same transaction. Only property key and index creation are happening in one transaction that is also at starting of the service only. From next time is index already exists then my service adds new properties to it.

These new properties are created after the creation of the index in a separate transaction are visible in management API printIndexes and printSchema. Also, they are visible in elastic mapping.



On Mon, Jan 10, 2022 at 12:26 PM Boxuan Li <liboxuan@...> wrote:
Sorry I misread your email. I thought you were using TEXT mapping only.

You said you were able to create index, add vertices and edges, and query them utilizing index in the same transaction, but not in a new transaction. Can you give complete code examples that demonstrate how you do so in the same transaction AND in a new transaction, as Marc asked? Specifically, do include how you open and commit/rollback transactions.

In addition, I wonder if this always happens no matter how long you wait, or only happens in a short period of time. Schema propagation takes some time, and you may see a sync delay across JanusGraph instances. If you create the index on one JanusGraph instance, and immediately insert & query data in another JanusGraph instance, it might be the case that schema propagation is not done yet and your other JanusGraph instance is not aware of the recently created index.

Another thing you could check is the Elasticsearch. After creating the index, do you see the index on your ES cluster? After inserting vertices/edges, do you see documents created at ES side?

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:41 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.

On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

sorry for the typo,  it is addIndexKey() only what I'm using. 

Example-

Created a vertex label -> vertexA
created a property key -> vertexA_key_s
create mixedIndex if not exist -> vertex_index 
add property key "vertexA_key_s" in vertex_index

Created a vertex label -> vertexB
created a proproperty key -> vertexB_key_s
create mixedIndex if not exist -> vertex_index 
add property key "vertexB_key_s" in vertex_index

Created a edge label -> edge1
created a proproperty key -> edge1_key_s
create mixedIndex if not exist -> edge_index 

*Note -> We are crating index (vertex_index, edge_index) on the start of the service with some system properties like graphID, name, etc)

PrintIndexes in janusgraph -

Vertex Index Name. |    Type.  | Unique.  | Backing.   | key:   Status
--------------------------------------------------------------------------------------------
vertex_index. |    Mixed | false.  | search.   | vertexA_key_s: ENABLED
| vertexB_key_s: ENABLED


Edge Index (VCI) Name. |    Type.  | Unique.  | Backing.   | key  | Status
--------------------------------------------------------------------------------------------
edge_index. |    Mixed | false.  | search.   | vedge1_key_s: ENABLED


In elastic i'm able to search on that property using endpoint /_search?q=oltp_vertexA_key_s




On Mon, Jan 10, 2022 at 12:51 PM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

Thanks for the explanation. I noticed your example code contains the following snippet:

if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)

I don’t have a computer with me right now, but IIRC there is no “addIndex” API. Do you mean by “addIndexKey”?

Another question: let’s say you create a new mixed index with property A. Later, you add a new property B to it using “mgmt.addIndexKey” API. Then you create a vertex with both property A and property B. Now, are you only able to leverage the mixed index to query property A only, but not property B? Also, what new document(s) do you observe on ES? A concrete example would be greatly appreciated if possible.

Best,
Boxuan

On Mon, Jan 10, 2022 at 3:04 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Boxuan,

Thanks for the quick response. Actually, I'm following a strict schema in my service. 
i.e we first register a schema and then use it for vertex/edge creation.

So I'm not creating schema and vertex/edge in the same transaction. Only property key and index creation are happening in one transaction that is also at starting of the service only. From next time is index already exists then my service adds new properties to it.

These new properties are created after the creation of the index in a separate transaction are visible in management API printIndexes and printSchema. Also, they are visible in elastic mapping.



On Mon, Jan 10, 2022 at 12:26 PM Boxuan Li <liboxuan@...> wrote:
Sorry I misread your email. I thought you were using TEXT mapping only.

You said you were able to create index, add vertices and edges, and query them utilizing index in the same transaction, but not in a new transaction. Can you give complete code examples that demonstrate how you do so in the same transaction AND in a new transaction, as Marc asked? Specifically, do include how you open and commit/rollback transactions.

In addition, I wonder if this always happens no matter how long you wait, or only happens in a short period of time. Schema propagation takes some time, and you may see a sync delay across JanusGraph instances. If you create the index on one JanusGraph instance, and immediately insert & query data in another JanusGraph instance, it might be the case that schema propagation is not done yet and your other JanusGraph instance is not aware of the recently created index.

Another thing you could check is the Elasticsearch. After creating the index, do you see the index on your ES cluster? After inserting vertices/edges, do you see documents created at ES side?

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:41 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.

On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Boxuan Li
 

Hi Harshit,

Thanks for the explanation. I noticed your example code contains the following snippet:

if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)

I don’t have a computer with me right now, but IIRC there is no “addIndex” API. Do you mean by “addIndexKey”?

Another question: let’s say you create a new mixed index with property A. Later, you add a new property B to it using “mgmt.addIndexKey” API. Then you create a vertex with both property A and property B. Now, are you only able to leverage the mixed index to query property A only, but not property B? Also, what new document(s) do you observe on ES? A concrete example would be greatly appreciated if possible.

Best,
Boxuan

On Mon, Jan 10, 2022 at 3:04 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Boxuan,

Thanks for the quick response. Actually, I'm following a strict schema in my service. 
i.e we first register a schema and then use it for vertex/edge creation.

So I'm not creating schema and vertex/edge in the same transaction. Only property key and index creation are happening in one transaction that is also at starting of the service only. From next time is index already exists then my service adds new properties to it.

These new properties are created after the creation of the index in a separate transaction are visible in management API printIndexes and printSchema. Also, they are visible in elastic mapping.



On Mon, Jan 10, 2022 at 12:26 PM Boxuan Li <liboxuan@...> wrote:
Sorry I misread your email. I thought you were using TEXT mapping only.

You said you were able to create index, add vertices and edges, and query them utilizing index in the same transaction, but not in a new transaction. Can you give complete code examples that demonstrate how you do so in the same transaction AND in a new transaction, as Marc asked? Specifically, do include how you open and commit/rollback transactions.

In addition, I wonder if this always happens no matter how long you wait, or only happens in a short period of time. Schema propagation takes some time, and you may see a sync delay across JanusGraph instances. If you create the index on one JanusGraph instance, and immediately insert & query data in another JanusGraph instance, it might be the case that schema propagation is not done yet and your other JanusGraph instance is not aware of the recently created index.

Another thing you could check is the Elasticsearch. After creating the index, do you see the index on your ES cluster? After inserting vertices/edges, do you see documents created at ES side?

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:41 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.

On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

Hi Boxuan,

Thanks for the quick response. Actually, I'm following a strict schema in my service. 
i.e we first register a schema and then use it for vertex/edge creation.

So I'm not creating schema and vertex/edge in the same transaction. Only property key and index creation are happening in one transaction that is also at starting of the service only. From next time is index already exists then my service adds new properties to it.

These new properties are created after the creation of the index in a separate transaction are visible in management API printIndexes and printSchema. Also, they are visible in elastic mapping.



On Mon, Jan 10, 2022 at 12:26 PM Boxuan Li <liboxuan@...> wrote:
Sorry I misread your email. I thought you were using TEXT mapping only.

You said you were able to create index, add vertices and edges, and query them utilizing index in the same transaction, but not in a new transaction. Can you give complete code examples that demonstrate how you do so in the same transaction AND in a new transaction, as Marc asked? Specifically, do include how you open and commit/rollback transactions.

In addition, I wonder if this always happens no matter how long you wait, or only happens in a short period of time. Schema propagation takes some time, and you may see a sync delay across JanusGraph instances. If you create the index on one JanusGraph instance, and immediately insert & query data in another JanusGraph instance, it might be the case that schema propagation is not done yet and your other JanusGraph instance is not aware of the recently created index.

Another thing you could check is the Elasticsearch. After creating the index, do you see the index on your ES cluster? After inserting vertices/edges, do you see documents created at ES side?

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:41 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.

On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Boxuan Li
 

Sorry I misread your email. I thought you were using TEXT mapping only.

You said you were able to create index, add vertices and edges, and query them utilizing index in the same transaction, but not in a new transaction. Can you give complete code examples that demonstrate how you do so in the same transaction AND in a new transaction, as Marc asked? Specifically, do include how you open and commit/rollback transactions.

In addition, I wonder if this always happens no matter how long you wait, or only happens in a short period of time. Schema propagation takes some time, and you may see a sync delay across JanusGraph instances. If you create the index on one JanusGraph instance, and immediately insert & query data in another JanusGraph instance, it might be the case that schema propagation is not done yet and your other JanusGraph instance is not aware of the recently created index.

Another thing you could check is the Elasticsearch. After creating the index, do you see the index on your ES cluster? After inserting vertices/edges, do you see documents created at ES side?

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:41 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.

On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920


Re: Janusgraph not able to find suitable index for a index enabled property key

Harshit Sharma
 

Only For SET cardinality, I'm using TEXT mapping because looks like SET does not work with TEXTSTRING.


On Mon, Jan 10, 2022 at 11:07 AM Harshit Sharma via lists.lfaidata.foundation <harshit.sharma1080=gmail.com@...> wrote:
but is that the reason I'm not able to use property keys created in a new transaction?
Also, can we mix index property keys of cardinality SET?

On Mon, Jan 10, 2022 at 10:56 AM Boxuan Li <liboxuan@...> wrote:
Hi Harshit,

You should use STRING mapping if you want exact string match. TEXT mapping is for full text search. See 

Best,
Boxuan

On Mon, Jan 10, 2022 at 1:15 PM Harshit Sharma <harshit.sharma1080@...> wrote:
Hi Marc,

1. Creation of property keys and indices in the schema + commit
      graph = (Janusgraph) GraphDBConfigurator.getGraph()
      mgmt = graph.openManagement()
      
     For Vertex ->
           propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SET).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(VERTEX_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(VERTEX_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
  
    For Edge ->
            propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
             propertyKey = mgmt.makePropertyKey(propertyKeyName).dataType (String.class).cardinality(Cardinality.SINGLE).make()
          if(existingIndex) 
                janusgraphIndex = mgmt.getGraphIndex(EDGE_INDEX_NAME)
                mgmt.addIndex(janusgraphIndex, propertyKey)
          else
               indexBuilder = mgmt.buildIndex(EDGE_INDEX_NAME,  Vertex.class)
               if(cardinality is SET)
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXT.asParameter() : Mapping.DEFAULT.asParameter())
               else
                        indexBuilder.addKey(propertyKey, String.class.equals(propertyKey.dataType) ? Mapping.TEXTSTRING.asParameter() : Mapping.DEFAULT.asParameter())
         
            mgmt.commit();
    


       3.   Query of a vertex based on a property value in another transaction
             Let say i created a property key "domain_vertex_key1_s" for vertex
             Query = g.V().has("domain_vertex_key1_s", "val1);
             
             Let say I created a property key "domain_edge_key1_s" for edge
            
             Query = g.V().has("domain_vertex_key1_s","val2");
          

On Mon, 10 Jan, 2022, 12:46 am , <hadoopmarc@...> wrote:
Hi Harshit,

Can you please describe the steps you have taken in more detail:
  • creation of property keys and indices in the schema + commit,
  • creation of a vertex with a property in one committed transaction,
  • query of a vertex based on a property value in another transaction.

Marc



--
Regards,

Harshit Sharma
+91-9901459920



--
Regards,

Harshit Sharma
+91-9901459920

321 - 340 of 6651