4
votes

I'm using the Embedded Content data type (http://farmcode.org/post/2011/01/20/Presenting-a-new-Umbraco-data-type-Embedded-Content.aspx) and I can't seem to find a way to properly use Umbraco Examine to search inside the Embedded Content data type.

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

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

1

1 Answers

0
votes

This question was answered on the Umbraco forum (as metnoied in the comment above), to surmise:

When indexing content that is stored in a XML or other custom format, you need to pre-process the data before you insert it into the Lucene index.

You can do this by hooking into the GatheringNodeData event in Examine. You then process the XML and save the data into a new field. You can do this with all sorts of custom data types.

Full details 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 aid findability and prevent link rot)