Encrypted Index
This section covers all aspects of managing encrypted indexes in enVector, from creation to deletion. enVector indexes provide secure, encrypted storage for your vector data while maintaining full search functionality.
What are enVector Indexes?
enVector indexes are encrypted data structures that store and organize your vector embeddings securely. Unlike traditional vector databases, enVector indexes:
Store data encrypted: All vectors are encrypted using homomorphic encryption
Enable encrypted search: Perform similarity searches without decrypting data
Maintain privacy: Server never sees plaintext data
Support metadata: Store additional information alongside encrypted vectors
Index Operations Overview
Learn how to create new encrypted indexes with various configurations:
Basic index creation with encryption settings
Complete working examples with error handling
Best practices for production deployments
Discover how to work with indexes already on the server:
List all available indexes
Get detailed index information
Create Index objects for existing indexes
Examine index contents and properties
Perform operations on existing indexes
Safely remove indexes when they're no longer needed:
Two methods: Index object method and direct API calls
Safe deletion with confirmation
Batch deletion for multiple indexes
Comprehensive error handling and verification
Key Concepts
Encryption Modes
Index Encryption: Always "cipher" - indexes are stored encrypted
Query Encryption:
"plain" - queries sent in cleartext (faster, less private)
"cipher" - queries encrypted (fully private)
Index Types
Flat Index: Simple, exact similarity search
Maximum Dimension: 4096 (32-4096 supported)
Search Types
IP (Inner Product): Similarity scoring using inner product computation
Quick Start
Here's a basic workflow for working with indexes:
import pyenvector as ev
# 1. Connect to server
ev.init_connect(address="localhost:50050")
# 2. Create an index
index = ev.create_index("my_index", dim=512)
# 3. Insert encrypted data
# ... insert vectors and metadata ...
# 4. Search the index
results = index.search(query_vectors, top_k=10)
# 5. When done, drop the index
index.drop()Best Practices
Plan Your Dimensions: Choose appropriate vector dimensions based on your model requirements
Encryption Strategy: Select query encryption based on your privacy needs
Resource Management: Always drop indexes when they're no longer needed
Error Handling: Implement proper error handling for production use
Key Management: Ensure proper key registration before creating indexes
Common Use Cases
Document Search: Store document embeddings and search for similar content
Image Retrieval: Find similar images using feature vectors
Recommendation Systems: Build secure recommendation engines
Anomaly Detection: Identify unusual patterns in encrypted data
Semantic Search: Enable natural language search on encrypted text embeddings
Next Steps
Choose a specific operation from the sidebar to learn more:
For more advanced topics, see the Data Manipulation section to learn about inserting, searching, and retrieving data from your indexes.
Last updated

