FAST Integrimi SharePoint: Kodi mostër të shfaqur të gjitha Available Views FAST

Here is some code that shows all available views from a FAST server based on the named QRServer (Procesi server me të cilën ne komunikojmë). I offer this up to give you all a taste of what it’s like to use the provided FAST API.

përdorim Sistem;
përdorim System.Collections.Generic;
përdorim System.Linq;
përdorim System.Text;
përdorim Com.FastSearch.Esp.Search;
përdorim Com.FastSearch.Esp.Search.Http;
përdorim Com.FastSearch.Esp.Search.Navigation;
përdorim Com.FastSearch.Esp.Search.Query;
përdorim Com.FastSearch.Esp.Search.Result;
përdorim Com.FastSearch.Esp.Search.View;
përdorim System.Collections.Specialized;
përdorim System.Collections;


namespace Conchango
{
    klasë EnumerateFASTViews
    {
        i pandryshueshëm pavlefshme Kryesor(varg[] args)
        {

            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection = i ri 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);

            Konsol.WriteLine("Total Views: [" + searchFactory.GetSearchViewList().Numëroj + "].");

            int i = 0;

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

            }

            Konsol.Linja leximi();

        }
    }
}

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 🙂

</fund>

Technorati Tags: ,

Abonohen në blogun tim.

Lini një Përgjigju

Adresa juaj e emailit nuk do të publikohet. Fusha e kërkuar janë shënuar *