Jumping into Sitecore Search and swiftly implementing features was both seamless and enjoyable. However, my progress hit a few unexpected hurdles that I hope to help you anticipate or resolve.
Issue #1: Limit of total fields [1000] has been exceeded
This error occurred during a reindex operation. It seemed like a simple fix, just go to attributes and see if I can remove anything I didn’t need in the index. Let’s look at what I found.
Wait, I only have 138 attributes, where are the other 862 fields coming from?
Composite attributes encompass multiple nested attributes
After thorough investigation and support from Sitecore, we discovered that composite attributes on our entities were the root cause. In our setup, we had seven entities, each of which generated several composite attributes upon creation. Each composite attribute, in turn, contained multiple nested attributes. The catch was that the attribute count only recognized a composite attribute as a single attribute, even though it could contain dozens of nested attributes.
The key issue for us was the composite attribute "rfk_stats", which, by default, included over 45 nested attributes. With numerous custom entities, this quickly consumed a significant portion of our available fields. To resolve the issue, we identified the attributes we didn’t need within rfk_stats and removed them across all our entities, freeing up valuable field space.
Cleaned up rfk_stats:
Issue #2: Validating an extractor always returned N/A for properties
When your Sitecore Search solution grows, and you end up with multiple entities, you will eventually also end up with multiple taggers within a single document extractor. In my case, I had to index some pages and based on the content of the page, I would index the page as entity type #1 or entity type #2.
The issue was that even though indexing would properly capture the values, every time I wanted to validate my taggers in the document extractor when I made changes, I would always see N/A for all my properties.
What’s going on?
Return an empty array, not null
The problem with my taggers was that when verifying whether a tagger applied to a specific page, I returned null if it didn’t match. I later realized that since the taggers run together, returning null disrupted the index object, leading to N/A values during validation. To fix this, instead of returning null when a document shouldn’t be indexed, I returned an empty array []. This change resolved the issue, and my validation UI now works correctly.
Working validation:
Wrapping up
In conclusion, while Sitecore Search provides a seamless and enjoyable implementation experience, larger and more complex solutions can introduce unexpected challenges. The field limit issue highlights the importance of understanding how composite attributes impact total field counts, while the extractor validation issue underscores the need for careful handling of null values in taggers. By proactively addressing these gotchas—pruning unnecessary attributes and ensuring proper data handling—you can avoid frustrating roadblocks and keep your Sitecore Search implementation running smoothly. Hopefully, these insights will help you navigate similar issues with confidence and efficiency.