Java samples for Azure Cognitive Search

Learn about the Java code samples that demonstrate the functionality and workflow of an Azure Cognitive Search solution. These samples use the Azure Cognitive 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/azure-search-documents_11.1.3/sdk/search/azure-search-documents/src/test
Source code github.com/Azure/azure-sdk-for-java/tree/azure-search-documents_11.1.3/sdk/search/azure-search-documents/src

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/master/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, required for indexer-based indexing of supported Azure data sources.
Skillset creation Demonstrates how to create skillsets that are attached indexers, and that 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.

Doc samples

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

Samples Article
quickstart Source code for Quickstart: Create a search index in Java and REST.

Tip

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