> ## Content Index
> Fetch the complete content index at: https://blog.tsd.digital/llms.txt
> Use this file to discover other available public pages before exploring further.

# Error running scratch indexer in Ucommerce v9+
- URL: https://blog.tsd.digital/error-running-scratch-indexer-in-ucommerce-v9plus/
- Published: 2021-04-05T05:08:43.000Z
- Updated: 2021-04-05T05:08:43.000Z
- Author: Tim Gaunt
- Tags: #Import 2025-04-01 05:39

We ran into an odd issue today where we suddenly couldn't run the scratch indexer in Ucommerce after making a few changes to the product properties. We tracked the issue down to the IndexDefinition which was using non-nullable field declarations e.g. \`\`\` this.Field(p => p\["Date"\], typeof(DateTime)); \`\`\` Resulted in \*String was not recognized as a valid DateTime.\* We also had an incorrect definition for a \`string\` field which was getting declared as a \`bool\` which resulted in \*Input string was not in a correct format.\* The fix was fairly simple -when using nullable properties you need to declare them as so in the IndexDefinition but it was one of those head scratchers for a while! This is how the nullable \`DateTime\` declaration should look: \`\`\` this.Field(p => p\["Date"\], typeof(DateTime?)); \`\`\`