XdbModelException: Field could not be found in the model or the field is not enabled for indexing/searching

I was creating a custom segmentation rule predicate for Sitecore 9, and when I tried to create a segment using the rule, I got an error inside Sitecore’s List Manager:

Field could not be found in the model or the field is not enabled for indexing/searching

That’s kind of annoying. What caused this? Well, it was a long, painful odyssey finding out.

TL;DR – If you’re using an extension method to get a facet for your CreateContactSearchQuery method – like Sitecore do – it’s method name must match the Facet Key name. 

No, I’m not kidding.

Continue reading “XdbModelException: Field could not be found in the model or the field is not enabled for indexing/searching”

Advertisements
XdbModelException: Field could not be found in the model or the field is not enabled for indexing/searching