CREATE SEMANTIC INDEX
Generic Description
Declare extra node properties that Nexyron should embed as separate semantic fields for a label.
Simple example:
CREATE SEMANTIC INDEX doc_semantic
FOR (d:Document)
ON (d.title, d.body, d.tags)
Consumer-Level Explanation
Use CREATE SEMANTIC INDEX when the default semantic field list is too narrow for your data model. Nexyron already indexes common text-like properties such as name, title, summary, content, and text. This clause adds label-specific properties to that same automatic semantic index.
The command does not create a second user-managed vector property. It changes the source text used by the built-in semantic indexer, then queues a rebuild so the graph-node slice of the unified nexyron.semantic.search index can find the updated embeddings.
Use DROP INDEX <name> to remove the declaration. Removing it also queues a semantic rebuild so the removed fields stop contributing to future semantic search results.
Use ALTER SEMANTIC INDEX <name> ADD FIELD <property> or ALTER SEMANTIC INDEX <name> ADD FIELDS (...) when you want to extend an existing declaration without dropping it first.
More Detailed Explanation
For each matching node, Nexyron extracts the built-in semantic fields plus the declared fields for the node's labels. Each string field is embedded separately by the configured local embedding runtime and upserted into the graph-node slice of the unified semantic HNSW index under the owning node. Search results are deduplicated back to nodes, using the best matching field vector for each node.
This is different from CREATE VECTOR INDEX, which indexes an explicit vector property that the application writes. CREATE SEMANTIC INDEX controls automatic text-to-embedding extraction for semantic procedures.
Advanced Example
CREATE SEMANTIC INDEX support_ticket_semantic
FOR (t:SupportTicket)
ON (t.subject, t.customer_message, t.agent_notes, t.resolution_summary);
CALL nexyron.procedures()
YIELD name, description
WHERE name = 'nexyron.semantic.search'
RETURN name, description;
To extend an existing index declaration:
ALTER SEMANTIC INDEX support_ticket_semantic
ADD FIELD escalation_notes;
ALTER SEMANTIC INDEX support_ticket_semantic
ADD FIELDS (t.customer_reply, t.internal_summary);
Real Use Cases
- Indexing domain-specific body fields such as
body,transcript,customer_message, oragent_noteswithout copying them intocontent. - Keeping operational metadata out of the embedding text while explicitly adding fields that carry searchable meaning.
- Making semantic retrieval work across realistic document-style payloads where important language is not stored under Nexyron's default semantic property names.
Real Limitations And Tradeoffs
- The current declaration applies to node labels. Relationship semantic search still uses the built-in semantic field list.
- Only string property values are embedded. Non-string payloads should be projected into a meaningful string field before indexing.
ALTER SEMANTIC INDEX ... ADD FIELD(S)is additive. It does not remove existing fields or change the label; useDROP INDEXandCREATE SEMANTIC INDEXwhen you need a smaller or different field set.- Adding noisy fields can make semantic search worse. IDs, status codes, counters, and boilerplate often dilute the embedding rather than improving recall.
- Rebuilding embeddings costs model runtime and index writes. Use focused field sets rather than declaring every large text property by default.