Umbraco Learn: How to search inside a data type for embedded content?

I am using the Embedded Content data type (http://farmcode.org/post/2011/01/20/Presenting-a-new-Umbraco-data-type-Embedded-Content.aspx) and I may seem like you found a way to properly use Umbraco Examine to search inside the Embedded Content data type.

The returned search result object represents the Embedded Content type as a string with all the fields marked together, and not in the original xml format.

Is there a way around this so that I can search for individual fields inside the inline content type?

+4
source share
1 answer

This question was answered in the Umbraco forum (as indicated in the comment above) to suggest:

When indexing content stored in XML or another custom format, you need to pre-process the data before inserting it into the Lucene index.

You can do this by connecting to the GatheringNodeData event in Examine. Then you process the XML and save the data in a new field. You can do this with all types of custom data types.

Detailed information can be found here:

http://our.umbraco.org/forum/developers/extending-umbraco/31632-Umbraco-Examine-how-to-search-inside-Embedded-Content-data-type?p=0#comment117290

(added this answer to help find and prevent rot)

0
source

Source: https://habr.com/ru/post/1411851/


All Articles