mnoGoSearch Search COM Objects
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.
Note
All the examples in this chapter are for ASP/VBScript.
Search objects overview
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 example of using search COM objects
Set engine= Server.CreateObject("MnoGoSearch.GoSearch")
engine.DBAddr= "Oracle://system:manager@/MyOracleDSN/?dbmode=multi"
Set result= engine.Find(Request.QueryString()) ' launch searching
if result.Valid then
if result.Count = 0 then
Response.Write("Sorry, your words were not found!")
else
Response.Write("Your words were found in " + Result.Count + " documents.")
Response.Write("Displaying " + Result.LastDoc - Result.FirstDoc + " of them:")
last= result.LastDoc
for i=result.FirstDoc to last
Set line= result(i)
Response.Write(line.Section("url","",""))
next
end if
end if
ASP frontend is another good examle of using search COM objects
|