{"id":21537,"library":"llama-index-vector-stores-azureaisearch","title":"LlamaIndex Vector Store: Azure AI Search","description":"Integration between LlamaIndex and Azure AI Search (formerly Azure Cognitive Search) for vector storage and hybrid search. Current version: 0.5.0. Released as part of the LlamaIndex plugin ecosystem; updates generally follow the LlamaIndex core release cadence.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/run-llama/llama_index","tags":["llamaindex","vector-store","azure","search","ai-search","rag"],"install":[{"cmd":"pip install llama-index-vector-stores-azureaisearch","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Core LlamaIndex library for index and query engine abstractions","package":"llama-index-core","optional":false},{"reason":"Azure SDK for interacting with Azure AI Search (cognitive search)","package":"azure-search-documents","optional":false},{"reason":"Azure authentication (DefaultAzureCredential, etc.)","package":"azure-identity","optional":true}],"imports":[{"note":"The vector store class is nested under the azureaisearch submodule; direct import from vector_stores package fails.","wrong":"from llama_index.vector_stores import AzureAISearchVectorStore","symbol":"AzureAISearchVectorStore","correct":"from llama_index.vector_stores.azureaisearch import AzureAISearchVectorStore"},{"note":"Correct import path; no common wrong pattern known.","wrong":"","symbol":"AzureAISearchIndex","correct":"from llama_index.vector_stores.azureaisearch import AzureAISearchIndex"}],"quickstart":{"code":"import os\nfrom llama_index.vector_stores.azureaisearch import AzureAISearchVectorStore\nfrom azure.identity import DefaultAzureCredential\n\n# Use environment variables for credentials\nendpoint = os.environ.get('AZURE_SEARCH_ENDPOINT', 'https://mysearch.search.windows.net')\ncredential = DefaultAzureCredential()\n\nvector_store = AzureAISearchVectorStore(\n    search_or_index_endpoint=endpoint,\n    credential=credential,\n    index_name='my-index',\n    embedding_dimensionality=1536\n)\n# Then integrate with LlamaIndex StorageContext","lang":"python","description":"Minimal setup to create an AzureAISearchVectorStore using DefaultAzureCredential."},"warnings":[{"fix":"Always pass `index_name` when constructing AzureAISearchVectorStore.","message":"Breaking change in 0.4.0: `index_name` is no longer inferred from other parameters; must be explicitly provided.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Use `search_service_endpoint` and `index_name` individually if required.","message":"The `search_or_index_endpoint` parameter is deprecated in favor of `search_service_endpoint` and `index_name` combination (some versions). Check current docs.","severity":"deprecated","affected_versions":"0.5.0"},{"fix":"Use AzureCliCredential or EnvironmentCredential with explicit environment variables for local testing.","message":"DefaultAzureCredential fails in non-Azure environments (local dev) unless environment variables AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET are set.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure `embedding_dimensionality` matches the index schema (e.g., 1536 for text-embedding-ada-002).","message":"Embedding dimensionality must match the Azure AI Search index field definition. Mismatch causes silent query errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from llama_index.vector_stores.azureaisearch import AzureAISearchVectorStore'.","cause":"Wrong import path: the class is in a submodule, not directly in vector_stores.","error":"ImportError: cannot import name 'AzureAISearchVectorStore' from 'llama_index.vector_stores'"},{"fix":"Verify AZURE_SEARCH_ENDPOINT environment variable and that DefaultAzureCredential is configured.","cause":"Azure AI Search endpoint is unreachable or credentials are missing/incorrect.","error":"azure.core.exceptions.ServiceRequestError: ... The request failed due to connection failure"},{"fix":"Check that the Azure AI Search index has a vector field with correct dimensionality and HNSW configuration.","cause":"Index schema mismatch (e.g., missing vector configuration or field type).","error":"azure.core.exceptions.HttpResponseError: (InvalidRequest) ... The request is invalid."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}