Prompt
What should I use for permission-aware search across company documents?
Latest observation
For permission-aware search across company documents, the right choice is usually a search engine with access control filtering built in or a hybrid search architecture that enforces permissions at query time.
Good options
1. Elasticsearch / OpenSearch
Best if you want a flexible, scalable search stack.
- Supports full-text search, filtering, ranking, and vector search
- You can store ACLs / group IDs / tenant IDs on documents
- At query time, filter results by the user’s allowed groups or permissions
- Common choice for enterprise document search
Best when: you need control, scale, and custom ranking.
2. Azure AI Search
Good managed option if you’re in Microsoft/Azure ecosystem.
- Built-in support for security trimming patterns
- Integrates well with Microsoft identity and enterprise content sources
- Can combine keyword and semantic search
Best when: you want managed infrastructure and Azure integration.
3. Google Cloud Search / Vertex AI Search
Useful if your company is already on Google Cloud / Workspace.
- Good for searching across enterprise content
- Permission-aware search is a core feature in some Google products
- Less custom than open search stacks
Best when: you want SaaS-style enterprise search.
4. SharePoint / Microsoft Graph Search
If your docs already live in Microsoft 365.
- Native permissions from SharePoint, OneDrive, Teams, etc.
- Strong security trimming out of the box
- Minimal need to reimplement ACL logic
Best when: your documents are already in M365.
What to avoid
A plain vector database alone is usually not enough for permission-aware search.
Why:
- Vector DBs are good at semantic similarity
- They often don’t handle fine-grained authorization by themselves
- You still need a secure filtering layer for ACLs
So if you use embeddings, pair them with:
- keyword/full-text index
- metadata filters for permissions
- authorization check before/after retrieval
Recommended architecture
A common robust setup is:
- Ingest documents
- Extract text + metadata + ACLs
- Index into search engine
- At query time:
- authenticate user
- resolve user groups/roles
- filter search results by allowed ACLs
- optionally rerank with semantic/vector search
This gives you:
- fast search
- permission trimming
- auditability
If you want a simple recommendation
- Small/medium internal app: OpenSearch or Elasticsearch
- Microsoft-heavy org: Azure AI Search or Microsoft Graph/SharePoint search
- SaaS enterprise search: Google Cloud Search / Vertex AI Search
- Need semantic search too: OpenSearch/Elasticsearch + embeddings + ACL filters
If you want, I can also recommend:
- a specific stack based on your cloud/provider,
- a schema design for ACL-aware indexing, or
- a build vs buy comparison.