Share via

FullTextIndexRankCollection Interface

Represents a full text index rank collection.

Namespace:  Microsoft.SharePoint.Search.Extended.Administration.Schema
Assembly:  Microsoft.SharePoint.Search.Extended.Administration (in Microsoft.SharePoint.Search.Extended.Administration.dll)


<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Interface FullTextIndexRankCollection _
    Inherits IEnumerable(Of FullTextIndexRankComponent), IEnumerable
Dim instance As FullTextIndexRankCollection
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public interface FullTextIndexRankCollection : IEnumerable<FullTextIndexRankComponent>, 


A [FullTextIndexRankCollection] is associated with a rank profile and represents relevance settings for a collection of FullTextIndexRankComponent objects.


This sample shows how to boost the proximity weight for the default full text index. Increasing the proximity weight will boost the ranking of documents that matches multi term queries where the terms appear near each other in the text.

            using System;
            using Microsoft.SharePoint.Search.Extended.Administration;
            using Microsoft.SharePoint.Search.Extended.Administration.Schema;
            namespace FullTextIndexRankComponentSample
                class Program
                    static void Main(string[] args)
                            SchemaContext schemaContext = new SchemaContext();
                            Schema schema = schemaContext.Schema;
                            //Fetch the rank profile named 'default' which is the default rank profile. 
                            RankProfile rankProfile = schema.AllRankProfiles["default"];
                            //Fetch the full text index ranks and iterate over the collection to find the component to update.
                            //The default full text index is by default called: 'content'.
                            FullTextIndexRankCollection fullTextIndexRanks = rankProfile.GetFullTextIndexRanks();
                            foreach (var rankComponent in fullTextIndexRanks)
                                if (rankComponent.FullTextIndexReference.Name.Equals("content"))
                                    int currentProximityWeight = rankComponent.ProximityWeight;
                                    Console.WriteLine("Current proximity weight: " + currentProximityWeight + " of rank component: " + rankComponent.FullTextIndexReference.Name);
                                    rankComponent.ProximityWeight += 10;
                                    Console.WriteLine("New proximity weight: " + rankComponent.ProximityWeight + " of rank component: " + rankComponent.FullTextIndexReference.Name);
                        catch (Exception ex)

See Also


FullTextIndexRankCollection Members

Microsoft.SharePoint.Search.Extended.Administration.Schema Namespace