Neo4j의 전문 검색과 벡터 검색
정확히 일치하는 조회를 넘어 Neo4j에 전문 및 벡터 인덱스를 추가하고, 퍼지 텍스트 검색과 의미적 유사도 쿼리를 지원하여 최신 검색 및 인공지능 작업에 맞게 데이터베이스를 확장하십시오.
Neo4j의 전문 검색과 벡터 검색은(는) CoddyKit의 무료 Neo4j Graph Database Fundamentals 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Neo4j Graph Database Fundamentals 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Neo4j Graph Database Fundamentals 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Why Search Indexes Matter
Plain property lookups in Neo4j are great for exact matches, but real applications need more. Users misspell words, search across multiple fields, and increasingly expect semantic results.
Neo4j extends its capabilities with two specialized index types:
- Full-text indexes for fuzzy, multi-field text search
- Vector indexes for similarity search over embeddings
Both are first-class features you can manage with Cypher.
Creating a Full-Text Index
A full-text index is built over one or more node labels and properties. Once created, it powers tokenized, case-insensitive search.
The example creates an index named movieSearch over the title and plot properties of Movie nodes.
CREATE FULLTEXT INDEX movieSearch
FOR (m:Movie)
ON EACH [m.title, m.plot];Querying a Full-Text Index
You query full-text indexes with the db.index.fulltext.queryNodes procedure. It returns matching nodes plus a relevance score.
This Lucene-style syntax supports wildcards, fuzzy matching with ~, and boolean operators.
CALL db.index.fulltext.queryNodes('movieSearch', 'matrix~')
YIELD node, score
RETURN node.title AS title, score
ORDER BY score DESC;Fuzzy and Wildcard Matching
Full-text search shines with imperfect input. A few common operators:
star~— fuzzy match, tolerates typosstar*— prefix wildcardtitle:matrix— restrict to one fieldmatrix AND reloaded— boolean combination
These let one query handle the messy real-world queries users actually type.
CALL db.index.fulltext.queryNodes('movieSearch', 'title:matr*')
YIELD node, score
RETURN node.title, score;What Are Vector Embeddings?
A vector embedding is a list of numbers that captures the meaning of text, an image, or other data. Items with similar meaning have vectors that point in similar directions.
By storing an embedding as a property on a node, Neo4j can answer questions like find the documents most semantically similar to this one — not just keyword matches.
Creating a Vector Index
Vector indexes require you to declare the dimension (length of the embedding) and the similarity function (cosine or euclidean).
The db.index.vector.createNodeIndex procedure creates one over a label and property. Here we index a 1536-dimension embedding stored on Document nodes.
CALL db.index.vector.createNodeIndex(
'docEmbedding',
'Document',
'embedding',
1536,
'cosine'
);Storing an Embedding on a Node
Embeddings are usually produced by an external model and written back to Neo4j. The db.create.setNodeVectorProperty procedure stores the float array efficiently.
In practice the array has hundreds or thousands of values; it is shortened here for readability.
MATCH (d:Document {id: 'doc-1'})
CALL db.create.setNodeVectorProperty(d, 'embedding', [0.12, -0.04, 0.88])
RETURN d.id;Querying for Similar Nodes
To find the nearest neighbors, call db.index.vector.queryNodes with the index name, the number of results, and a query vector.
It returns nodes ordered by similarity along with a score between 0 and 1.
CALL db.index.vector.queryNodes('docEmbedding', 5, [0.10, -0.02, 0.90])
YIELD node, score
RETURN node.title AS title, score
ORDER BY score DESC;Combining Search with the Graph
The real power of Neo4j is mixing search with traversal. You can find semantically similar documents, then follow relationships to enrich the results.
This query finds similar documents and returns their authors — something a pure vector database cannot do in one step.
CALL db.index.vector.queryNodes('docEmbedding', 3, [0.1, -0.02, 0.9])
YIELD node, score
MATCH (node)<-[:WROTE]-(a:Author)
RETURN node.title, a.name, score;Managing Search Indexes
Like any index, full-text and vector indexes can be listed and dropped. Use SHOW INDEXES to inspect them and DROP INDEX to remove one.
Always check that an index is ONLINE before relying on it in production queries.
SHOW INDEXES
WHERE type IN ['FULLTEXT', 'VECTOR'];
// Remove one:
DROP INDEX docEmbedding IF EXISTS;Best Practices
To get the most from search indexes:
- Keep embedding dimensions consistent with your model output
- Choose
cosinesimilarity for most text embeddings - Re-embed and update vectors when source data changes
- Limit result counts and post-filter with Cypher for relevance
These habits keep searches fast and accurate as data grows.
Quick Check
Test your understanding of Neo4j search indexes.
Recap
You extended Neo4j with two powerful search capabilities:
- Full-text indexes — tokenized, fuzzy, multi-field keyword search via
db.index.fulltext.queryNodes - Vector indexes — semantic similarity over embeddings via
db.index.vector.queryNodes
Best of all, both integrate with graph traversals, letting you blend search relevance with relationship context in a single Cypher query.
AI 튜터와 함께 Neo4j Graph Database Fundamentals을(를) 배우세요 — 무료
브라우저에서 실제 코드를 작성하고 실행하며, 24/7 AI 튜터로부터 즉각적인 도움을 받고, 웹이나 앱에서 중단한 부분부터 계속 학습하세요.
- 코스
- 12
- 레슨
- 48
자주 묻는 질문
“Neo4j의 전문 검색과 벡터 검색” 강의는 무료인가요?
네 — “Neo4j의 전문 검색과 벡터 검색” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Neo4j Graph Database Fundamentals 강의 전체를 잠금 해제할 수 있습니다. Neo4j Graph Database Fundamentals 강의에는 총 4개의 강의가 포함되어 있습니다.
“Neo4j의 전문 검색과 벡터 검색”에서 뭘 배우나요?
정확히 일치하는 조회를 넘어 Neo4j에 전문 및 벡터 인덱스를 추가하고, 퍼지 텍스트 검색과 의미적 유사도 쿼리를 지원하여 최신 검색 및 인공지능 작업에 맞게 데이터베이스를 확장하십시오. 브라우저에서 직접 실행하는 실습 코드로 Neo4j Graph Database Fundamentals을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Neo4j Graph Database Fundamentals을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Neo4j Graph Database Fundamentals은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“Neo4j의 전문 검색과 벡터 검색” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Neo4j Graph Database Fundamentals 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Neo4j Graph Database Fundamentals 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 저장 프로시저 및 UDF
- BI 및 시각화 도구 통합
- 고급 데이터 수집 파이프라인
- Neo4j의 전문 검색과 벡터 검색