In most situations where content to be indexed contains HTML tags, remove the tags before indexing. If you do not, HTML markup is returned in search results.
Example of removing HTML tags from a specific `
RemoveHtmlTagsWhenIndexing` attribute found in the `
You also can customize the `
Client` conventions to remove HTML tags from all string fields:
To remove HTML tags from a specific field when indexing a specific type, use the `
ForType` and `
StripHtml` method also performs HTML decoding. The goals are to index the text that users see when viewing the page, and to be able to find that content.
For example, the Swedish text _Jag gillar äpplen_ is stored as _Jag gillar äpplen_, and is decoded back when indexing. This means that a user can find the text using a query like _äpplen_.