JSON indexing enables you to index structured JSON documents and query by nested field paths while leveraging vector similarity for text content.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/avnlp/vectordb/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Many documents contain structured data beyond simple text - product catalogs with specifications, user profiles with preferences, articles with nested metadata. JSON indexing lets you search both the semantic content and the structured fields.JSON indexing combines the best of both worlds: vector search for semantic understanding plus structured queries for precise field matching.
How it works
- Document ingestion - Parse JSON documents and extract text content
- Vector embedding - Generate embeddings for searchable text fields
- Metadata storage - Store full JSON structure in document metadata
- Query execution - Search by vector similarity and filter by JSON paths
JSON path filtering
Use dot notation to filter by nested JSON fields:Supported operators
JSON path filtering supports all standard metadata operators:| Operator | Description | Example |
|---|---|---|
equals | Exact match | author.country = "USA" |
contains | Substring (case-insensitive) | author.bio contains "engineer" |
startswith | Prefix (case-insensitive) | product.sku startswith "TECH" |
gt / gte | Numeric comparison | specs.ram >= 16 |
lt / lte | Numeric comparison | price < 1000 |
in | Value in list | tags in ["featured", "new"] |
Document structure
Structure your JSON documents with searchable text and filterable metadata:Configuration
Configure JSON indexing in your pipeline:Usage example
Indexing JSON documents
Index JSON documents with automatic metadata extraction:Query patterns
Multi-condition filters
Combine multiple JSON path filters:Array field filtering
Filter documents by array membership:Nested object queries
Access deeply nested fields:Database support
JSON indexing is available for all vector databases:| Database | JSON Support | Nested Queries | Array Filters |
|---|---|---|---|
| Weaviate | ✓ | ✓ | ✓ |
| Qdrant | ✓ | ✓ | ✓ |
| Pinecone | ✓ | ✓ | ✓ |
| Milvus | ✓ | ✓ | ✓ |
| Chroma | ✓ | ✓ | ✓ |
Best practices
Design your schema
Separate searchable text fields from filterable metadata. Embed only the content that needs semantic search.
Index strategically
Most databases automatically index metadata fields. For large catalogs, verify field indexing for query performance.
Normalize data types
Use consistent types across documents (strings vs numbers, date formats) to avoid filter failures.
Related features
Metadata filtering
Structured constraints on retrieval
Semantic search
Vector similarity search
Hybrid search
Combine dense and sparse retrieval
Multi-tenancy
Tenant-isolated indexing