Edit

Share via


Java samples for Azure AI Search

Learn about the Java code samples that demonstrate the functionality and workflow of an 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 https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/search/azure-search-documents/src/test
Source code https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/search/azure-search-documents
Change log https://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.

Samples Description
Search index creation Demonstrates how to create search indexes.
Synonym creation Demonstrates how to create synonym maps.
Search indexer creation Demonstrates how to create indexers.
Search indexer data source creation Demonstrates how to create indexer data sources, which are required for indexer-based indexing of supported Azure data sources.
Skillset creation Demonstrates how to create skillsets that are attached to indexers and perform AI-based enrichment during indexing.
Load documents Demonstrates how to upload or merge documents into an index in a data import operation.
Query syntax Demonstrates how to set up a basic query.
Vector search Demonstrates how to set up a vector field and then generate a vector query.

Doc samples

Code samples from the Azure AI Search team are located in Azure-Samples/azure-search-java-samples on GitHub.

Samples Article
quickstart Source code for the Java portion of Quickstart: Full-text search.

Tip

Try the Samples browser to search for Microsoft code samples in GitHub, filtered by product, service, and language.