Hierarchy Search Guide
This guide covers the hierarchy search capabilities of the QDrant Loader MCP Server, enabling you to navigate and understand the structure of your knowledge base with AI assistance.
π― Overview
The hierarchy search tool is designed specifically for Confluence documents where document relationships and organization matter. It's particularly powerful for:
- Confluence spaces with parent-child page relationships
- Confluence documentation with hierarchical organization
- Confluence knowledge bases with nested structures
Key Benefits
- Structure Awareness: Understands parent-child relationships between documents
- Context Preservation: Maintains hierarchical context in search results
- Navigation Aid: Helps explore and understand documentation organization
- Completeness Checking: Identifies gaps in documentation structure
ποΈ How Hierarchy Search Works
Document Relationships
The hierarchy search tool understands document relationships in Confluence:
π Root Document
βββ π Child Document 1
β βββ π Grandchild 1.1
β βββ π Grandchild 1.2
βββ π Child Document 2
β βββ π Grandchild 2.1
β β βββ π Great-grandchild 2.1.1
β βββ π Grandchild 2.2
βββ π Child Document 3
Search Process
Query: "API documentation structure"
β
1. Semantic Search (find relevant Confluence documents)
β
2. Hierarchy Analysis (understand relationships)
β
3. Context Enrichment (add parent/child info)
β
4. Structured Results (organized by hierarchy)
π§ Hierarchy Search Parameters
Important: Hierarchy search currently only works with Confluence documents. Other document types (Git repositories, local files, etc.) do not contain the hierarchical metadata required for this search type.
Available Parameters
{
"name": "hierarchy_search",
"parameters": {
"query": "string", // Required: Search query
"limit": 10, // Optional: Number of results (default: 10)
"organize_by_hierarchy": false, // Optional: Group results by structure (default: false)
"hierarchy_filter": { // Optional: Hierarchy-specific filters
"depth": 3, // Filter by specific hierarchy depth
"has_children": true, // Filter by whether pages have children
"parent_title": "API Documentation", // Filter by parent page title
"root_only": false // Show only root pages (no parent)
}
}
}
Parameter Details
Required Parameters
query
(string): The search query in natural language
Optional Parameters
limit
(integer): Maximum number of results to return (default: 10)organize_by_hierarchy
(boolean): Group results by hierarchy structure (default: false)
Hierarchy Filter Options
depth
(integer): Filter by specific hierarchy depth (0 = root pages)has_children
(boolean): Filter by whether pages have childrenparent_title
(string): Filter by parent page titleroot_only
(boolean): Show only root pages (no parent)
π Understanding Hierarchy Results
Result Structure
Hierarchy search results are returned as formatted text with hierarchical information:
Found 3 results:
π API Authentication (Score: 0.890)
π Path: API Documentation > Security > Authentication
ποΈ Path: API Documentation > Security > Authentication | Depth: 2 | Children: 3
β¬οΈ Children: 3
This document covers authentication methods for our REST API including OAuth 2.0, JWT tokens, and API keys...
π https://wiki.company.com/api/auth
π OAuth Implementation (Score: 0.850)
π Path: API Documentation > Security > Authentication > OAuth
ποΈ Path: API Documentation > Security > Authentication > OAuth | Depth: 3 | Children: 2
OAuth 2.0 implementation guide with code examples and best practices...
π https://wiki.company.com/api/auth/oauth
Hierarchy Metadata
Each result includes hierarchy metadata displayed with icons:
- π Path: Full breadcrumb path from root to document (Confluence only)
- ποΈ Hierarchy Context: Formatted hierarchy information with depth and children count
- β¬οΈ Children: Number of direct child documents (when > 0)
- π URL: Link to the source document
π― Use Cases and Examples
1. Documentation Navigation
Finding Document Structure
Query: "Show me the structure of our API documentation"
Parameters: {
"organize_by_hierarchy": true,
"limit": 15
}
Results:
Found 8 results organized by hierarchy:
π **API Documentation** (5 results)
π API Documentation (Score: 0.920)
Complete API reference and developer guide...
π https://wiki.company.com/api
π Getting Started (Score: 0.890)
Quick start guide for new API developers...
π https://wiki.company.com/api/getting-started
π Authentication (Score: 0.870)
Authentication methods and security guidelines...
π https://wiki.company.com/api/authentication
π User Management API (Score: 0.850)
User creation, update, and deletion endpoints...
π https://wiki.company.com/api/users
π Rate Limiting (Score: 0.830)
API rate limiting policies and headers...
π https://wiki.company.com/api/limits
π **Security Guidelines** (3 results)
π OAuth 2.0 Implementation (Score: 0.810)
OAuth 2.0 flow implementation with examples...
π https://wiki.company.com/security/oauth
Finding Related Documents
Query: "authentication"
Parameters: {
"limit": 10
}
Results:
Found 3 results:
π Authentication Guide (Score: 0.890)
π Path: API Documentation > Security > Authentication
ποΈ Path: API Documentation > Security > Authentication | Depth: 2 | Children: 3
β¬οΈ Children: 3
This comprehensive authentication guide covers multiple authentication methods including OAuth 2.0, JWT tokens, and API keys. Each method includes implementation examples and security best practices...
π https://wiki.company.com/api/security/authentication
π OAuth 2.0 Implementation (Score: 0.850)
π Path: API Documentation > Security > Authentication > OAuth 2.0
ποΈ Path: API Documentation > Security > Authentication > OAuth 2.0 | Depth: 3 | Children: 0
OAuth 2.0 flow implementation with step-by-step examples for web applications and mobile apps...
π https://wiki.company.com/api/security/authentication/oauth
2. Content Organization
Finding Where to Add New Content
Query: "Where should I add documentation about webhook security?"
Parameters: {
"query": "webhook security",
"limit": 10
}
AI Response using hierarchy search:
Based on your documentation structure, here are the best places to add webhook security documentation:
1. **Primary Location**: API Documentation > Security > Webhooks
- Path: /api/security/webhooks/
- This would be a new child under the Security section
- Consistent with existing security documentation structure
2. **Alternative Location**: API Documentation > Webhooks > Security
- Path: /api/webhooks/security/
- If you have a dedicated Webhooks section
- Would group all webhook-related content together
Recommendation: Create the main documentation under Security and add examples under the Examples section.
Checking Documentation Completeness
Query: "deployment documentation structure"
Parameters: {
"query": "deployment",
"organize_by_hierarchy": true,
"limit": 20
}
Results:
Found 6 results organized by hierarchy:
π **Deployment Documentation** (6 results)
π Deployment Overview (Score: 0.920)
Complete deployment guide for all environments...
π https://wiki.company.com/deployment
π Development Environment (Score: 0.890)
Development environment setup and configuration...
π https://wiki.company.com/deployment/dev
π Production Deployment (Score: 0.880)
Production deployment procedures and checklists...
π https://wiki.company.com/deployment/prod
π AWS Deployment Guide (Score: 0.870)
AWS-specific deployment configuration and steps...
π https://wiki.company.com/deployment/aws
π Docker Deployment (Score: 0.860)
Container deployment with Docker and Docker Compose...
π https://wiki.company.com/deployment/docker
π CI/CD Pipeline (Score: 0.850)
Continuous integration and deployment pipeline setup...
π https://wiki.company.com/deployment/cicd
**Note**: Use this structure to identify gaps by comparing with your requirements.
3. Knowledge Discovery
Exploring Unfamiliar Areas
Query: "What do we have documented about microservices?"
Parameters: {
"query": "microservices",
"organize_by_hierarchy": true,
"limit": 15
}
Results:
Found microservices documentation across multiple areas:
π Architecture Documentation
βββ π Microservices Overview
βββ π Service Design
β βββ π API Design Patterns
β βββ π Data Consistency
β βββ π Service Communication
βββ π Deployment Patterns
βββ π Container Orchestration
βββ π Service Mesh
π Development Guidelines
βββ π Backend Development
β βββ π Service Structure
β βββ π Testing Microservices
βββ π DevOps
βββ π CI/CD for Services
βββ π Monitoring Services
Understanding Document Relationships
Query: "How is our API documentation organized?"
Parameters: {
"query": "API documentation",
"organize_by_hierarchy": true,
"limit": 15
}
Results:
Found 8 results organized by hierarchy:
π **API Documentation** (8 results)
π API Documentation (Score: 0.950)
Complete API reference and developer guide for our REST API...
π https://wiki.company.com/api
π Getting Started (Score: 0.920)
Quick start guide for new API developers with examples...
π https://wiki.company.com/api/getting-started
π Authentication Setup (Score: 0.890)
Authentication configuration and initial setup steps...
π https://wiki.company.com/api/getting-started/auth
π API Reference (Score: 0.910)
Complete endpoint reference with parameters and responses...
π https://wiki.company.com/api/reference
π User Endpoints (Score: 0.880)
User management API endpoints and data models...
π https://wiki.company.com/api/reference/users
π Security Guidelines (Score: 0.900)
Security best practices and implementation guidelines...
π https://wiki.company.com/api/security
π Rate Limiting (Score: 0.870)
API rate limiting policies and headers...
π https://wiki.company.com/api/security/rate-limits
π Error Handling (Score: 0.860)
Error codes, messages, and handling best practices...
π https://wiki.company.com/api/errors
π Advanced Hierarchy Search Techniques
1. Depth-Based Filtering
Finding Root Documents
{
"query": "documentation",
"hierarchy_filter": {
"root_only": true
}
}
Results: Only top-level documents without parents
Finding Documents with Children
{
"query": "implementation",
"hierarchy_filter": {
"has_children": true
}
}
Results: Only documents that have child documents (section overviews)
Finding Specific Depth
{
"query": "API",
"hierarchy_filter": {
"depth": 2
}
}
Results: Only documents at exactly 2 levels deep
2. Parent-Based Navigation
Finding All Children of a Parent
{
"hierarchy_filter": {
"parent_title": "API Documentation"
},
"organize_by_hierarchy": true
}
Results: All documents under "API Documentation" organized by structure
π¨ Hierarchy Visualization
Tree Structure Display
When organize_by_hierarchy: true
, results are displayed grouped by root documents:
Found 6 results organized by hierarchy:
π **API Documentation** (4 results)
π API Documentation (Score: 0.890)
Complete guide to our REST API with authentication, endpoints, and examples...
π https://wiki.company.com/api
π Authentication Guide (Score: 0.850)
Authentication methods including OAuth 2.0, JWT tokens, and API keys...
π https://wiki.company.com/api/auth
π OAuth Implementation (Score: 0.820)
OAuth 2.0 implementation guide with code examples...
π https://wiki.company.com/api/auth/oauth
π Rate Limiting (Score: 0.800)
API rate limiting policies and implementation details...
π https://wiki.company.com/api/limits
π **Developer Tools** (2 results)
π SDK Documentation (Score: 0.780)
Software development kits for multiple programming languages...
π https://wiki.company.com/sdk
Breadcrumb Navigation
Results include navigation paths:
Document: JWT Authentication
Path: API Documentation > Security > Authentication > JWT Authentication
Relationship Indicators
Results show document relationships through breadcrumb paths and hierarchy context:
π API Rate Limiting (Score: 0.880)
π Path: API Documentation > Security > API Rate Limiting
ποΈ Path: API Documentation > Security > API Rate Limiting | Depth: 2 | Children: 2
β¬οΈ Children: 2
API rate limiting policies and implementation guidelines for preventing abuse...
π https://wiki.company.com/api/security/rate-limiting
π§ Optimization Strategies
1. Query Optimization
Structure-Focused Queries
β
"Show me the structure of deployment documentation"
β
"What are all the sections under API security?"
β
"Find all child pages of the troubleshooting guide"
β "deployment"
β "security"
β "troubleshooting"
Relationship Queries
β
"What documentation is related to user authentication?"
β
"Find all sibling documents to the API reference"
β
"Show me the parent and children of the deployment guide"
2. Parameter Optimization
For Structure Exploration
{
"organize_by_hierarchy": true,
"limit": 20,
"hierarchy_filter": {
"has_children": true
}
}
For Quick Navigation
{
"limit": 5,
"hierarchy_filter": {
"depth": 2
}
}
For Completeness Checking
{
"organize_by_hierarchy": true,
"limit": 50,
"hierarchy_filter": {
"has_children": true
}
}
3. Performance Optimization
Limit Hierarchy Depth
{
"hierarchy_filter": {
"depth": 3 // Focus on specific depth
}
}
Control Result Size
{
"limit": 10 // Reasonable limit for performance
}
π― Best Practices
1. Query Design
- Be specific about structure: "Show me the organization of..." rather than just keywords
- Use relationship terms: "children", "parent", "siblings", "structure"
- Ask navigation questions: "Where should I add...", "What's under...", "How is ... organized?"
2. Parameter Selection
- Use
organize_by_hierarchy: true
for structure exploration - Limit depth for performance with large hierarchies
- Filter by
has_children
for section overviews - Use
root_only
for top-level organization
3. Result Interpretation
- Follow breadcrumb paths to understand document context
- Check hierarchy depth to understand document importance
- Review children count for section completeness
- Examine parent context for related content
4. Common Patterns
Documentation Audit
{
"query": "section overview",
"organize_by_hierarchy": true,
"hierarchy_filter": {
"has_children": true
}
}
Content Planning
{
"query": "where to add new content",
"hierarchy_filter": {
"parent_title": "API Documentation"
}
}
Navigation Aid
{
"query": "find related documentation",
"organize_by_hierarchy": true,
"limit": 15
}
π Integration with Other Search Tools
Combining with Semantic Search
- Start with hierarchy search to understand structure
- Use semantic search for detailed content
- Return to hierarchy search for related documents
Combining with Attachment Search
- Use hierarchy search to find document context
- Use attachment search to find related files
- Combine results for complete picture
Search Strategy
1. Hierarchy Search: "What's the structure of deployment docs?"
β Understand organization
2. Semantic Search: "Docker deployment best practices"
β Find specific content
3. Hierarchy Search: "What else is under deployment documentation?"
β Discover related content
4. Attachment Search: "deployment diagrams and scripts"
β Find supporting files
π Related Documentation
- MCP Server Overview - Complete MCP server guide
- Search Capabilities - All search tools overview
- Attachment Search - File attachment search
- Setup and Integration - MCP server setup
π Hierarchy Search Checklist
- [ ] Understand hierarchy structure in your knowledge base
- [ ] Use structure-focused queries for navigation
- [ ] Enable hierarchy organization for structure exploration
- [ ] Apply appropriate filters for targeted results
- [ ] Check parent-child relationships for related content
- [ ] Optimize parameters for performance
- [ ] Combine with other search tools for comprehensive results
Navigate your knowledge structure with confidence! πΊοΈ
Hierarchy search transforms how you explore and understand your documentation. Instead of isolated search results, you get a complete picture of how information is organized, making it easier to find what you need and understand how it fits into the bigger picture.