Practice & Implementation - Search Explorer & Portal Tools¶
Overview¶
This guide provides hands-on exercises and practical implementation scenarios for mastering Azure AI Search portal tools. Work through these exercises to build real-world skills with Search Explorer, Import Data wizard, and portal management features.
Prerequisites¶
Before starting these exercises, ensure you have: - Completed the Prerequisites setup - Access to Azure portal with Azure AI Search service - Sample data available for testing - Basic understanding of search concepts from previous modules
Exercise 1: Search Explorer Mastery¶
Objective¶
Master the Search Explorer interface and learn to construct, test, and debug search queries interactively.
Scenario¶
You're developing a hotel booking application and need to test various search scenarios using the Azure portal before implementing them in code.
Tasks¶
Task 1.1: Basic Search Operations¶
Navigate to Search Explorer and perform these basic operations:
Step 1: Simple Text Search
Step 2: Wildcard Search
Step 3: Phrase Search
Implementation Notes: - Observe how different search types return different results - Note the relevance scores in the results - Pay attention to which fields are being searched
Task 1.2: Advanced Query Parameters¶
Test various query parameters to understand their effects:
Field-Specific Search
Search Mode Configuration
Query Type Selection
Task 1.3: Result Customization¶
Learn to shape and customize search results:
Field Selection
Result Limiting
Hit Highlighting
{
"search": "luxury",
"highlight": "Description",
"highlightPreTag": "<mark>",
"highlightPostTag": "</mark>"
}
Expected Outcomes¶
- Understand Search Explorer interface and capabilities
- Master basic and advanced query construction
- Learn to customize and analyze search results
Exercise 2: Filtering and Sorting in Search Explorer¶
Objective¶
Implement complex filtering and sorting scenarios using the portal interface.
Scenario¶
Hotel customers need sophisticated filtering options: price ranges, ratings, amenities, and location-based searches.
Tasks¶
Task 2.1: Basic Filtering¶
Test various filter scenarios:
Category Filtering
Rating Range
Boolean Filtering
Task 2.2: Complex Filter Combinations¶
Build sophisticated filter expressions:
Multi-Criteria Filtering
{
"search": "hotel",
"filter": "Category eq 'Luxury' and Rating ge 4.5 and ParkingIncluded eq true"
}
OR Logic Filtering
Collection Filtering
Task 2.3: Geographic Filtering¶
Test location-based filtering:
Distance-Based Filtering
Combined Geographic and Rating Filter
{
"search": "*",
"filter": "geo.distance(Location, geography'POINT(-73.975403 40.760586)') lt 5 and Rating ge 4.0"
}
Task 2.4: Sorting Operations¶
Test various sorting scenarios:
Single Field Sorting
Multi-Field Sorting
Geographic Sorting
Expected Outcomes¶
- Master complex filtering techniques
- Understand geographic search capabilities
- Learn effective sorting strategies
Exercise 3: Faceted Navigation and Aggregations¶
Objective¶
Implement faceted search and understand aggregation capabilities through the portal.
Scenario¶
Create a faceted navigation system for hotel search that allows users to refine results by category, rating, city, and amenities.
Tasks¶
Task 3.1: Basic Faceting¶
Configure and test faceted search:
Category Facets
Rating Facets with Intervals
Multiple Facets
Task 3.2: Advanced Faceting¶
Explore advanced faceting scenarios:
Facets with Filtering
{
"search": "hotel",
"filter": "Category eq 'Luxury'",
"facets": ["Address/City", "Rating,interval:0.5"]
}
Collection Facets
Task 3.3: Facet Analysis¶
Analyze facet results to understand data distribution:
- Count Analysis: Examine document counts for each facet value
- Coverage Analysis: Identify which facets provide good filtering options
- User Experience: Consider which facets would be most useful for users
Expected Outcomes¶
- Understand faceted search implementation
- Learn to analyze facet data for UX decisions
- Master advanced faceting scenarios
Exercise 4: Import Data Wizard Walkthrough¶
Objective¶
Use the Import Data wizard to create complete search solutions from various data sources.
Scenario¶
Set up automated indexing for a hotel database stored in Azure Blob Storage, including AI enrichment for content extraction.
Tasks¶
Task 4.1: Azure Blob Storage Import¶
Create an end-to-end solution using the Import Data wizard:
Step 1: Data Source Configuration 1. Click "Import data" in the Azure portal 2. Select "Azure Blob Storage" as data source 3. Configure connection string and container 4. Set parsing mode (JSON, delimited text, etc.)
Step 2: Cognitive Skills (Optional) 1. Add cognitive skills for content enrichment 2. Configure key phrase extraction 3. Set up entity recognition 4. Configure language detection
Step 3: Index Customization 1. Review auto-generated index schema 2. Modify field attributes as needed 3. Configure analyzers for text fields 4. Set up field mappings
Step 4: Indexer Configuration 1. Set indexer name and description 2. Configure execution schedule 3. Set up change detection policy 4. Configure field mappings
Task 4.2: Azure SQL Database Import¶
Set up indexing from a relational database:
Step 1: Database Connection 1. Select "Azure SQL Database" as data source 2. Configure connection string 3. Select table or view 4. Configure query for data extraction
Step 2: Change Detection 1. Set up high water mark change detection 2. Configure deletion detection policy 3. Test connection and data access
Step 3: Index and Indexer Setup 1. Customize generated index schema 2. Configure field mappings for relational data 3. Set up appropriate indexer schedule
Task 4.3: Monitoring and Validation¶
After wizard completion:
Indexer Monitoring 1. Navigate to "Indexers" in the portal 2. Monitor indexer execution status 3. Review execution history and statistics 4. Check for errors or warnings
Index Validation 1. Use Search Explorer to test indexed data 2. Verify field mappings are correct 3. Test search functionality 4. Validate document count and content
Expected Outcomes¶
- Master the Import Data wizard workflow
- Understand different data source configurations
- Learn to monitor and validate automated indexing
Exercise 5: Portal Management and Monitoring¶
Objective¶
Learn to effectively manage and monitor Azure AI Search services using portal tools.
Scenario¶
You're responsible for maintaining a production search service and need to monitor performance, manage resources, and troubleshoot issues.
Tasks¶
Task 5.1: Service Overview and Health¶
Explore the service management interface:
Service Dashboard 1. Navigate to service overview page 2. Review service tier and capacity 3. Check service health status 4. Monitor key metrics and usage
Resource Management 1. Review search units and replicas 2. Check storage usage and limits 3. Monitor API key usage 4. Review service configuration
Task 5.2: Index Management¶
Learn comprehensive index management:
Index Operations 1. View all indexes in the service 2. Check index statistics (document count, size) 3. Review index schema and field configurations 4. Monitor index performance metrics
Index Maintenance 1. Practice index rebuilding process 2. Understand index deletion implications 3. Learn index backup and restore concepts 4. Review index versioning strategies
Task 5.3: Indexer Management¶
Master indexer operations and monitoring:
Indexer Status Monitoring 1. View all indexers and their status 2. Review execution history and patterns 3. Analyze performance metrics 4. Identify and troubleshoot failures
Indexer Operations 1. Practice manual indexer execution 2. Modify indexer schedules 3. Update indexer configurations 4. Handle indexer errors and warnings
Task 5.4: Performance Monitoring¶
Set up comprehensive performance monitoring:
Metrics Analysis 1. Review search latency trends 2. Monitor query volume and patterns 3. Analyze indexing performance 4. Track resource utilization
Alert Configuration 1. Set up performance alerts 2. Configure error rate monitoring 3. Create capacity utilization alerts 4. Test alert notification systems
Expected Outcomes¶
- Master service management and monitoring
- Understand performance optimization techniques
- Learn proactive maintenance strategies
Exercise 6: Query Development and Testing¶
Objective¶
Develop a systematic approach to query development and testing using portal tools.
Scenario¶
Build and test a comprehensive set of search queries for different user scenarios in a hotel booking application.
Tasks¶
Task 6.1: User Scenario Mapping¶
Define and test queries for different user types:
Business Traveler Queries
{
"search": "business hotel",
"filter": "Category eq 'Business' and ParkingIncluded eq true",
"orderby": "Rating desc",
"facets": ["Address/City"]
}
Leisure Traveler Queries
{
"search": "resort spa pool",
"filter": "Tags/any(t: t eq 'pool' or t eq 'spa')",
"orderby": "Rating desc",
"facets": ["Category", "Tags"]
}
Budget-Conscious Queries
{
"search": "*",
"filter": "Rating ge 3.0",
"orderby": "Rating desc",
"facets": ["Category", "ParkingIncluded"]
}
Task 6.2: Performance Testing¶
Test query performance with different parameters:
Result Set Size Impact
// Test with different top values
{"search": "*", "top": 10}
{"search": "*", "top": 50}
{"search": "*", "top": 100}
Field Selection Impact
// All fields vs. selected fields
{"search": "hotel"}
{"search": "hotel", "select": "HotelName,Rating"}
Filter Complexity Impact
// Simple vs. complex filters
{"search": "*", "filter": "Rating gt 4.0"}
{"search": "*", "filter": "Rating gt 4.0 and Category eq 'Luxury' and ParkingIncluded eq true"}
Task 6.3: Query Optimization¶
Optimize queries based on testing results:
Identify Slow Queries 1. Use browser developer tools to measure response times 2. Test with realistic data volumes 3. Document performance benchmarks 4. Identify optimization opportunities
Optimize Query Structure 1. Reorder filter conditions for better performance 2. Use more selective filters first 3. Optimize field selection 4. Consider facet usage impact
Expected Outcomes¶
- Develop systematic query testing approach
- Understand performance optimization techniques
- Create reusable query patterns
Exercise 7: Troubleshooting and Debugging¶
Objective¶
Learn to diagnose and resolve common issues using portal tools.
Scenario¶
Troubleshoot various problems that arise in a production search environment.
Tasks¶
Task 7.1: Query Troubleshooting¶
Diagnose and fix common query issues:
Syntax Error Resolution
// ❌ Problematic query
{
"search": "hotel",
"filter": "Rating > 4.0" // Invalid operator
}
// ✅ Fixed query
{
"search": "hotel",
"filter": "Rating gt 4.0" // Correct OData syntax
}
Field Reference Errors
// ❌ Problematic query
{
"search": "hotel",
"filter": "rating gt 4.0" // Incorrect field name case
}
// ✅ Fixed query
{
"search": "hotel",
"filter": "Rating gt 4.0" // Correct field name
}
Task 7.2: Indexer Troubleshooting¶
Diagnose and resolve indexer issues:
Connection Problems 1. Test data source connectivity 2. Verify credentials and permissions 3. Check network access and firewall rules 4. Validate connection strings
Data Processing Errors 1. Review indexer execution logs 2. Identify problematic documents 3. Check field mapping configurations 4. Validate data formats and types
Performance Issues 1. Monitor indexer execution times 2. Identify bottlenecks in data processing 3. Optimize batch sizes and schedules 4. Review resource utilization
Task 7.3: Service Health Monitoring¶
Monitor and maintain service health:
Capacity Management 1. Monitor storage usage trends 2. Track query volume patterns 3. Analyze resource utilization 4. Plan for capacity scaling
Error Rate Analysis 1. Review error logs and patterns 2. Identify common failure scenarios 3. Implement preventive measures 4. Set up proactive monitoring
Expected Outcomes¶
- Master troubleshooting techniques
- Understand common problem patterns
- Develop proactive monitoring strategies
Exercise 8: Integration Planning¶
Objective¶
Plan the transition from portal-based development to programmatic implementation.
Scenario¶
You've developed and tested search functionality in the portal and now need to implement it programmatically in your application.
Tasks¶
Task 8.1: Configuration Export¶
Document and export portal configurations:
Query Pattern Documentation
// Document successful query patterns
const queryPatterns = {
hotelSearch: {
search: "hotel",
filter: "Rating ge 4.0",
orderby: "Rating desc",
select: "HotelName,Rating,Address/City",
facets: ["Category", "Address/City"]
},
locationSearch: {
search: "*",
filter: "geo.distance(Location, geography'POINT(-73.975403 40.760586)') lt 10",
orderby: "geo.distance(Location, geography'POINT(-73.975403 40.760586)')"
}
};
Index Schema Export 1. Copy index definition from portal 2. Save as JSON configuration file 3. Document field attribute decisions 4. Create deployment templates
Task 8.2: API Implementation Planning¶
Plan the programmatic implementation:
SDK Selection 1. Choose appropriate SDK (.NET, Python, JavaScript) 2. Plan authentication strategy 3. Design error handling approach 4. Consider performance optimization
Architecture Design 1. Plan search service integration 2. Design caching strategies 3. Consider scalability requirements 4. Plan monitoring and logging
Task 8.3: Testing Strategy¶
Develop comprehensive testing approach:
Unit Testing 1. Test query construction logic 2. Validate filter building functions 3. Test result processing code 4. Mock search service responses
Integration Testing 1. Test against actual search service 2. Validate end-to-end workflows 3. Test error handling scenarios 4. Performance testing with realistic loads
Expected Outcomes¶
- Successfully transition from portal to code
- Create comprehensive implementation plan
- Establish testing and validation strategies
Completion Checklist¶
After completing these exercises, you should be able to:
- [ ] Navigate and use Search Explorer effectively
- [ ] Construct complex search queries with filters and sorting
- [ ] Implement faceted search and analyze results
- [ ] Use Import Data wizard for various data sources
- [ ] Monitor and manage search services through portal
- [ ] Troubleshoot common issues using portal tools
- [ ] Optimize query performance based on testing
- [ ] Plan transition from portal to programmatic implementation
Next Steps¶
- Apply to Your Project: Implement these techniques in your own search application
- Explore Advanced Features: Move on to intermediate modules for advanced capabilities
- Automation: Begin implementing programmatic versions of portal workflows
- Production Readiness: Focus on monitoring, scaling, and maintenance strategies
Additional Resources¶
Module Documentation¶
- Prerequisites - Required setup and knowledge
- Main Documentation - Complete module overview
- Best Practices - Guidelines for effective portal usage
- Troubleshooting - Common issues and solutions
- Code Samples - Automation examples
External Resources¶
When You Need Help¶
- Portal Issues: Check the Troubleshooting Guide
- Query Problems: Review Search Explorer Examples
- Import Issues: Explore Import Data Wizard Examples
Remember: The portal is your testing ground and learning environment. Use it to experiment, validate concepts, and build confidence before implementing in code.