How do I set the field names inserted into the index to something different than my property names?


How do tell the EpFind.Api to set the field names for certain properties to have the $$Type on them with an ATTRIBUTE?

I had to turn off this feature for most of my objects properties, but I need the fields below to APPEAR like this and currently they are now missing the $$string.

What is the attribute that will let me SET JUST these properties to have these names?

Mar 22, 2022 23:32

Have a look at the bottom code sample in this excellent blog post:

Something like this...??

SearchClient.Instance.Conventions.ForType<XhtmlString>().Field(x => x.SearchSection).Modify(x => x.PropertyName = "SearchSection" + TypeSuffix.String);
Mar 23, 2022 11:26

Yeah that does it! I tried that and it works!

Also I tried [JsonProperty(name$$string)] and it respects that as well.

So I am set!

Mar 23, 2022 12:11
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.