How to choose a specific CosmosDB record for the Azure AI Search Indexer Debugger Session?

Tyler Suard 125 Reputation points
2025-02-19T22:24:54.4033333+00:00

Hello. The tutorials online all talk about how to run a debugger session when using blob storage as a data source. None of them talk about how to run a debugger session when using CosmosDB as a data source. I am unable to debug my session currently, because only some records are failing, and I cannot select any specific records using the Debugger settings. When I try to debug one of the specific documents that are failing, I get this option:User's image

What is "Value?" What is "Partition key?" Where can I find these once I know what record needs to be debugged in CosmosDB?

As a side note, PLEASE make setting up your indexers simpler.

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,195 questions
0 comments No comments
{count} votes

Accepted answer
  1. Laxman Reddy Revuri 2,545 Reputation points Microsoft Vendor
    2025-02-21T09:47:10.83+00:00

    Hi @Tyler Suard
    In Cosmos DB, the Value refers to the document’s unique id, which distinguishes it within its logical partition.

    The Partition Key is defined when creating the Cosmos DB container and determines how documents are distributed across partitions. Each document has a specific value for this key, ensuring efficient grouping and retrieval.

    For example, if your partition key path is /userId, then the partition key value for a document might be "user123". This value must be provided when debugging a specific document.

    Navigate to your Cosmos DB account in Azure Portal.

    Open the Data Explorer and locate your container.

    Browse through the documents to find the one you want to debug.

    The id field (this will be your Value).

    The value of the property corresponding to your partition key path (this will be your Partition Key).

    Check the partition key path defined for your container in its settings (e.g., /userId, /category, etc.).

    Use this path to identify the corresponding property in your document.

    Value: "12345" (the id field).

    Partition Key: "user123" (the value of /userId).

    Select "Debug specific document" in the Debugger settings.

    references:
    https://learn.microsoft.com/en-us/azure/search/cognitive-search-debug-session?utm_source=chatgpt.com
    Please accept as "Yes" if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.