Search Site        
 
Home  

Search objects reference

GoSearch object

DBAddr property

String representing data source

e.g. "Oracle://system:manager@/MyOracleDSN/"

or "C:\MnoGoSearch\Data" in Lite version

You must specify this property before launching search.

DBMode property

This is the mode of the database you use.

Be sure it is the same as you set for indexer. (for details see Chapter 17., Storage modes)

Possible values: "single", "multi", "crc", "crc-multi", "cache"

You must specify this property before launching search.

DocCount property

Read only. Value is the total number of documents in your database.

ErrorCode property

Read only. You can check this value after failed operations to find out the cause of the error.

Zero value means no error.

ErrorDescription property

Read only. It is string description of the error happened.

Version property

Read only. It is the number of version of the COM object you use.

SetCharset

SetCharset(charset_name)

This method specifies charset to use.

Example: go_search.SetCharset("iso-8859-2")

Default setting is "us-ascii"

SetCrosswords

SetCrosswords(b_enabled)

This method specifies whether we will (or won't) use crosswords.

Example: go_search.SetCrosswords(true)

Using crosswords is off by default

SetMatch

SetMatch(b_enabled)

This method specifies the way we will treat query string.

Possible values:

"all" - find documents containing all words from query

"any" - find documents containing at last one word from query

"bool" - query is a boolean expression

"phrase" - find documents containing exact phrase

Default setting: "any"

Example: go_search.SetMatch("all")

SetMinWordLength

SetMinWordLength(n_length)

This method specifies minimum token length to be a word.

Default value: 1

Example: go_search.SetMinWordLength(3)

SetMaxWordLength

SetMaxWordLength(n_length)

This method specifies maximum token length to be a word.

Default value: 32

Example: go_search.SetMaxWordLength(12)

SetMode

SetMode(mode)

This method specifies parts of words to be found.

Possible values:

"wrd" - search for exact words

"beg" - search for words with beginnings matching the query

"end" - search for words with endings matching the query

"sub" - search for words having substrings matching the query

Default setting: "wrd"

Example: go_search.SetMode("beg")

SetPageNumber

SetPageNumber(n_page)

This method specifies number of page of the result you want to get.

Default value: 0

Example: go_search.SetPageNumber(2)

SetPageSize

SetPageSize(n_documents_per_page)

This method specifies number of result you want on one page.

Last result's page can be shorter.

Default value: 20

Example: go_search.SetPageSize(20)

SetPhraseMode

SetPhraseMode(b_enabled)

This method specifies whether we will or won't use phrase mode.

Mode is off by default

Example: go_search.SetPhraseMode(true)

SetStopFile

SetStopFile(path)

This method sets stop words file to use.

This file is a list of words that are not taken into account during searching.

There's no stopfile set by default

Example: go_search.SetStopFile("c:\MnoGoSearch\data\english_stp.txt")

SetStopTable

SetStopTable(table_name)

This method sets stop words database table to use.

This table is a list of words that are not taken into account during searching.

There's no stoptable set by default

Example: go_search.SetStopTable("english_stp")

AddCatLimit

AddCatLimit(category_to_search)

This method sets ID of the category where to search.

This category should be defined during indexing.

Example: go_search.AddCatLimit("AP")

AddTagLimit

AddTagLimit(tag_to_search)

This method sets tag limit for searching.

This tag should be defined during indexing.

Example: go_search.AddTagLimit("AP")

AddDateLimit

AddDateLimit(b_search_before, date)

This method sets date range for searching.

Parameter b_search_before shows whether you want to search before or after date specified.

Example: go_search.AddDateLimit(false, Date() - 1)

This will search only through today and yesterday documents

AddLangLimit

AddLangLimit(lang)

This method sets language of documents that we looking for.

Example: go_search.AddLangLimit("fr")

This will search only for french documents

AddUrlLimit

AddUrlLimit(url)

This method sets url limitation for search.

Example: go_search.AddUrlLimit("/servers/")

This will search only in /servers/ folder of indexed sites

Find

Find(query)

This method launches search with previously set limitations and returns SearchResult object.

Example: Set result= go_search.Find("cheap car")

This will start searching words "cheap" and "car"

SearchResult object

Count property

Read only. Total number of documents found.

Only documents between LastDoc and FirstDoc are accessible

FirstDoc property

Read only. Number of the first accessible document.

LastDoc property

Read only. Number of the last accessible document.

Line

Line(n_line)

ResultLine object representing specified document.

Only documents between LastDoc and FirstDoc are accessible

Example: Set cur_doc= result(result.FirstDoc)

NPages property

Read only. Total number of results pages in selection.

RowsOnPage property

Read only. Number of rows on current page.

SearchSeconds property

Read only. Time elapsed in seconds.

Valid property

Read only. False if Find method failed.

WordInfo property

Read only. String with statistics on wors found.

ResultLine object

Category property

Category of the document.

ContentType property

Type of the document (text/plain, html, etc).

CRC property

CRC sum of the document's URL.

Description property

Value of META description tag of the document.

Keywords property

Value of META keyword tag of the document.

LastModifiedDate property

Last modification date of the document.

Order property

Number of the document in selection.

Size property

Size of the document in bytes.

Text property

Sample of test from the document.

Title property

Title of the document.

URL property

URL of the document.




Copyright © 2000-2015 Lavtech.Com Corp.