Quantcast
Channel: Smells like SharePoint » Search
Viewing all articles
Browse latest Browse all 3

SharePoint 2013 Search – Search Influencers (Sort by Rank)

0
0

Let’s start with the basics. SharePoint 2013 Search (as mentioned before) goes beyond your standard search engine. It can be used to surface data, analyze data, and yes, find data.

SharePoint Search can provide results based on rank, managed property, formula expression, and randomization. We will get into the surfacing andSearch-Foo analyzing of data later on, but for now we are concerned about that little black box in SharePoint that turns a query of “Foo” into a sorted results page through a process called ’Sort by Rank.’

The Basics

‘Sort by Rank’ is the idea of weighting results based off a set of rules. The result with the highest weight is placed first in results.

Every document has properties. When performing a search, those properties are compared to the query. The document that has the most matching properties is the document that is most likely the one for which you are looking.

That’s great, but what properties matter? Do all properties matter equally? Which is more highly valued: a document with the title “Foo”, or a document with the word “Foo” ten times?

Search Influencers

As mentioned in my Introduction to Search, before we can search, we must have results. So let’s talk about what properties SharePoint cares about when building the Index.

When crawling, SharePoint makes note of and tracks five key categories across multiple indexes:

  • Content: Search considers content text. As far as SharePoint is concerned, any media such as images, PDFs (non-OCR’d), and videos contain little or no content.
  • Metadata: All crawled properties on a given item are included in this classification. Default metadata such as title, created by, created date, and any custom properties (some setup required) are crawled.
  • Web Graph Data: Any data associated with web graphs (or objects) such as its source, pages containing, and links to it are important in creating results.
  • File Type: File type provides a context for SharePoint to use when reviewing which properties to consider when ordering results.
  • Interaction: SharePoint Search cares about how users interact with results. The more users click on results, the higher that item is placed.

Once indexed, these influencers serve as the basis for ranking.

Result Ranking

Once we have something to search, we’re ready to go! But, how exactly does SharePoint use its “Search Influencers” to order results on a page?

When a query is executed, SharePoint uses a two-step process utilizing Ranking Features to determine what to display and how to order it.

Ranking Features

A Ranking Feature is the amount of importance SharePoint gives each Search Influencer. Ranking Features work by applying a relative weight to an item’s properties.

Item properties vary in length and complexity. While the Yes/No field is recorded as a 1 or 0 in the index, the body may contain billions of characters. The more complex a ranking feature, the more resources are required, making it more ‘expensive’.

In its first pass, search uses the least expensive ranking features to determine which documents are relevant to the query. Once a subset is determined, expensive Ranking Features are applied to determine weight. The item with the highest rank weight is prioritized with additional results ordered in descending weight.

Simple enough right? Well no, we need another layer.

Unfortunately, it doesn’t always make sense to apply the same Ranking Features to a query. This brings us to Ranking Models.

Ranking Model

Imagine, if you will, a search for a person verses a search for a document. The name field “Jody Finch” matters a lot more in a people search then it does in a document search. While a document search may return results authored by or content including the phrase “Jody Finch”, in a people search, the end user only cares about persons whose name matches “Jody Finch”.

This distinction in Ranking Feature importance based off query type is known as the Ranking Model. The Ranking Model can be thought of as the formula used by SharePoint to determine a Ranking Feature’s relevance in sorting of results.

It is important to understand that the formula used in a Ranking Model is very complex. Not only is the type of search considered, but the query submitted and the types of properties from returned results are also used in weighting.  For instance, the file type of Excel has a higher weight than one of Word a document, but a Word Document’s Title field has a higher weight than an Excel’s.

In the following example we will evaluate a search for “Jody” and its associated weighting.

  Doc 1 Property Doc 1 Weight Doc 2 Property Doc 2 Weight
Name Jody.Docx Jody.XLST
Title Jody’s Document .5 Jody’s Document .25
File Type Document .5 Excel 1
Author Jody Finch .5 Jody Finch .5
Total Weight   1.5   1.75

*Example purposes only. Not true weighting.

Even though the properties of our two documents are almost identical, results would display “Jody.xslx” before “Jody.docx”.

  • The title field receives a heavier weighting on *.docx results.
  • Excel documents receive a higher weighting than Word documents.
  • The Author field is weighted equally.

Different ranking models are used for different types of searches. Ranking models in SharePoint can be classified into three groups:

  • General Purpose: The General Purpose model is just that, used for general purposes. It is used as the default search model to rank all content within SharePoint that has no other predefined model. Nine times out of ten, this will be the type of model used.
  • People Search: Ah, User Profile Service, how you and MySites complicate anything and everything, including Search. The People Search ranking model is used when referencing anything in the User Profile Service as a whole. When searching profiles, calculating social distance, and when weighting expertise, the People Search ranking model is used.
  • Special Purpose: Special purposed ranking models are used for those one-off cases in SharePoint Search. Social suggestions, popularity ranking, and external content search all fall under the Special Purpose ranking model.

As the end user, you will never have to specify the ranking model, but as an administrator, understanding the different types is handy in realizing why results are different for external sites (Special Purpose ranking model) vs. Intranet results (General ranking model).

Rank Evaluation

Finally, we understand all of the parts, but what the heck is actually happening? All of these parts discussed work up to the Rank Evaluation.

So from the top:

Step 1 – A search is submitted.

Step 2 – SharePoint determines Search Type.

Step 3 – A corresponding Ranking Model is used based on Search Type.

Step 4 – A first pass using the least expensive Ranking Properties gets a subset of possible results from the index.

Step 5 – A second pass using more expensive Ranking Properties determines each item’s weight.

Step 6 – Items are arranged by weight and displayed as a result.

Conclusion

Perhaps the most powerful aspect of all this is that every single part of Search 2013 Search is customizable. Hate the out of the box ranking models? Define your own.

SharePoint 2013 Search is extremely powerful. Now that we understand what search is, and have a general idea of what influences it and how it works, we can start to get into the fun stuff – Farm Planning.

<- Return to A Complete Guide to Search: Table of Contents

Sources:


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images