### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-vector Change the current directory to the vector search quickstart folder within the cloned repository. This is where you'll find the application settings and code examples. ```bash cd azure-search-dotnet-samples/quickstart-vector-search ``` -------------------------------- ### Navigate to Quickstart Folder and Open in VS Code Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-vector Navigate to the vector search quickstart folder and open it in Visual Studio Code for further setup. ```bash cd azure-search-python-samples/Quickstart-Vector-Search code . ``` -------------------------------- ### Full-Text Search Quickstart Source: https://learn.microsoft.com/en-us/azure/search/samples-java Guides through creating, loading, and querying a search index using sample data for full-text search capabilities. ```Java quickstart-keyword-search ``` -------------------------------- ### Agentic Retrieval Quickstart Application Output Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-agentic-retrieval This is an example of the expected output when running the Agentic Retrieval Quickstart application. It shows the creation of resources, document upload, query execution, and response details. ```text Index 'earth-at-night' created or updated successfully. Documents uploaded to index 'earth-at-night' successfully. Knowledge source 'earth-knowledge-source' created or updated successfully. Knowledge base 'earth-knowledge-base' created or updated successfully. Running the query...Why do suburban belts display larger December brightening than urban cores even though absolute light levels are higher downtown? Why is the Phoenix nighttime street grid is so sharply visible from space, whereas large stretches of the interstate between midwestern cities remain comparatively dim? Response: December percent brightening is larger in suburban belts because many houses add seasonal residential/holiday lighting on yards and roofs, so a relatively dark suburban baseline can increase by 20-50% when those lights turn on, while dense urban cores already have high continuous lighting so the same added lights make a smaller percentage change [ref_id:2][ref_id:5][ref_id:8]. Phoenix's street grid appears sharply from space because the metropolitan layout is a regular, continuous north-south/east-west street and block grid with a major diagonal artery (Grand Avenue) and concentrated, continuous arterial and commercial lighting along intersections and corridors [ref_id:3][ref_id:0][ref_id:1]. ... Activity: Activity Type: KnowledgeBaseModelQueryPlanningActivityRecord { "id" : 0, "elapsedMs" : 5229, "type" : "modelQueryPlanning", "inputTokens" : 1489, "outputTokens" : 383 } Activity Type: KnowledgeBaseSearchIndexActivityRecord { "id" : 1, "elapsedMs" : 2670, "knowledgeSourceName" : "earth-knowledge-source", "queryTime" : "2026-02-24T15:28:36.776Z", "count" : 3, "type" : "searchIndex", "searchIndexArguments" : { "search" : "December brightening suburban belts vs urban cores light pollution causes seasonal variation reasons \"December brightening\"", "sourceDataFields" : [ { "name" : "page_chunk" }, { "name" : "id" }, { "name" : "page_number" } ], "searchFields" : [ ], "semanticConfigurationName" : "semantic_config" } } ... // Trimmed for brevity References: Reference Type: KnowledgeBaseSearchIndexReference { "id" : "0", "activitySource" : 2, "rerankerScore" : 2.7486389, "type" : "searchIndex", "docKey" : "earth_at_night_508_page_105_verbalized" } ... // Trimmed for brevity Continue the conversation with this query: How do I find lava at night? Response: ... // Trimmed for brevity Activity: ... // Trimmed for brevity References: ... // Trimmed for brevity Knowledge base 'earth-knowledge-base' deleted successfully. Knowledge source 'earth-knowledge-source' deleted successfully. Index 'earth-at-night' deleted successfully. ``` -------------------------------- ### Restore Project Dependencies Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Install the necessary project dependencies for the Azure AI Search quickstart. Ensure this command completes without errors before proceeding. ```bash dotnet restore ``` -------------------------------- ### Install Java Dependencies with Maven Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Clean the project and download all necessary dependencies for the Azure AI Search Java quickstart using Maven. ```bash mvn clean dependency:copy-dependencies ``` -------------------------------- ### Download Sample Code Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-powershell Download the source code from GitHub to get started quickly. ```text Download the source code on GitHub. ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-semantic Change the current directory to the semantic ranking quickstart folder. ```bash cd azure-search-javascript-samples/quickstart-semantic-ranking-js ``` -------------------------------- ### Clone Azure AI Search Java Samples Repository Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Clone the sample repository to access quickstart code and examples for Azure AI Search with Java. ```bash git clone https://github.com/Azure-Samples/azure-search-java-samples ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-semantic Change the current directory to the semantic ranking quickstart folder within the cloned repository. ```bash cd azure-search-dotnet-samples/quickstart-semantic-ranking ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-agentic-retrieval Navigate to the agentic retrieval quickstart folder and open it in Visual Studio Code. ```bash cd azure-search-rest-samples/Quickstart-agentic-retrieval code . ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Change the current directory to the keyword search quickstart folder within the cloned repository. ```bash cd azure-search-javascript-samples/quickstart-keyword-search ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-agentic-retrieval Change the current directory to the agentic retrieval quickstart folder. ```Bash cd azure-search-dotnet-samples/quickstart-agentic-retrieval ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-vector Change the current directory to the vector search quickstart folder within the cloned repository. ```bash cd azure-search-javascript-samples/quickstart-vector-js ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Change the current directory to the quickstart folder within the cloned Azure AI Search PowerShell samples repository. This is where the quickstart script is located. ```powershell cd azure-search-powershell-samples/Quickstart ``` -------------------------------- ### Navigate to Semantic Ranking Quickstart Directory Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-semantic Change the current directory to the TypeScript quickstart for semantic ranking. ```bash cd azure-search-javascript-samples/quickstart-semantic-ranking-ts ``` -------------------------------- ### Navigate to Quickstart Folder and Open in VS Code Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Navigate to the specific quickstart directory within the cloned repository and open it in Visual Studio Code. ```bash cd azure-search-python-samples/Quickstart-Keyword-Search code . ``` -------------------------------- ### Get SharePoint Online Indexer Status Source: https://learn.microsoft.com/en-us/azure/search/search-how-to-index-sharepoint-online Use this GET request to retrieve the status of a SharePoint Online indexer. This is crucial for obtaining the device login code during the initial setup. ```HTTP GET https://[service name].search.windows.net/indexers/sharepoint-indexer/status?api-version=2026-05-01-preview Content-Type: application/json api-key: [admin key] ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Change the current directory to the quickstart-keyword-search folder within the cloned repository. ```bash cd azure-search-java-samples/quickstart-keyword-search ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Change the directory to the specific quickstart folder within the cloned repository. This prepares your environment for the next steps. ```bash cd azure-search-dotnet-samples/quickstart-keyword-search/AzureSearchQuickstart ``` -------------------------------- ### Example Shared Private Link Status Response Source: https://learn.microsoft.com/en-us/azure/search/search-indexer-howto-access-private This JSON shows an example response from the Shared Private Link Resources - Get API. Verify that 'properties.status' is 'Approved' and 'properties.provisioningState' is 'Succeeded' for a functional connection. ```json { "name": "blob-pe", "properties": { "privateLinkResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contoso-storage", "groupId": "blob", "requestMessage": "please approve", "status": "Approved", "resourceRegion": null, "provisioningState": "Succeeded" } } ``` -------------------------------- ### Get agent definition (2025-05-01-preview) Source: https://learn.microsoft.com/en-us/azure/search/agentic-retrieval-how-to-migrate This example shows how to retrieve the definition of a knowledge agent using the Knowledge Agents - Get REST API with the 2025-05-01-preview API version. This is useful for migrating from agents to knowledge bases. ```APIDOC ## GET /agents/{{agent-name}} ### Description Retrieves the definition of a knowledge agent. ### Method GET ### Endpoint https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview ### Headers - **api-key**: {{api-key}} ### Response #### Success Response (200 OK) Returns the agent's definition, including `indexName`, `defaultRerankerThreshold`, and `defaultIncludeReferenceSourceData` which are needed for migration. ### Response Example ```json { "@odata.etag": "0x1234568AE7E58A1", "name": "my-knowledge-agent", "description": "My description of the agent", "targetIndexes": [ { "indexName": "my-index", "defaultRerankerThreshold": 2.5, "defaultIncludeReferenceSourceData": true, "defaultMaxDocsForReranker": 100 } ] } ``` ``` -------------------------------- ### Get Distinct Value Counts for Facetable Fields Source: https://learn.microsoft.com/en-us/azure/search/search-faceted-navigation-examples Formulate a query to get distinct value counts for facetable fields. Set 'top' to zero to retrieve only counts without search results. This example targets 'Category' and 'Address/StateProvince' fields. ```HTTP POST https://{{service_name}}.search.windows.net/indexes/hotels-sample/docs/search?api-version={{api_version}} { "search": "*", "count": true, "top": 0, "facets": [ "Category", "Address/StateProvince"" ] } ``` -------------------------------- ### Navigate to Quickstart Folder and Open in VS Code Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-vector Navigate to the quickstart-vectors folder within the cloned repository and open it in Visual Studio Code. ```bash cd azure-search-rest-samples/Quickstart-vectors code . ``` -------------------------------- ### Example Output: Get Index Settings Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-semantic This output shows the index name, number of fields, field details, and existing semantic configurations retrieved by getIndexSettings.js. ```text Getting semantic ranking index settings... Index name: hotels-sample Number of fields: 23 Field: HotelId, Type: Edm.String, Searchable: true Field: HotelName, Type: Edm.String, Searchable: true Field: Description, Type: Edm.String, Searchable: true Field: Description_fr, Type: Edm.String, Searchable: true Field: Category, Type: Edm.String, Searchable: true Field: Tags, Type: Collection(Edm.String), Searchable: true // Trimmed for brevity Semantic ranking configurations: 1 Configuration name: hotels-sample-semantic-configuration Title field: undefined ``` -------------------------------- ### Navigate to Sample Directory Source: https://learn.microsoft.com/en-us/azure/search/tutorial-csharp-overview Change the current directory to the cloned azure-search-static-web-app repository. ```Bash cd azure-search-static-web-app ``` -------------------------------- ### Clone Azure Search .NET Samples Repository Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-text Clone the sample repository to access the quickstart code. This is the first step in setting up your development environment. ```bash git clone https://github.com/Azure-Samples/azure-search-dotnet-samples ``` -------------------------------- ### Indexes - Get (Data Plane Preview) Source: https://learn.microsoft.com/en-us/azure/search/search-api-preview Retrieves information about an index using the data plane REST API. This example uses the 2026-05-01-preview API version. ```APIDOC ## GET /indexes/("{indexName}")?api-version=2026-05-01-preview ### Description Retrieves information about a specific index. ### Method GET ### Endpoint `{endpoint}/indexes('{indexName}')` ### Parameters #### Query Parameters - **api-version** (string) - Required - Specifies the API version to use for the request. Use `2026-05-01-preview` for this preview version. ``` -------------------------------- ### Get Signed-in User ID with Azure CLI Source: https://learn.microsoft.com/en-us/azure/search/keyless-connections Retrieve your personal user object ID (GUID) using the Azure CLI. This ID is required for role assignments. ```bash az ad signed-in-user show \ --query id -o tsv ``` -------------------------------- ### Navigate to Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-agentic-retrieval Change the current directory to the TypeScript quickstart folder within the cloned repository. This is where you will configure your environment. ```bash cd azure-search-javascript-samples/quickstart-agentic-retrieval-ts ``` -------------------------------- ### Get Current User Object ID with Azure PowerShell Source: https://learn.microsoft.com/en-us/azure/search/keyless-connections Retrieve your personal user object ID (GUID) using Azure PowerShell. This ID is required for role assignments. ```powershell (Get-AzContext).Account.ExtendedProperties.HomeAccountId.Split('.')[0] ``` -------------------------------- ### Service Runtime Statistics JSON Example Source: https://learn.microsoft.com/en-us/azure/search/search-indexer-high-density-serverless-overview This JSON shows the indexersRuntime section of the response from the Get Service Statistics API, indicating a service whose six-hour daily quota hasn't been used. ```JSON "indexersRuntime": { "usedSeconds": 0, "remainingSeconds": 21600, "beginningTime": "2026-05-16T00:00:00.000Z", "endingTime": "2026-05-17T00:00:00.000Z" } ``` -------------------------------- ### Navigate to Semantic Ranking Quickstart Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-semantic Change the current directory to the semantic ranking quickstart folder and open it in Visual Studio Code. ```bash cd azure-search-python-samples/Quickstart-Semantic-Ranking code . ``` -------------------------------- ### Indexer Runtime Statistics JSON Example Source: https://learn.microsoft.com/en-us/azure/search/search-indexer-high-density-serverless-overview This JSON shows the runtime section of the response from the Get Indexer Status API, indicating an indexer on a service whose six-hour daily quota hasn't been used. ```JSON "runtime": { "usedSeconds": 0, "remainingSeconds": 21600, "beginningTime": "2026-05-16T00:00:00.000Z", "endingTime": "2026-05-17T00:00:00.000Z" } ``` -------------------------------- ### Compile and Run Agentic Retrieval Quickstart (Windows) Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-agentic-retrieval Use these commands to compile and run the Java application on Windows. Ensure you have the necessary dependencies in the target/dependency directory. ```bash javac AgenticRetrievalQuickstart.java -cp ".;target\dependency\*" java -cp ".;target\dependency\*" AgenticRetrievalQuickstart ``` -------------------------------- ### Create File Knowledge Source with Python Source: https://learn.microsoft.com/en-us/azure/search/agentic-knowledge-source-how-to-file Utilize the Azure SDK for Python to programmatically create or update a file knowledge source. This example configures Azure OpenAI for generating embeddings. Ensure the necessary packages are installed. ```python from azure.core.credentials import AzureKeyCredential from azure.search.documents.indexes import SearchIndexClient from azure.search.documents.indexes.models import ( AzureOpenAIVectorizerParameters, FileKnowledgeSource, FileKnowledgeSourceParameters, ) from azure.search.documents.knowledgebases.models import ( KnowledgeSourceAzureOpenAIVectorizer, KnowledgeSourceIngestionParameters, ) index_client = SearchIndexClient(endpoint="search_url", credential=AzureKeyCredential("api_key")) embedding_params = AzureOpenAIVectorizerParameters( resource_url="aoai_endpoint", deployment_name="aoai_embedding_deployment", model_name="aoai_embedding_model", ) ingestion_params = KnowledgeSourceIngestionParameters( content_extraction_mode="minimal", embedding_model=KnowledgeSourceAzureOpenAIVectorizer( azure_open_ai_parameters=embedding_params ), ) knowledge_source = FileKnowledgeSource( name="my-file-ks", description="This knowledge source uses directly uploaded product manuals.", file_parameters=FileKnowledgeSourceParameters(ingestion_parameters=ingestion_params), ) index_client.create_or_update_knowledge_source(knowledge_source=knowledge_source) print(f"Knowledge source '{knowledge_source.name}' created or updated successfully.") ``` -------------------------------- ### List Existing Indexes in Azure AI Search Source: https://learn.microsoft.com/en-us/azure/search/search-how-to-integrated-vectorization Verify your Azure AI Search service connection by sending a GET request to list existing indexes. Ensure the HTTP status code is 200 OK to confirm successful setup. ```http ### List existing indexes by name GET {{baseUrl}}/indexes?api-version=2026-04-01 HTTP/1.1 Content-Type: application/json Authorization: Bearer {{token}} ``` -------------------------------- ### Initial Paged Query with Count Source: https://learn.microsoft.com/en-us/azure/search/search-pagination-page-layout This HTTP POST request demonstrates how to retrieve the first set of 15 search results for 'room with a view' and also get the total count of matching documents. The `skip` parameter is set to 0 to start from the beginning. ```http POST https://contoso-search-eastus.search.windows.net/indexes/hotels-sample/docs/search?api-version=2026-04-01 { "search": "room with a view", "count": true, "top": 15, "skip": 0 } ``` -------------------------------- ### Compile and Run Agentic Retrieval Quickstart (macOS/Linux) Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-agentic-retrieval Use these commands to compile and run the Java application on macOS or Linux. Ensure you have the necessary dependencies in the target/dependency directory. ```bash javac AgenticRetrievalQuickstart.java -cp ".:target/dependency/*" java -cp ".:target/dependency/*" AgenticRetrievalQuickstart ``` -------------------------------- ### Full-Text Search Query using REST API (POST) Source: https://learn.microsoft.com/en-us/azure/search/search-query-create This example demonstrates a full-text search query using the REST API with an HTTP POST request. It's suitable for queries with potentially large filter expressions that exceed GET request URL length limits. ```HTTP POST https://[service name].search.windows.net/indexes/hotels-sample/docs/search?api-version=2026-04-01 { "search": "NY +view", "queryType": "simple", "searchMode": "all", "searchFields": "HotelName, Description, Address/City, Address/StateProvince, Tags", "select": "HotelName, Description, Address/City, Address/StateProvince, Tags", "count": true } ``` -------------------------------- ### Navigate to Vector Search Quickstart Folder Source: https://learn.microsoft.com/en-us/azure/search/search-get-started-vector Change directory into the vector search quickstart folder within the cloned repository. ```bash cd azure-search-java-samples/quickstart-vector-search ``` -------------------------------- ### Get Azure AI Search Access Token using Azure CLI Source: https://learn.microsoft.com/en-us/azure/search/search-how-to-integrated-vectorization Use this Azure CLI command to retrieve an access token for your Azure AI Search service. This token is required for authentication in REST requests. Ensure you have completed the 'Connect without keys' quickstart. ```bash az account get-access-token --scope https://search.azure.com/.default --query accessToken --output tsv ```