FAST SharePoint Sameining: Dæmi Code til að sýna allar Laus FAST Views

Here is some code that shows all available views from a HRATT server based on the named QRServer (the server process with which we communicate). I offer this up to give you all a taste of what it’s like to use the provided FAST API.

með System;
með System.Collections.Generic;
með System.Linq;
með System.Text;
með Com.FastSearch.Esp.Search;
með Com.FastSearch.Esp.Search.Http;
með Com.FastSearch.Esp.Search.Navigation;
með Com.FastSearch.Esp.Search.Query;
með Com.FastSearch.Esp.Search.Result;
með Com.FastSearch.Esp.Search.View;
með System.Collections.Specialized;
með System.Collections;


namespace Conchango
{
    flokki EnumerateFASTViews
    {
        truflanir ógilt Main(band[] args)
        {

            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection =  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().Count + "].");

            INT i = 0;

            framhandleggur (mótmæla o í 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 🙂

</enda>

Technorati Tags: ,

Gerast áskrifandi að bloggið mitt.

Eftir svar

Netfangið þitt verður ekki birt. Nauðsynlegir reitir eru merktir *