0

Implements rules for segmentation lists. I have a requirement that forces me to use the contains method on a string. Unfortunately, this feature is not supported. Has anyone managed to make an equivalent of this method?

1

The xConnect search supports only a specific subset of queryable conditions, and it is unlikely that a workaround exists.

Interestingly, the supported search method documentation for 10.0 says that partial text search is not supported when using Azure Search provider, which implies that it is supported with Solr, but the code sample doesn't make any sense:

client.Contacts.Where(c => c.TextMatch("Mar"))

(you can ask sitecore support whether it is a typo or not btw)

And you could try solving this in a different way, for example by evaluating the facet value when it is saved using calculated facets. Using calculated facets you can check if a facet property contains a predefined string (using normal .Contains() method) and save the result to a new bool facet property, and check that property in the segment instead.

0

You can achieve this by using string data type for the Comparison variable instead of StringOperationType.

enter image description here

and in Sitecore, for the Comparison variable, you can create a custom multilist item folder at path /sitecore/system/Settings/Rules/Definitions

enter image description here

and then refer this to rule definition item:

enter image description here

1
  • The problem is that the contains function is not supported by indexes and an error occurs when trying to use it. That's why I asked this question. – Jan Nowak Feb 22 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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