Embedding Neo4j in Java application

Hi Guys,

I am currently working on a project to migrate one of our java applications from Neo4j embedded 2.3.8 to 5.21. I am referring the below link for my migration. However, I am stuck with creating indexes for node and relationship with multiple properties. Currently my application creates index for a node definition or a relationship definition, which will be applicable for all properties within it. However, I am not finding any sources to create such composite indexes in Neo4j 5.21. Can you please guide and provide details to achieve the same in latest Neo4j would be really helpful to complete my project.

Node Index: will be created for definition "BOARDS "

Definition BOARDS = definition(Board.class);

Keyword<String> BOARD_NAME = keyword("board_name", String.class);
Keyword<BoardId> BOARD_ID = keyword("board_id", BoardId.class);

Create Node Index for definition "BOARDS ":
index = graphDatabaseService.index().forNodes(definition.name());

Insert node using index:
node.setProperty(keyword.name(), value);
index.add(node, keyword.name(), value);

Query node using index:
Query query = lucene.query(predicate);
return index.query(query);

Relationship index: will be created for definition "STOPS_AT"

Definition STOPS_AT = definition(StopsAt.class);

Keyword<Integer> SEQUENCE_ID = keyword("seq", Integer.class);
Keyword<TripId> TRIP_ID = keyword("trip_id", TripId.class);
RelationshipType RELATIONSHIP = DynamicRelationshipType.withName("stops_at");

index = graphDatabaseService.index().forRelationships(definition.name());

[Embedding Neo4j in your Java application - Java Reference] (Embedding Neo4j in your Java application - Java Reference)

[Using indexes - Java Reference (neo4j.com)] (Using indexes - Java Reference)

Regards,
Vijay