mnoGoSearch search COM objects allow you to get our search functionality from various Windows
apllications. It'is particularly useful in developing frontends using tools like ASP.
Main object to get search functionality is GoSearch. You can set parameters and limitations
you want for your search. Then you usually launch Find method that performs search and returns
SearchResult object. From SearchResult object you can get result statistics and retrive found
documents. ResultLine object is to give you information about single retrived document.
Here is an conventional exaple of using search COM objects
Set engine= Server.CreateObject("MnoGoSearch.GoSearch")
engine.DBAddr= "Oracle://system:manager@/MyOracleDSN/"
engine.DBMode= "single"
engine.SetPageNumber(0) ' get first results page
engine.SetPageSize(50) ' we don't want more than 50 documents on page
engine.SetMatch("all") ' only documents having all the query wors
engine.AddTagLimit("AA") ' only search AA category of sites
Set result= engine.Find("my wife") ' launch searching for words "my" and "wife"
if result.Valid then
if result.Count = 0 then
Response.Write("Your wife is not in Internet!")
else
Response.Write("I found your wife in " + Result.Count + " places.")
Response.Write("Here are " + Result.LastDoc - Result.FirstDoc + " of them:")
last= result.LastDoc
for i=result.FirstDoc to last
Set line= result(i)
Response.Write(line.URL)
next
end if
end if
ASP frontend is another good examle of using search COM objects