Sitecore 7 Lucene: strip HTML from computed field -
I am going to paste all the "paragraph" hair nodes together in the "Articles" node in a math field. An article can be found to get it & amp;
To achieve this, I did not have the & lt; Fields hint = "raw: AddComputedIndexField" & gt; node:
& lt; Field field name = "paragraphs" type the storage = "yes" type index = "tokenized" & gt; MyWebsite.ComputedFields.Paragraphs, MyWebsite & lt; / Field & gt; In this calculated field, I insert paragraph HTML HTML bodies together. I was assuming that the sitcom will leave HTML for me (like this is for rich text fields), but it does not.
For the "Rich Text" field, this is probably a rich textfield reader that creates strips of HTML tags. This is confirmed by reducing the code. RichTextFieldReader is configured in the FieldReaders section. Trying to add a raw: AddFieldReaderByFieldName section below, does not seem to be anything.
The entire section looks like this, but does not work in this setup:
& lt; FieldReaders Type = "Sitecore.ContentSearch.FieldReaders.FieldReaderMap, Sitecore.ContentSearch" & gt; & Lt; MapFieldByTypeName sign = "raw: AddFieldReaderByFieldTypeName" & gt; ... the default content here ... & lt; / mapFieldByTypeName & gt; & Lt; MapFieldByFieldName hint = "raw: AddFieldReaderByFieldName" & gt; & Lt; FieldReader FieldName = "Paragraph" field RADIED = "Sitecore.ContentSearch.FieldReaders.RichTextFieldReader, Sitecore.ContentSearch" & gt; & Lt; / FieldReader & gt; & Lt; / mapFieldByFieldName & gt; & Lt; / FieldReaders & gt; Any other clues about how to get it (do not use HTML compliance pack, by config)
", string.Empty)); Use the or use method Sitecore.StringUtil.RemoveTags (text)
Comments
Post a Comment