Azure Search Plugin for Dify
[blocked]
Author: comlan
Version: 0.0.1
Type: Tool Plugin
📖 Introduction
Azure Search Plugin is a powerful Dify plugin that provides comprehensive Azure Cognitive Search integration for your AI applications. It supports vector search, text search, hybrid search, and other search methods, enabling your applications to intelligently retrieve and match document content.
✨ Key Features
- 🔍 Vector Search - Intelligent search based on semantic similarity
- 📝 Text Search - Traditional keyword matching search
- 🔄 Hybrid Search - Combines the advantages of vector and text search
- 🎯 Filtered Vector Search - Vector search with conditional filtering
- 📊 Index Management - Get index statistics and status information
- 📝 Development Logging - Complete logging functionality for debugging and monitoring
🚀 Quick Start
1. Install Plugin
- In the Dify admin panel, go to Plugin Management
- Click Add Plugin
- Select Azure Search plugin
- Fill in the necessary configuration information
2. Configure Credentials
On the plugin configuration page, you need to provide the following information:
3. Use Plugin
In your Dify application, select Azure Search Tool and configure the following parameters:
- Search Type: Choose your required search method
- Index Name: Specify the Azure search index to search
- Query Text: Enter search keywords or questions
- Number of Results: Set the maximum number of results to return (1-30)
- Filter Expression: Only required when using filtered vector search
🔧 Detailed Configuration
Search Type Description
1. Vector Search
- Purpose: Intelligent search based on semantic similarity
- Use Case: Scenarios requiring understanding of query intent
- Example: Searching for "comfortable hotel" will find documents described as "luxury accommodation"
2. Text Search
- Purpose: Traditional keyword matching search
- Use Case: Exact matching of specific terms
- Example: Searching for "hotel" will find documents containing the "hotel" keyword
3. Hybrid Search
- Purpose: Combines the advantages of vector and text search
- Use Case: Scenarios requiring balance between semantic understanding and keyword matching
- Example: Considers both semantic similarity and keyword matching
4. Filtered Vector Search
- Purpose: Adds conditional filtering to vector search
- Use Case: Semantic search with specific conditions
- Example: Search for "luxury hotel" with price less than 1000
5. Index Information
- Purpose: Get index statistics and status information
- Use Case: Monitor index health status
- Return Information: Document count, storage size, field list, etc.
Parameter Configuration
📝 Usage Examples
Example 1: Vector Search
Example 2: Filtered Vector Search
Example 3: Get Index Information
📝 Development Logging
This plugin integrates complete logging functionality to help developers debug and monitor plugin runtime status.
Log Levels
- INFO: General information, such as search start and completion status
- WARNING: Warning information, such as parameter validation issues
- ERROR: Error information, such as connection failures and search errors
- DEBUG: Debug information, such as detailed execution steps
Log Content
Logs will record the following information:
- Credential verification process
- Search parameters and configuration
- Search execution status
- Result statistics
- Error details and stack traces
- Performance metrics (execution time)
Viewing Logs
- Remote Debugging: Logs are output to standard output
- Container Logs: In Dify Community Edition, view through container logs
- Development Environment: In local development, logs are displayed in the console
🔍 Troubleshooting
Common Issues
1. Connection Failure
Problem: Unable to connect to Azure search service
Solution:
- Check if the endpoint URL is correct
- Verify if the API key is valid
- Confirm network connection is normal
2. Index Not Found
Problem: The specified index name does not exist
Solution:
- Check index name spelling
- Confirm the index has been created in Azure search service
- Verify index status is normal
3. Vector Search Failure
Problem: Vector search returns an error
Solution:
- Check OpenAI endpoint configuration
- Verify embedding model name
- Confirm the index contains vector fields
4. Insufficient Permissions
Problem: API key has insufficient permissions
Solution:
- Check API key permission settings
- Confirm the key has not expired
- Verify service access permissions
Error Codes
🔒 Privacy Policy
This plugin needs to access the following data:
- Document content in Azure search service
- User input search queries
- Search results and statistics
Data Usage Description:
- All data is processed only in your Azure search service
- Data will not be sent to third-party services (except Azure OpenAI for vector generation)
- Search results are only returned to the requesting user
- User query content will not be stored or cached
📞 Technical Support
If you encounter problems during use, you can get help through the following methods:
📄 License
This project is licensed under the MIT License. See the LICENSE [blocked] file for details.
🙏 Acknowledgments
Thanks to the following open source projects and services:
Version History:
- v0.0.1 - Initial development version with complete Azure search functionality
Changelog:
- 2024-09-16: Released v0.0.1 development version
- ✅ Support for vector search, text search, hybrid search
- ✅ Support for filtered vector search and index management
- ✅ Complete error handling and performance monitoring
- ✅ Multi-language support and detailed documentation