Selective Metadata Indexing in Pinecone
By default, Pinecone automatically indexes all metadata. Indexing these metadata fields allows for more specific vector search filtering. However, if you choose to store metadata without indexing it, it's a memory-saving move. This approach is especially beneficial when dealing with a plethora of unique metadata entries, enabling more vectors to be accommodated in each pod.
Configuring Selective Metadata Indexing
When you create a new index, you can specify which metadata fields to index using the metadata_config
parameter.
metadata_config = {
"indexed": ["desired-metadata-field-name"]
}
By populating the indexed
list with the required metadata field names, developers can explicitly instruct Pinecone which fields to index.
- Python
python
metadata_config = {
"indexed": ["metadata-field-name"]
}
pinecone.create_index("example-index", dimension=128,
metadata_config=metadata_config)
- curl
bash
$ curl -i -X POST https://controller.YOUR_ENVIRONMENT.pinecone.io/databases \
-H 'Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "example-index",
"dimension": 128,
"metadata_config": {
"indexed": ["metadata-field-name"]
}
}'
References
AlloyDB
Amazon Cognito
Amazon EC2
Amazon ECS
Amazon QuickSight
Amazon RDS
Amazon Redshift
Amazon S3
API
Autonomous Vehicle
AWS
AWS API Gateway
AWS Chalice
AWS Control Tower
AWS IAM
AWS Lambda
AWS VPC
BERT
BigQuery
Causal Inference
ChatGPT
Chrome Extension
CircleCI
Classification
Cloud Functions
Cloud IAM
Cloud Run
Cloud Storage
Clustering
CSS
Data Engineering
Data Modeling
Database
dbt
Decision Tree
Deep Learning
Descriptive Statistics
Differential Equation
Dimensionality Reduction
Discrete Choice Model
Docker
Economics
FastAPI
Firebase
GIS
git
GitHub
GitHub Actions
Google
Google Cloud
Google Search Console
Hugging Face
Hypothesis Testing
Inferential Statistics
Interval Estimation
JavaScript
Jinja
Kedro
Kubernetes
LightGBM
Linux
LLM
Mac
Machine Learning
Macroeconomics
Marketing
Mathematical Model
Meltano
MLflow
MLOps
MySQL
NextJS
NLP
Nodejs
NoSQL
ONNX
OpenAI
Optimization Problem
Optuna
Pandas
Pinecone
PostGIS
PostgreSQL
Probability Distribution
Product
Project
Psychology
Python
PyTorch
QGIS
R
ReactJS
Regression
Rideshare
SEO
Singer
sklearn
Slack
Snowflake
Software Development
SQL
Statistical Model
Statistics
Streamlit
Tabular
Tailwind CSS
TensorFlow
Terraform
Transportation
TypeScript
Urban Planning
Vector Database
Vertex AI
VSCode
XGBoost