SaaS CMS has officially launched! Learn more now.

How to be able to apply fuzzy search for custom property in Optimizely Graph


Hi guys,

I am using some custom properties in Optimizely Graph model by adding properties within IContentApiModelProperty. I want to apply fuzzy search for custom property but cannot find the way to do it.

As I read in the document then a normal property in content type will be able to apply fuzzy search if marked as Searchable. But I do not find the way to mark Searchable for custom property.

Do you have any ideas about it?

Edited, May 10, 2024 3:48

Hi Binh,

Can you expand on what you mean by " adding properties within IContentApiModelProperty" ? How are you adding these properties?

You can mark any property on the content type as searchable.

Note, Optimizely Graph supports fuzzy search for string fields and you enable it within the query for the supported operators. Refer to developer documentation for usage and examples

May 13, 2024 23:30

Hi Ronil,

Thanks for your feedback. My properties are calculated properties. So I do not want to add them to content type as normal properties. I added custom properties to Graph model as same as this link

May 14, 2024 3:34

I'm not sure how to mark custom (calculated) properties but string properties are marked searchable by default. Have you tried a fuzzy search on your custom property?

A possible workaround could be, assuming you are using Optimizely Graph in a PaaS setup, to add them as normal properties so they are searchable but hidden from edit view. 


public virtual string CalculatedProperty { get; set; }

Then you can still use your IContentApiModelProperty implementation to override the normal property with your calculated logic (by using the same property name).

May 14, 2024 6:40

HI Ronil,

Yes, I see about the workaround. But it still does not help in case such as I want to use extended properties for searching all IContent data, not for a specific content type. So this workaround just works if I do search for a specific content type, not for general search.

I also saw in the code base and see that not all string properties are marked searchable by default. The properties are marked searchable if they have annotation [Searchable] or the system properties such as Name

May 15, 2024 3:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.