Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So I'm not too familiar how search works in Umbraco, but I've a website that is structured like this:
- Content page 1
- Content page 2
- Shared Content
- Content block 1
- Content block 2, etc.
So the pages are actually built out from content blocks, by selecting the content blocks with a multinode tree picker. I'm not sure how examine will deal with this, because the content pages actually only contain id's of the content blocks, and I want the search to index the content page based on the content blocks in the multinode tree picker. Does anyone have a clue how to configure the search for this?
You need to implemeent gatheringnode data event then for the page get the node ids set my mutli tree node picker then get the content for those nodes and inject it into the content see http://bit.ly/1bmmpQC for more information on how to implement gathering node data. Else the other option is to use http://our.umbraco.org/projects/website-utilities/full-text-search this works a bit like a crawler.
Hi Ismail, I've setup full text search but it doesn't seem it crawls the nodes from the multinode tree picker.. do I have to implement the gatheringnode data on top of it?
The full text search should crawl the rendered page so you don't need gatheringnode data. The rendered page should contain the multitree node picker content as you render the content out on the rendered page?
I have not used this package myself but looking at the docs that's how it works. Can you double check any config files etc for the package and if nothing evident then i would ask on the package forums.
Using Examine, I would like to replace the comma-separated treepicker contentids with the path names of the content nodes (e.g. NorthAmerica/UnitedStates/Texas), but I do not know how to access the ContentService to look these up. My custom indexer that derives from BaseUmbracoIndexer does not have a reference (BaseUmbracoIndexer.DataService.ContentService is not the same as the one provided through the UmbracoContext).
In the past I have just done:
void TefExamineEvents_GatheringNodeData(object sender, IndexingNodeDataEventArgs e)
if (e.IndexType == IndexTypes.Content && e.Fields["nodeTypeAlias"].ToLower()=="product")
var node = ApplicationContext.Current.Services.ContentService.GetById(e.NodeId);
LogHelper.Info(typeof(ExamineEvents), () => "in gathering node data for " +
So you could in a similar way use GetById but pass in the node id from the multi node tree picker field.
Thank you - exactly what I was looking for! I didn't realize ApplicationContext was accessible here and could provide me with a way to get to the ContentService.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted