SharePoint ceev kev koom ua ke: Coj ib cov lus nug yooj yooj yim

Qhov no nws yog ib tug continuation hauv kuv vas NTHIV coding mini-series rau SharePoint folk. Cov cai hauv qab no me ntsis executes nrhiav ib lub sij hawm "sim" nyob rau hauv lub vas NTHIV ntawm ib daim ntawv thov Console. Obviously, Nws yog ib plhaw, hla thiab dhia mus qhwv no logic hauv ib cov qhov Web site los yog daim ntawv phab:

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

namespace Conchango
{
    hoob InvokeSimpleFASTQuery
    {
        zoo li qub khoob lug Main(hlua[] args)
        {

            #thaj av Initialize peb kev sib txuas lus nrog rau vas NTHIV
            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection = tshiab 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", "TAU");

            searchFactory = SearchFactory.NewInstance(nameValueCollection);

            #endregion #region Tso ib cov lus nug

            hlua queryString = "sim";

            Lus nug lus nug = tshiab Lus nug(queryString);

            lus nug. SetParameter(BaseParameter.CLUSTERING, tsis tseeb);
            lus nug. SetParameter(BaseParameter.NAVIGATION, tseeb);
            lus nug. SetParameter(BaseParameter.NAVIGATION_DEEPHITS, 100);

            ISearchView searchView;
            searchView = searchFactory.GetSearchView("sharepointconn");

            IQueryResult ntog = searchView.Search(lus nug);

            Console.WriteLine("Tag nrho ntawm nrhiav: [" + ntog. DocCount + "].");

            rau cov menyuam docCounter = 0;

            thaum lub (docCounter < ntog. DocCount)
            {

                docCounter   ;

                IDocumentSummary thisDocSummary = ntog. GetDocument(docCounter);

                Console.WriteLine("[" + docCounter + "]: " + thisDocSummary.GetSummaryField("url").StringValue);

            } // thaum lub

            Console.ReadLine();
            #endregion

        }
    }
}

Nws generates cov nram qab no tshwm sim:

duab

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati: ,

2 xav txog"SharePoint ceev kev koom ua ke: Coj ib cov lus nug yooj yooj yim

  1. Paul Galvin

    Alvin, koj zaum figured no lawm, tiam sis ntawm no mus…

    Kuv tsis paub cov lus teb, tab sis kuv nco qab tias kuv tau txais pes tsawg views vim hais tias tej yam tsis ncaj ncees lawm ntawd kuv neeg rau zaub mov chaw nres nkoj config thiab tsi tshaj ntawd yog. Nws yog kus kes heev.

    Teb
  2. Alvin

    Tau ceev lus nug mus rau koj, Paul. Kuv twb tau tau sim seb tsim cov kev tshawb fawb views li nws yuav rov qab yuav ua li cas 0 kev GetSearchViewList().Suav. Tau koj taw tes kuv ua raws li siab xav?

    Tsaug,
    Alvin

    Teb

sau ntawv cia

Koj email chaw nyob yuav tsis muab luam tawm. Search cim *