This is a continuation in my FAST coding mini-series for SharePoint folk. The bit of code below executes a search for the term "test" in FAST via a Console application. Obviously, suus saliunt, omit, et salire ad obvolvendum hanc partem sive logica intus telam application page:
usura System; usura System.Collections.Generic; usura System.Linq; usura System.Text; usura System.Collections.Specialized; usura Com.FastSearch.Esp.Search; usura Com.FastSearch.Esp.Search.Http; usura Com.FastSearch.Esp.Search.Navigation; usura Com.FastSearch.Esp.Search.Query; usura Com.FastSearch.Esp.Search.Result; usura Com.FastSearch.Esp.Search.View; usura System.Collections; Spatium nominale Conchango { genus InvokeSimpleFASTQuery { static Irrita Main(filum[] args) { #regionem Initialize communicatio nostra cum ieiunium ISearchFactory searchFactory; NameValueCollection nameValueCollection = novum 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); #endregion Immittendi query filum queryString = "test"; Quaero query = novum Quaero(queryString); query.SetParameter(BaseParameter.RACEMIFER, falsum); query.SetParameter(BaseParameter.NAVIGATIO, verum); query.SetParameter(BaseParameter.NAVIGATION_DEEPHITS, 100); ISearchView searchView; searchView = searchFactory.GetSearchView("sharepointconn"); IQueryResult Ex = searchView.Search(query); Consolandum.WriteLine("Total results from search: [" + result.DocCount + "]."); int docCounter = 0; Dum (docCounter < result.DocCount) { docCounter ; IDocumentSummary thisDocSummary = result.GetDocument(docCounter); Consolandum.WriteLine("[" + docCounter + "]: " + thisDocSummary.GetSummaryField("url").StringValue); } // Dum Consolandum.ReadLine(); #endregion } } }
Procreat ex sequentibus:
</finem>
Alvin, vos forsit iam ex hoc figurabatur, sed hie abit…
Nescio respondetur, at, memini, questus quod aliquid erat iniuriam views nulla in servo terminis meis et portum config modi rei. Eam ipsum picky.
Got a question vivos pro vobis, Paulus. Ad haec ego quaero quae scire volens redire sententia tenet 0 nam GetSearchViewList().Numera. Potes mihi indicare rectum?
Gratias,
Alvin