Java samples for Foundry IQ (Azure AI Search)

Note

Foundry IQ (Azure AI Search) provides direct indexing and query APIs alongside higher-level knowledge source and knowledge base APIs for managed retrieval. Use the Azure portal, REST APIs, or Azure SDKs to configure these capabilities, or connect agents to knowledge bases in the Microsoft Foundry portal.

Learn about Java code samples that demonstrate the functionality and workflow of a Foundry IQ (Azure AI Search) solution. These samples use the Azure AI Search client library for the Azure SDK for Java, which you can explore through the following links.

Target Link
Package download search.maven.org/artifact/com.azure/azure-search-documents
API reference com.azure.search.documents
API test cases github.com/Azure/azure-sdk-for-java/tree/main/sdk/search/azure-search-documents/src/test
Source code github.com/Azure/azure-sdk-for-java/tree/main/sdk/search/azure-search-documents
Change log github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/CHANGELOG.md

SDK samples

Code samples from the Azure SDK development team demonstrate API usage. You can find these samples in Azure/azure-sdk-for-java/tree/main/sdk/search/azure-search-documents/src/samples on GitHub.

Sample Description
Index creation Create an index.
Indexer creation Create an indexer.
Data source creation Create a data source connection, which is required for indexer-based indexing of supported data sources.
Skillset creation Create a skillset that's attached to an indexer and perform AI-based enrichment during indexing.
Synonym creation Create a synonym map.
Load documents Upload or merge documents into an index in a data import operation.
Query syntax Send a basic query.
Vector search Create a vector field and send a vector query.

Doc samples

Code samples from the Foundry IQ team demonstrate features and workflows. The following samples are referenced in tutorials, quickstarts, and how-to articles that explain the code in detail. You can find these samples in Azure-Samples/azure-search-java-samples on GitHub.

Sample Article Description
quickstart-agentic-retrieval Quickstart: Agentic retrieval Integrate semantic ranking with LLM-powered query planning and answer generation.
quickstart-keyword-search Quickstart: Full-text search Create, load, and query a search index using sample data.
quickstart-semantic-ranking Quickstart: Semantic ranking Add semantic ranking to an index schema and run semantic queries.
quickstart-vector-search Quickstart: Vector search Index and query vector content.

Tip

Use the samples browser to search for Microsoft code samples on GitHub. You can filter your search by product, service, and language.