2

I’m trying to index the Sitecore content with the following settings of the Sitecore search walkthrough https://doc.sitecore.com/search/en/developers/search-developer-guide/walkthrough–configuring-an-api-crawler-source.html

  • I use 1 Request Trigger that points to Edge (I use a graphql query) It returns a list of children names of a given path
  • I use a Request Extractor, I think this will use the result of the previous trigger to generate more results for each child, this extractor returns a URL, header, and body that contains a graphql dynamic query of each child
  • I use a JSONPath Document Extractor to get the attributes from the Request Extractor Results (correct me if I’m wrong). In this, I set some taggers to get the fields of the JSON but I’m getting none of them.

Is there a way to check the results of the trigger and extractors? The CEC only shows me the following message:

Validation Error: The number of indexed documents should be bigger than 0. Run Status Failed.

Am I doing something wrong?

Thanks in advance

1 Answer 1

1

I had the same error "Validation Error: The number of indexed documents should be bigger than 0" and it turned out that it was caused by a missing id attribute in my document extractor.

As far as I know, currently there is no way to debug triggers and extractors, but there are plans to add it to the Search platform.

In the meantime I'm using the following workaround for debugging:

  • Create a JS document extractor
  • Return a static object from it
  • Populate description or any other field with the variable I want to debug, similar to this:
function extract(request, response) {
    return [{
        description: response.body, //replace with the variable you want to see
        name: "Test document",
        type: "website",
        url: "https://www.sitecore.com",
        id: "12345"
    }];
}
  • Once the source is reindexed, I can see the test values in the Content Collection section: RFK document details

I know this is not an easy solution, and hopefully Search will have a more straightforward tool for debugging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.