> Main > Products and Services > Purchase > Company
English / Russian

Documentation

CNSearch 1.5.1

© "CN-Software" Ltd. 2002-2008
support@cn-software.com
www.cn-software.com
Previous | Table of Contents  | Next

Searching Through Selected Sites

Starting with version 1.3, the system supports an ability of searching through selected sites. Each site is assigned an order number at the indexing stage, starting with '0', for example:

[job localhost]

[Index]

URL             http://www.mysite.com/

Statistic       Append

CharSet         ByHTTPHeader

MaxFiles        10000

StopWordsFile   stopwords.txt

Exclude         search/,mail/,.zip,.gif,.jpg

[Index]

URL             http://www.second.com/

Statistic       Append

CharSet         ByHTTPHeader

[Index]

URL             http://www.test.com/

Statistic       Append

CharSet         ByHTTPHeader

Numbers of sites are assigned as follows:

0 - http://www.mysite.com/

1 - http://www.second.com/

2 - http://www.test.com/

Note: after the re-indexing, one and the same number can be assigned to two different sites. For example, when re-indexing by means of the following configuration file:

[job addon]

[Index]

URL             http://www.newsite.com/

Statistic       Append

CharSet         ByHTTPHeader

MaxFiles        10000

StopWordsFile   stopwords.txt

Exclude         search/,mail/,.zip,.gif,.jpg

the site http://www.newsite.com/ will be assigned as number "0", or:

0 - http://www.mysite.com/

0 - http://www.newsite.com/

1 - http://www.second.com/

2 - http://www.test.com/

It is necessary to use "d" parameter to perform a search through selected sites. If the parameter is not set up (default), the search is performed on all sites.

For example:

-- cnsearch.conf ----------------------------------------

::CONFIG regcode = Enter Your registration code here

::CONFIG stats = password

 

::HTMLTOP

<HTML>

<HEAD>

<TITLE>Search results - %Q</TITLE>

</HEAD>

<BODY>

<table width=400 height=40 align=center bgcolor=#C0C0C0>

<form action="%F" method=get><tr><td align=center>

<input type=text name=q size=40 maxlength=64 value="%Q">

<input type=submit value="Search">

<br>

<select name=d>

<option value="0">www.mysite.com, www.newsite.com

<option value="1">www.second.com

<option value="2">www.test.com

</select>

</td></form></tr></table>

Documents found: %O

 <B>%O</B><font color=gray>%W<B>%P</B></font><br>

<br>

<div align=right>

Sort by: <a href="%A">date</a> | <a href="%L">relevancy</a>

</div>

 

::HTMLRESULT

<HR>

<UL>

<LI>%N. <a href="%U" target=_new>%T</A> <small>

      <font color=red>%S</font> [Relevancy: %R]</small>

<UL>

<LI>%E

<LI>%D

<LI>%C

<LI><a href="%U" target=_new>%u</A>

</UL>

</UL>

 

::HTMLNOTFOUND

<P><font color=red>%Q not found</font>

 

::HTMLBOTTOM

%B

</BODY>

</HTML>

-- end cnsearch.conf ------------------------------------


Previous | Table of Contents  | Next