Integrazzjoni SharePoint FAST: Kodiċi Kampjun li juru l Views FAST Disponibbli

Here is some code that shows all available views from a FAST server based on the named QRServer (l-proċess server li nikkomunikaw). I offer this up to give you all a taste of what it’s like to use the provided FAST API.

użu Sistema;
użu System.Collections.Generic;
użu System.Linq;
użu System.Text;
użu Com.FastSearch.Esp.Search;
użu Com.FastSearch.Esp.Search.Http;
użu Com.FastSearch.Esp.Search.Navigation;
użu Com.FastSearch.Esp.Search.Query;
użu Com.FastSearch.Esp.Search.Result;
użu Com.FastSearch.Esp.Search.View;
użu System.Collections.Specialized;
użu System.Collections;


namespace Conchango
{
    klassi EnumerateFASTViews
    {
        statiku null Main(string[] args)
        {

            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection = ġdid NameValueCollection();

            nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory");
            nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100");
            nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET");

            searchFactory = SearchFactory.NewInstance(nameValueCollection);

            Console.WriteLine("Total Views: [" + searchFactory.GetSearchViewList().Għadd + "].");

            int i = 0;

            foreach (object o fil searchFactory.GetSearchViewList())
            {
                Console.WriteLine("View [" + i   + "]: [" + o.ToString() + "].");

            }

            Console.ReadLine();

        }
    }
}

Note that I consider myself a barely competent C# programmer and I have thin skin, so don’t send any raspberries my way, especially re: the "foreach (object o in …)" construct 🙂

</aħħar>

Tags: ,

Abbona għall-blog tiegħi.

Ħalli Irrispondi

Your email address mhux se jkun ippubblikat. Meħtieġa oqsma huma mmarkati *