I have a custom ranking model which works great. But is it possible to give some page layouts higher ranking than others?
I started trying this with file types as a lot of the examples are using that. But it is not working.
The rankingmodel.xml
I use looks like this:
<?xml version="1.0" encoding="utf-8"?><rankingModel name="CustomRankingModel" id="302A9E0E-F8B9-4b21-8180-C327ECCBBA94" description="Custom Ranking Model" xmlns="http://schemas.microsoft.com/office/2009/rankingModel"> <queryDependentFeatures> <queryDependentFeature name="Body" pid="1" weight="13" lengthNormalization="0.5"/> <queryDependentFeature name="Title" pid="2" weight="20" lengthNormalization="0.5"/> <queryDependentFeature name="Author" pid="3" weight="8" lengthNormalization="0.5"/> <queryDependentFeature name="Description" pid="6" weight="5" lengthNormalization="0.5"/> <queryDependentFeature name="FileExtension" pid="319" weight="10" lengthNormalization="0.5"/> <queryDependentFeature name="MetaInformatie" pid="403" weight="11" lengthNormalization="0.5"/> <queryDependentFeature name="Filename" pid="56" weight="10" lengthNormalization="0.5" /> <queryDependentFeature name="FileType" pid="98" weight="10" lengthNormalization="0.5" /> </queryDependentFeatures> <queryIndependentFeatures> <categoryFeature name="FileType" pid="98" default="0"> <category name="Aspx" value="0" weight="0" /> <category name="Docx" value="1" weight="30" /> <category name="Pdf" value="2" weight="100" /> </categoryFeature> </queryIndependentFeatures> </rankingModel>
I tried in the xml above to show .pdf
on top and hide or display .aspx
files below. But I can't seem to give them the right name/value/weight.
Again in the end I want to use it on the content type of the page layout (if it is even possible) but for now I wish I could understand how to modify the file type weights.