Access-controlled semantic search
Since Jul 5Updated Nov 20, 2026Based on 55 AI answers
Reviewed by Dimitry Apollonsky
Brands AI recommends
Relationship-based permissions tied to complex relationships between data objects
Managed cloud search with strong filtering
ACL requirements paired with a policy layer
Also mentioned rarely: PostgreSQL, OpenFGA, SpiceDB, Elasticsearch, OpenSearch, Zilliz, Azure AI Search, Databricks, MongoDB Atlas Vector Search, Zilliz Cloud, Open Policy Agent, Amazon OpenSearch Serverless, Amazon OpenSearch Service, Databricks Vector Search, Weaviate Docs, Chroma, Vespa (Big Data Platform), Okta, AuthZed, Auth0, pgvectorscale, Google, LDAP, Active Directory Domain Services, Microsoft, Microsoft Entra Connect Sync, Microsoft SharePoint, Neo4j, Redis
Questions and answers
ChatGPTNov 7, 2026
Best vector database for hierarchical permissions and ACLs
My recommendation is Weaviate for the strongest overall combination of advanced metadata filtering, multi-tenancy, and enterprise search. Qdrant is a very close second, and may actually be better if your primary requirement is highly complex, nested permission filtering.
There is an important distinction: database-level RBAC (who can access the database) is not the same as document-level ACLs (which documents a particular user can retrieve).
For your use case, you need both efficient filtered vector search and reliable enforcement of document-level permissions.
Top candidates
Database Advanced metadata filtering ACL / access control Best use Weaviate Excellent Built-in RBAC and multi-tenancy Enterprise semantic search Qdrant Excellent Primarily application-managed ACLs Complex hierarchical filters PostgreSQL + pgvector Excellent SQL filtering PostgreSQL Row-Level Security Fine-grained authorization Milvus Excellent RBAC and multi-tenancy Massive-scale deployments Pinecone Very good Primarily application-managed document ACLs Managed infrastructure These are architectural recommendations rather than a universal performance ranking.
Why these two stand out
1. Weaviate — Best overall enterprise option
(Best overall)
Strengths:
- Native RBAC with custom roles and permissions.
- Collection- and tenant-level access restrictions.
- Rich Boolean filtering (
AND,OR,NOT). - Metadata filtering integrated with vector and hybrid search.
- Supports multi-tenant data isolation.
Weaviate's RBAC supports custom permissions scoped to collections, tenants, and operations.
Important limitation: Its native RBAC is primarily resource-level authorization. You will still need document-level ACL filtering for permissions such as individual users, teams, inherited department access, and project membership.
Documentation: Weaviate RBAC.
2. Qdrant — Best for complex hierarchical metadata filtering
(Best filtering flexibility)
Qdrant is particularly interesting for your requirements.
It supports:
- Arbitrarily nested Boolean filter expressions.
- Nested JSON objects and arrays.
must,should,must_notconditions.- Multiple permission attributes per document.
- Payload indexes for efficient filtering.
- Filter-aware HNSW search.
- Multi-tenancy and tenant-specific indexing.
qdrant.techqdrant.techqdrant.tech
One particularly useful capability is its ability to express complicated permission conditions directly in vector queries.
Documentation: Qdrant filtering.
Recommended architecture for hierarchical ACLs
For an organization structured like this:
Organization
Division
Department / Team
Project
Document / Chunk
I'd implement authorization separately from semantic ranking.
1. Store permission metadata with each document chunk.
For example:
json{ "org_id": "acme", "division_ids": ["engineering"], "team_ids": ["platform"], "project_ids": ["semantic-search"], "allowed_roles": ["engineer", "admin"], "allowed_users": ["user123"], "visibility": "team" }2. Resolve effective permissions before searching.
Your authorization service determines:
- User's organization.
- Inherited division and team memberships.
- Project memberships.
- Explicit user permissions.
- Deny rules and exceptions.
3. Apply the resulting ACL filter during vector retrieval.
Do not retrieve unrestricted results and remove unauthorized documents afterward.
4. Keep the authorization service as the source of truth.
The vector database should execute the permission-aware search, not independently determine who is authorized.
Qdrant specifically documents that tenant filters must be enforced by the application; tenant indexing alone does not provide authorization.
My final decision
Your priority My choice Best overall enterprise solution Weaviate Most flexible nested ACL filters Qdrant Strongest SQL-based authorization PostgreSQL + pgvector Extremely large distributed vector workloads Milvus One additional option worth considering: PostgreSQL with pgvector. PostgreSQL Row-Level Security can enforce per-user row visibility with default-deny behavior when policies are enabled. This is especially attractive if authorization correctness is more important than having a dedicated vector database.
What I'd want to establish before choosing
There is one architectural question that could change my recommendation:
Are your permissions primarily inherited through an organizational hierarchy, or can users also receive arbitrary document-level permissions and exceptions?
For example:
- A: Organization → Division → Team → Project, with inherited access.
- B: Arbitrary combinations of users, groups, roles, explicit grants, and explicit denies.
- C: Both A and B.
If you're dealing with C, I'd lean toward Qdrant plus a dedicated authorization engine, or PostgreSQL as the authorization source of truth with Qdrant handling retrieval.
Pages cited in this answer 8
- docs.weaviate.ioAuthentication and authorization | Weaviate Documentation
- docs.weaviate.ioRBAC Overview | Weaviate Documentation
- qdrant.techFiltering - Qdrant
- qdrant.techIndexing - Qdrant
- qdrant.techFiltering in Vector Search: When to Use What - Qdrant
- qdrant.techChoose a Multitenancy Design - Qdrant
- qdrant.techHow to Implement Multitenancy and Custom Sharding in Qdrant
- postgresql.orgPostgreSQL: Documentation: 18: 5.9. Row Security Policies
Google AI ModeNov 7, 2026
When handling complex, hierarchical user permissions (like multi-level team trees, department inheritance, or group-based ACLs) alongside semantic search, your architecture choice comes down to a fundamental engineering trade-off: do you push authorization down into the vector index, or do you filter post-retrieval / pre-filter via a hybrid engine?
No pure, single-purpose vector database natively solves deep graph-based hierarchical ACLs out-of-the-box the way an enterprise LDAP or graph DB does. However, several options stand out depending on how you structure your metadata and scale.
Top Contenders for Metadata Filtering & ACLs
1. pgvector (PostgreSQL) — Best for Complex Hierarchies & Relational ACLs
- Why it fits: Because it runs inside PostgreSQL, you don't actually have to duplicate your permission trees or sync ACL blobs into a separate vector store. You can store your document/chunk embeddings in a table with a JSONB metadata column (or array of allowed
role_ids/tenant_ids), and perform a SQL JOIN against your user-group-hierarchy tables right inside the k-NN query. - ACL pattern:
WHERE vector_access_list&&user_computed_permissions_array WHERE vector_access_list space & space & space user_computed_permissions_array W H E R E v e c t o r_a c c e s s_l i s t&&u s e r_c o m p u t e d_p e r m i s s i o n s_a r r a y - Pros: Native foreign keys, recursive CTEs (
WITH RECURSIVE) for nested organizational groups, ACID transactions, and rock-solid metadata indexing (GIN indexes on JSONB/arrays). - Cons: Scaling to hundreds of millions of vectors requires careful tuning (IVFFlat/HNSW index build times and memory footprint), though it easily handles tens of millions of rows in standard enterprise deployments.
2. Elasticsearch / OpenSearch — Best for Enterprise RBAC & Nested Fields
- Why it fits: Though traditionally text search engines, Elasticsearch and OpenSearch are mature vector stores (
dense_vectorfields) that inherit decades of enterprise security features. They support nested objects, complex boolean queries, role-based access control, and document-level/field-level security out-of-the-box. - ACL pattern: Store ACL paths or flattened group arrays in indexed fields and apply standard
boolqueries combiningknnsearch withfilterclauses. - Pros: Unmatched maturity in enterprise IAM integration (SAML, Active Directory, fine-grained access control), native handling of deeply nested objects, and combined hybrid (dense + sparse/BM25) search.
- Cons: Heavy resource footprint (JVM heap tuning required) and higher operational complexity compared to lightweight vector DBs.
3. Pinecone (with Namespace / Metadata Filters) — Best for Managed Simplicity (with caveats)
- Why it fits: Pinecone supports rich metadata filtering (operators like
$in,$and,$or) alongside Namespaces. - ACL pattern: For strict isolation, partition data into separate Namespaces per tenant/organization. For finer-grained ACLs, attach a list of allowed group/user IDs to each vector's metadata and pass an
$infilter during the query. - Pros: Zero-ops, ultra-low latency, and predictable scaling.
- Cons: Metadata filter performance can degrade if your
$inarrays are massive (e.g., a user belongs to 500 overlapping groups, blowing up the filter payload), and it lacks native recursive hierarchy resolution—you have to resolve the user's effective permissions before calling the query.
4. Milvus / Zilliz Cloud — Best for High-Scale Raw Filtering
- Why it fits: Milvus handles scalar field filtering alongside vector similarity with bitmap-backed attribute filtering.
- ACL pattern: Store scalar tags/arrays (e.g.,
acl_group_ids) and apply boolean expression filters (expr="acl_group_ids in [1, 2, 3]"). - Pros: Built for massive scale (billions of vectors) with disaggregated storage and compute.
- Cons: Like Pinecone, Milvus doesn't "understand" your user hierarchy; your application layer must flatten or resolve the user's group memberships prior to querying.
Architectural Recommendation: Pre-expand vs. Post-filter
When dealing with hierarchical permissions (e.g., User -> Team -> Department -> Division), trying to evaluate the tree inside the vector distance calculation will kill your query performance.
- The Anti-Pattern (Post-filtering): Fetching top-K cap K𝐾 (e.g.,𝐾=1 0 0) vectors and dropping 80 of them because the user isn't authorized. You end up with 2 results instead of 10.
- The Scalable Pattern (Pre-filtering / Token Flattening):
- At ingestion time, compute and stamp every chunk/document with a flat array of all ancestor/permitted entity IDs (e.g.,
allowed_principals: ["user_123", "group_eng", "dept_tech", "org_root"]). - At query time, resolve the user's current effective group/hierarchy closure in milliseconds (via Redis or a fast SQL lookup).
- Pass that flattened array into the vector database's metadata filter (e.g.,
allowed_principals IN [...]). - If your hierarchy is massive and dynamic, pgvector or Elasticsearch will save you from painful metadata-sync lag.
- At ingestion time, compute and stamp every chunk/document with a flat array of all ancestor/permitted entity IDs (e.g.,
To help narrow down the ideal stack, tell me:
- Roughly how many total vectors and how many documents/chunks are you planning to index?
- Is your user/group hierarchy stored in an external identity provider / graph DB (like Azure AD, Okta, or Neo4j) that you need to sync from?
Google AI ModeNov 1, 2026
Managing Relationship-Based Access Control (ReBAC) —especially complex, hierarchical user permissions (e.g.,
folders → subfolders → documents → groups → inherited user rights)—requires a clear division of labor.Vector databases themselves are fundamentally permission-blind . They specialize in high-dimensional vector similarity (k-NN) and fast metadata/payload filtering, but they are not designed to natively store or evaluate deep graph topologies (like who reports to whom, or transitive group memberships).
Instead, robust ReBAC in semantic search/RAG pipelines is achieved using a hybrid architecture : pairing a dedicated authorization/ReBAC engine (such as Google Zanzibar implementations) with a vector database that provides fast, expressive metadata filtering.
The Blueprint: How ReBAC + Vector Search Works
- The Authorization Engine (e.g., SpiceDB) : Stores the relationship graph. When User A asks a question, the app queries the ReBAC engine: "What exact document IDs or group IDs is User A allowed to read?"
- The Vector Database (e.g., Pinecone, Qdrant, Milvus) : Executes the semantic search query while enforcing the retrieved permissions via Pre-filtering (passing the list of allowed IDs/groups directly into the metadata filter).
Top Vector Database Options for Metadata-Driven ReBAC
Because the heavy lifting of ReBAC happens upstream or via dynamic filters, the "best" vector databases are those with the lowest latency and highest expression limits for metadata filtering.
Vector Database Metadata Filtering Strengths for ReBAC Recommended Integration Pattern Pinecone Excellent support for large-scale metadata filtering (including $in,$and,$oroperators). Offers official integration patterns using AuthZed SpiceDB and Pinecone.Pre-filter via ReBAC Engine: Query SpiceDB for permitted resource IDs → pass as a bulk $infilter array to Pinecone.Qdrant Highly optimized Rust-based payload filtering. Supports rich nested conditions, geo-filters, and payload value matching. Supports JWT-based granular API keys for collection-level access, though hierarchical graph ReBAC still requires an external engine. Payload-based Filtering: Store ACL arrays or group IDs directly in the payload/metadata of each vector chunk and filter using Qdrant’s FilterAPI.Milvus / Zilliz Enterprise-grade scaling with robust scalar filtering capabilities alongside vector indexing. Supports partitioning collections by tenant or rich attribute filtering. Partition/Metadata Filtering: Leverage partitioned collections for macro-isolation and dynamic scalar filtering for fine-grained user groups. Weaviate Integrates properties and metadata natively into the object schema. Allows complex wherefilters combining cross-reference properties and primitive data types.GraphQL/REST Where Filters: Construct nested wherefilters matching user tenant or group attributes directly in the query payload.Implementation Strategies: Pre-filtering vs. Post-filtering
When implementing ReBAC over a vector pipeline, Pre-filtering is the gold standard for security.
- Pre-filtering (Recommended): You resolve the user's accessible resource/group list from your ReBAC system before hitting the vector database, appending it to the similarity search query. This guarantees zero information leakage.
- Limitation: If a user has access to millions of distinct items, array size limits in the vector database filter can become a bottleneck. In these cases, systems use permission-augmented tokens or compressed group identifiers during ingestion.
- Post-filtering (Not Recommended for ReBAC): Performing the vector search first (e.g., top K=100) and then stripping out unauthorized items. If a user only has access to 2 out of those 100 results, your LLM context window gets starved of relevant data, heavily degrading semantic search quality.
To help narrow down the ideal infrastructure choice, tell me:
- What ReBAC / Auth engine (if any) are you currently using or evaluating (e.g., SpiceDB, OpenFGA, custom graph)?
- Roughly how many distinct documents or permission groups does your pipeline need to index?
ChatGPTNov 1, 2026
Vector databases for relationship-based access control in semantic search
For complex, hierarchical permissions, the key distinction is between metadata filtering and native authorization.
Most vector databases support metadata filters, but relatively few provide comprehensive authorization mechanisms. In particular, a database that supports filtering by
user_id,group_id, ordepartment_iddoes not necessarily understand relationships such as:- A user inherits permissions from their department.
- A manager can access documents belonging to subordinate teams.
- A user belongs to multiple organizations.
- A document is accessible through direct ownership, group membership, or delegated access.
- Permissions change dynamically as organizational relationships change.
For your use case, I'd evaluate Weaviate, Qdrant, Elasticsearch, PostgreSQL with pgvector, Pinecone, and Milvus.
1. Leading options
1. Azure AI Search
(Best fit for native document permissions)
- Supports vector and hybrid search with security filters.
- Provides document-level ACL and RBAC permission enforcement.
- Supports hierarchical permissions, including folder-level ACLs.
- Can evaluate Microsoft Entra user and group identities against indexed permissions.
- Has native permission-aware retrieval capabilities, some currently in preview.
Why it stands out: It can handle much more of the authorization process within the search service instead of requiring you to implement all permission resolution yourself.
Sources:
Document-level access control documentation
2. Weaviate
(Strong native RBAC)
- Fine-grained role-based access control.
- Custom roles with permission inheritance.
- Collection-, tenant-, object-, and operation-level permission capabilities.
- Metadata filtering and hybrid search.
- Multi-tenancy for separating organizational data.
Why it stands out: Its built-in RBAC is more developed than the authorization capabilities of many vector-first databases.
Limitation: Native RBAC is not equivalent to arbitrary document-level relationship authorization. You may still need an external policy engine to resolve complex user-to-document relationships.
Sources:
Weaviate authorization documentation
3. Qdrant
(Best flexible metadata filtering)
- Rich JSON payload filtering.
- Nested object and array filtering.
- Boolean combinations using
must,should, andmust_not. - Payload indexes for efficient filtering.
- Tenant-aware data partitioning and custom sharding.
Why it stands out: You can represent complicated permission metadata and construct sophisticated filters without being restricted to simple equality conditions.
Limitation: Qdrant's payload filtering is not a complete relationship-based authorization engine. Your application or external policy service must calculate the user's effective permissions and construct the appropriate filter.
Sources:
Qdrant filtering documentation
4. Elasticsearch
(Strong document-level security)
- Document-level security (DLS).
- Field-level security (FLS).
- Role-based document queries.
- Role queries can use authenticated user information.
- Supports vector search and hybrid retrieval.
Why it stands out: You can define security policies at the index and document level rather than relying exclusively on application-generated metadata filters.
Limitation: Multiple role queries are combined using OR semantics. This requires careful role design to prevent unintended permission expansion. DLS also has limitations, including restrictions on some query types.
Sources:
Elasticsearch DLS/FLS documentation
5. PostgreSQL + pgvector
(Best relational authorization model)
- SQL-based permission joins.
- PostgreSQL Row-Level Security (RLS).
- Relational representation of organizational hierarchies.
- Vector similarity search through pgvector.
- Transactional consistency between permission changes and application data.
Why it stands out: If your authorization model is fundamentally relational, you can express permissions through SQL joins and enforce access through database-level policies.
Limitation: Complex joins and highly selective vector searches require performance testing and indexing optimization. pgvector's approximate indexes can also require iterative scans to avoid losing results to filtering.
6. Pinecone
- Metadata filters with operators such as
$eq,$in,$and, and$or. - Namespaces for tenant isolation.
- Managed vector infrastructure.
- Suitable for application-managed ACL filtering.
Why consider it: A good managed option when your application already has a centralized authorization service.
Limitation: Its metadata filtering should not be mistaken for native relationship-based authorization. Your application must resolve hierarchical access before submitting search filters.
7. Milvus
- Boolean filtering expressions.
- Scalar, JSON, and array filtering.
- Multiple multi-tenancy strategies.
- Partition-key isolation for large tenant populations.
Why consider it: Particularly useful for large-scale vector workloads with clearly defined tenant boundaries.
Limitation: Milvus partition-key multi-tenancy does not support RBAC at that level. Database- and collection-level tenancy provide RBAC, but have different scalability characteristics.
Sources:
Milvus multi-tenancy documentation
2. Comparison for hierarchical access control
Database Metadata filtering Native authorization Hierarchical ACL suitability Azure AI Search Excellent ACL/RBAC integration Excellent Weaviate Excellent RBAC Very good with external policy resolution Qdrant Excellent Primarily application-managed Very good with external policy resolution Elasticsearch Excellent DLS/FLS Very good PostgreSQL + pgvector Excellent SQL RLS Excellent Pinecone Very good Primarily application-managed Good Milvus Very good RBAC at certain tenancy levels Good These are architectural assessments, not standardized benchmark scores.
3. Recommended architecture for relationship-based permissions
For genuinely complex hierarchical permissions, I would avoid trying to encode the entire authorization model directly into vector metadata.
Instead, separate authorization resolution from vector retrieval.
Suggested architecture
User / Application
Authenticated identity and requested search
Authorization / Policy Engine
Resolve user, group, department, organization and inherited permissions
Permission-aware filter generation
Generate trusted document-access constraints
Vector Database
Apply authorization filters during semantic retrieval
Authorized Search Results
Only permitted document chunks enter the RAG context
Authorization engines worth evaluating
Two particularly relevant technologies are:
- OpenFGA — implements relationship-based access control (ReBAC), including object relationships and inherited permissions. Official documentation.
- SpiceDB — supports Zanzibar-inspired authorization models, hierarchical relationships, and permission checks. Official documentation.
These can resolve questions such as whether a user has access to a document through membership in a parent organization, inherited team membership, or delegated permissions.
4. Example metadata model
A document chunk could contain:
json{ "document_id": "doc-123", "organization_id": "org-001", "department_id": "engineering", "team_id": "platform", "owner_id": "user-456", "allowed_principals": [ "user-456", "group-engineering", "group-platform", "org-001" ], "classification": "confidential" }At query time, the authorization engine resolves the authenticated user's effective permissions.
The application then generates a filter that combines:
- Permitted principal identifiers.
- Organization boundaries.
- Document classification.
- Explicit access restrictions.
- Any applicable deny policies.
Important: This metadata example is a simplified access model, not a complete authorization policy. In particular, explicit denies, revocations, inheritance, and classification rules need defined semantics. The client must never be allowed to supply or override its own authorization filter.
5. My recommendation
I'd narrow your evaluation to three architectures:
Priority Architecture Best application 1 Azure AI Search with native ACL integration Microsoft-centric enterprise environments 2 Qdrant + OpenFGA or SpiceDB Complex custom hierarchical permissions 3 PostgreSQL + pgvector + RLS Systems with deeply relational authorization models My preferred starting point for a database-independent, highly customizable system would be Qdrant + OpenFGA.
It separates two responsibilities cleanly:
- OpenFGA determines who can access what.
- Qdrant determines which authorized documents are semantically relevant.
For a Microsoft 365-heavy organization, Azure AI Search deserves serious consideration because it can integrate existing identity and document permissions directly. Note that some of its newer native ACL integrations remain preview features.
6. Important implementation considerations
Before choosing a platform, benchmark these five capabilities:
- Permission inheritance: Can access propagate from organization to department to team to document?
- Dynamic revocation: How quickly do permission changes become effective?
- Filter selectivity: Can vector search maintain good recall when only a tiny percentage of documents are accessible?
- Permission synchronization: How are changes to groups, ownership, and document ACLs propagated to indexed chunks?
- Security enforcement: Can unauthorized content be excluded before it reaches the LLM, including through alternate retrieval and caching paths?
One particularly important distinction: filtering search results after vector retrieval is not sufficient. Authorization constraints should be applied within retrieval, with additional checks before sensitive content enters the LLM context.
7. A question that would help narrow the architecture
Are your hierarchical permissions primarily based on:
- Organizational hierarchy: Company → Division → Department → Team → User.
- Document relationships: Owner → Collaborator → Shared group → Inherited access.
- Complex enterprise ACLs: Combinations of RBAC, ABAC, ReBAC, explicit denies, and delegated permissions.
The distinction matters because it determines whether a metadata-filtering solution is sufficient or whether you need a dedicated relationship-based authorization engine alongside your vector database.
Pages cited in this answer 16
- learn.microsoft.comDocument-Level Access Control - Azure AI Search | Microsoft Learn
- learn.microsoft.comIndexing ACLs Using the Push REST API - Azure AI Search | Microsoft Learn
- learn.microsoft.comVector Query Filters - Azure AI Search | Microsoft Learn
- docs.weaviate.ioAuthentication and authorization | Weaviate Documentation
- docs.weaviate.ioEnable and configure RBAC | Weaviate Documentation
- docs.weaviate.ioFilters | Weaviate Documentation
- qdrant.techFiltering - Qdrant
- qdrant.techIndexing - Qdrant
- qdrant.techMultitenancy - Qdrant
- elastic.coControlling access at the document and field level | Elastic Docs
- github.comGitHub - pgvector/pgvector: Open-source vector similarity search for Postgres · GitHub
- milvus.ioImplement Multi-tenancy Milvus v2.6.x documentation
- milvus.ioUse Partition Key | Milvus Documentation
- milvus.ioImplement Multi-tenancy Milvus v2.5.x documentation
- openfga.devFine-Grained Authorization | OpenFGA
- authzed.comSpiceDB | AuthZed
Also asked as
- Which vector search services offer the strongest capabilities for fine-grained access control and hierarchical permission management? We need this for a semantic search implementation that relies heavily on metadata filtering.
For agents: this page as Markdown, https://parse.gl/topics/access-controlled-semantic-search.md. JSON, MCP · free for the last 90 days, $0.01 a check
This page
Read and search
Connect
An agent can save work before signup: POST https://agent.parse.gl/v1/workspaces
What it costs
Prices: https://parse.gl/pricing.md
Map of the site: https://parse.gl/llms.txt