Azure AI Search is an AI-powered information retrieval platform that helps developers build rich search experiences and generative AI apps that combine large language models with enterprise data.
Suitable Application Scenarios
Consolidate varied content types into a single searchable index: Push JSON documents or use an indexer to pull in data automatically.
Attach skillsets to an indexer: Create searchable content from images and unstructured documents using APIs from Azure AI Services, like OCR, entity recognition, key phrase extraction, language detection, text translation, and sentiment analysis.
Implement query logic and user experiences: Similar to commercial web search engines and chat-style apps, using vector, keyword, and hybrid queries.
Using the Azure.Search.Documents Client Library
Prerequisites
Python 3.8 or later: Required to use this package.
Azure subscription and Azure AI Search service: Needed to use this package.
Creating an Instance of the Client
SearchClient: For searching indexed documents.
SearchIndexClient: For managing indexes.
SearchIndexerClient: For crawling data sources and loading search documents into an index.
Authenticating the Client
API key: Can be an easier approach to start with, as it doesn't require pre-existing role assignments.
Client ID and secret: Required for DefaultAzureCredential.
Key Concepts
Indexes: Provide persistent storage of searchable data in the form of JSON documents.
Indexes: Can be thought of as database tables for search data.
Skillsets: Add AI-powered enrichment to data ingestion using APIs from Azure AI Services.
Searching and Indexing Operations
Searching: Can be done using vector queries, keyword queries, and hybrid queries.
Retrieving a Specific Document: Can be done by querying for documents using keywords and filters or by retrieving a specific document from your index if you already know the key.
Async APIs
Asynchronous: Can be used by installing an async transport like aiohttp.
Async APIs: Include a complete async API for searching and indexing.
Troubleshooting and Logging
Exceptions: Raised by the Azure AI Search client and defined in Azure Core.
Logging: Can be enabled on a client or for a single operation using the logging_enable keyword argument.
Next Steps
Azure.Search.Documents: More information and samples can be found on GitHub.
Azure AI Search Service: Contributing to the library is welcome.
Contribution: See the CONTRIBUTING.md for details on building, testing, and contributing to this library.