In a previous post, I discussed why search results can seem so bad. Honestly, labeling results as "bad" is misleading because the Search Engine is ranking results by only the metadata and rank model that the Search Admin told the Search Engine to use. In reality, there are no bad search results, only bad Search Admins. 😉
I recently ran across a case of "perceived bad results" that I thought was really interesting because the ranking behavior from the default SP2013 rank model had completely flipped when compared to the ranking behavior in SPO. In SP2013, customers often questioned why, when given an Office Document (e.g. PowerPoint or Word) and a PDF which were equivalent in content, the Office Document always ranked higher.
The reason is that the SP2013 default rank model heavily weighs PowerPoint and Word file types while PDFs are not weighted. In fact, in the SP2013 default rank model, Office Documents are the most heavily weighted of all document types. Since a PDF is not weighted in the default rank model, it receives a default weighting that is lower than Office Documents' weightings.
In SPO, this behavior has "flipped," not because PDFs are weighted higher, but because Office Documents are weighted lower than the default File Type, and since PDFs have no defined weighting, they will get the default or higher weighting.
Adding to the foregoing confusion is this question: "What defines the default weight for a File Type?" During indexing, all files are assigned an "Internal File Type." For example, a Word document is InternalFileType=1, a PowerPoint is InternalFileType=2, and a PDF is InternalFileType=15. While the default rank model in SPO and SP2013 define weights for Types 1 and 2, they do not define a weight for 15. During rank score calculation, a PDF's File Type is transformed from 15 to 0. This transformation is clearly seen in the rank log output (see the Search Query Tool for more on how to get a rank log). The default rank log does define a weighting for Type 0, but the rank models label this type as HTML. So, in reality, any undefined File Type will receive the same weighting as an HTML file and in SPO it will be higher than Office Documents, while in SP2013 it will be lower. 😯
Below is a excerpt from a rank log using the default SPO rank model of a PowerPoint document showing a the InternalFileType=2 (PPT) getting a boost of -0.078.
<bucketed_static_feature name='InternalFileType' property_name='InternalFileType' used_default='0'
raw_value_in='2' raw_value='2' raw_value_transformed='2'
Compare to the following excerpt from a rank log using the default SPO rank model of a PDF document showing an initial InternalFileType=15 (PDF), then transforming the value to 0 (HTML/default), and applying a boost of 0.391.
<bucketed_static_feature name='InternalFileType' property_name='InternalFileType' used_default='1'
raw_value_in='15' raw_value='15' raw_value_transformed='0'
To address this issue in SP2013 or SPO, you should to define an appropriate weight for PDFs in a custom rank model or use the XRANK operator to apply an appropriate boost for PDFs.