在 FAST Search Server 2010 for Sharepoint 中,如何将优化结果限制增加到 100 以上。

In FAST Search Server 2010 for Sharepoint how do I increase the Refinement results limit to over 100.

在 FAST 搜索查询中,我想获得适用于搜索词的所有优化。目前我只得到 100 个结果。我想知道是否有一个设置可以获得超过 100 个我必须在查询中传递的优化结果。

这是查询的 Refiners 部分:

<IncludeRefinementResults><Refiners><Refiner>*PROPERTY NAME*</Refiner></Refiners></IncludeRefinementResults>

我已经研究过 Deep vs shallow Refiners (https://technet.microsoft.com/en-us/library/gg193929(v=office.14).aspx),它处理基于所有结果的优化与基于仅前 100 个结果的优化,并且不处理优化结果的实际数量被退回。

如果有人能指出 100 是硬性限制或指导我找到我缺少的过滤器,那就太好了。

经过大量搜索,我找到了 blog post 的答案。总之,这个值是硬编码的,在GetRefinableManagedPropertyInfos方法中Microsoft.Office.Server.Search.RefinementUtilities.ManagedPropertyInfoProviderclass。以下是一段很长的代码片段,但请注意对 GetValuesForRefinableProperties 方法的调用,其中 100 的值被硬编码到 maxItems 变量中。我使用 Reflector 生成以下内容:

public IEnumerable<RefinableManagedPropertyInfo> GetRefinableManagedPropertyInfos(SiteCollectionReference siteCollectionReference, double percentageThreshold = 0.8, TermReference? termReference = new TermReference?())
{
    using (new SPMonitoredScope("ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos"))
    {
        long num;
        IEnumerable<Refinement> enumerable3;
        IEnumerable<RefinerData> enumerable6;
        IEnumerable<ManagedPropertyInfo> refinablePropertiesInSchema = this.GetAllRefinableProperties(siteCollectionReference).ToList<ManagedPropertyInfo>();
        if (!termReference.HasValue)
        {
            ULS.SendTraceTag(0x153103, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.High, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Schema info only requested. Returning.", new object[] { "ManagedProperties" });
            return CreateRefinableManagedPropertyInfoList(refinablePropertiesInSchema);
        }
        IEnumerable<string> source = (from r in refinablePropertiesInSchema select r.Name).ToList<string>();
        if (!source.Contains<string>("ManagedProperties", StringComparer.OrdinalIgnoreCase))
        {
            ULS.SendTraceTag(0x153104, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.High, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Can not find managed property {0} in schema. Returning only refinable properties from schema.", new object[] { "ManagedProperties" });
            return CreateRefinableManagedPropertyInfoList(refinablePropertiesInSchema);
        }
        try
        {
            enumerable3 = this.GetValuesForRefinableProperty(siteCollectionReference, "ManagedProperties", termReference.Value, 0x7fffffff, out num).ToList<Refinement>();
        }
        catch (QueryFailedException exception)
        {
            exception.RefinablePropertiesFromSchema = CreateRefinableManagedPropertyInfoList(refinablePropertiesInSchema);
            throw;
        }
        if (num == 0L)
        {
            ULS.SendTraceTag(0x153105, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.High, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Query returned 0 results. Returning only refinable properties from schema.");
            return CreateRefinableManagedPropertyInfoList(refinablePropertiesInSchema);
        }
        ULS.SendTraceTag(0x153106, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.Verbose, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Found {0} refinable properties with index values.", new object[] { enumerable3.Count<Refinement>() });
        long threshold = (long) Math.Round((double) (num * percentageThreshold));
        IEnumerable<string> enumerable4 = (from r in enumerable3
            where r.RefinementCount >= threshold
            select r.RefinementName).ToList<string>();
        ULS.SendTraceTag(0x153107, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.Verbose, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Found {0} managed properties with values above threshold {1}", new object[] { enumerable4.Count<string>(), threshold });
        IEnumerable<string> enumerable5 = source.Intersect<string>(enumerable4, StringComparer.OrdinalIgnoreCase).ToList<string>();
        ULS.SendTraceTag(0x153108, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.Verbose, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Want to find entropy for {0} managed properties.", new object[] { enumerable5.Count<string>() });
        try
        {
            enumerable6 = this.GetValuesForRefinableProperties(siteCollectionReference, enumerable5, termReference.Value, 100, out num).ToList<RefinerData>();
        }
        catch (QueryFailedException exception2)
        {
            exception2.RefinablePropertiesFromSchema = CreateRefinableManagedPropertyInfoList(refinablePropertiesInSchema);
            throw;
        }
        ULS.SendTraceTag(0x153109, ULSCat.msoulscat_SEARCH_Admin, ULSTraceLevel.Verbose, "ManagedPropertyInfoProvider::GetRefinableManagedPropertyInfos: Total hits in entropy query = {0} Number of refiners returned = {1}", new object[] { num, enumerable6.Count<RefinerData>() });
        return CreateRefinableManagedPropertyInfoList((from r in enumerable6
            where r.Entropy > 0M
            select r).ToDictionary<RefinerData, string, RefinerData>(suggestedRefiner => suggestedRefiner.RefinerName, r => r, StringComparer.OrdinalIgnoreCase), num, enumerable3, refinablePropertiesInSchema);
    }
}

我没有通过反编译、更改值和重新编译来验证这一点,但除非微软提供补丁,否则 100 似乎是一个硬性限制。上面的反编译代码是截至 SharePoint 2013 的最新代码。

发现这个 forum thread,它表明更改精简参数 "filter" 应该允许超过 100 个结果。

添加托管 属性(通过 Sharepoint UI),并将其标记为 "Refiner property" 并标记为 "Deep Refiner"。

使用精炼器参数"filter"可以得到100多个精炼器参数

您需要将此参数与精炼器一起设置 属性 例如

author(filter=500)