bamaer opened a new issue, #8836:
URL: https://github.com/apache/hop/issues/8836

   ### What would you like to happen?
   
   ### Problem
   
   The Graph index action resolves variables only in the vector dimensions and 
capacity. The index name, the label or relationship type, and the properties 
are used literally. With `${CHUNK_INDEX}` as the index name, Memgraph ends up 
with a vector index named `${CHUNK_INDEX}`, while Graph vector search (which 
does resolve its index name) looks for the resolved name and fails with "Vector 
index … does not exist".
   
   The Graph constraint action has the same gap: constraint name, label and 
properties are used literally.
   
   This makes it impossible to keep, for example, a test index and a production 
index apart with an environment variable. It is also inconsistent with Graph 
output, Graph query and Graph vector search, which resolve their settings.
   
   ### Proposal
   
   1. **Resolve variables in every text field of an update**, in both actions, 
for create and drop:
      - Graph index: index name, object name (label or relationship type), 
properties, plus the existing vector dimensions and capacity.
      - Graph constraint: constraint name, object name, properties.
   
      `Neo4jIndex.resolved()` already copies an update to resolve the vector 
settings. Extend it, and add the same to `Neo4jConstraint`. Resolution happens 
before the dialect builds the statement, so it works the same on every database.
   
   2. **Support range indexes on Apache AGE.** `AgeGraphDialect` already builds 
a node index on the label table (`getCreateNodeIndexStatement`, used by Graph 
output). Implement `getCreateIndexStatement`/`getDropIndexStatement` for node 
indexes with it (`CREATE INDEX IF NOT EXISTS … ON graph."Label" 
(agtype_access_operator(...))`, `DROP INDEX IF EXISTS graph.name`), so the 
action works on AGE too. AGE has no vector indexes and no relationship property 
indexes; those keep failing with the existing "not supported" message.
   
   3. **Neptune:** the dialect inherits the Neo4j statements from 
`CypherGraphDialect`, but Neptune doesn't support user-defined indexes or 
constraints. Return the standard "not supported" error instead of sending Neo4j 
syntax.
   
   ### Behaviour per database after the change
   
   | Database | Range index | Vector index | Constraints |
   |---|---|---|---|
   | Neo4j | ✓ | ✓ | ✓ |
   | Memgraph | ✓ | ✓ | ✓ |
   | FalkorDB | ✓ | ✓ | as today |
   | Apache AGE | ✓ (new, nodes) | not supported | not supported |
   | Neptune, Gremlin | not supported (clear error) | not supported | not 
supported |
   
   Variable resolution applies to every row in the table.
   
   ### Tests
   
   - Unit tests: the generated statements per dialect, with variables in name, 
label and properties.
   - Integration tests: a vector index named after a variable, in the memgraph, 
neo4j and falkordb suites (create, search with Graph vector search, drop); a 
range index named after a variable in the age suite.
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: Metadata, Component: Transforms


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to