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
Had a legit request from a client that they want the parent nodes to come higher up the rankings than any children which might contain the same searched for phrase/word. So give this tree:
Cars- Ford- VW- Lada
if searching for "engine" (which lets say all pages contain) they want to have the "Cars" node listed first. Note this "weighting" might not be based on the tree position so we thought if we could adjust the weighting per doctype (in this example "Cars" is a different doctype than the child manufactures)?
check this post for some info that may help:
a little snippet (doesn;t do it based on doctype, but may help):
this has the boost value for the document on a doc property. (untested but gives you an idea).
I'm not sure you can get the doctype (or any node data for that matter) at Document Writing time but am quite possibly wrong :-)
var indexer = (UmbracoContentIndexer)ExamineManager.Instance.IndexProviderCollection["indexname"];
indexer.DocumentWriting += indexer_DocumentWriting;
void indexer_DocumentWriting(object sender, Examine.LuceneEngine.DocumentWritingEventArgs e)
var field= e.Document.GetField("BoostScore");
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted