Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexing Service Query Language

Status
Not open for further replies.

irate

Programmer
Jan 29, 2001
92
0
0
GB
I have an index for my web site that I am querying from an ASP script.

It basically takes a user inputted string and searchs for it in the index.

It does this by simply adding
Code:
'$CONTENTS '
to what ever the user inputs, however if they input nothing I want to return all the index.

I am a very new to indexing on iis so coul someone tell me what query to use to return all the index please.

Here is the code in case it helps:

Code:
<%
  function strRemPunc(str)
   dim chrNum
   for chrNum = 33 to 47
    str = replace(str,chr(chrNum),&quot; &quot;) 'removes !&quot;~$%&'()*+,-./
   next
   for chrNum = 58 to 64
    str = replace(str,chr(chrNum),&quot; &quot;) 'removes :;<=>?@
   next
   for chrNum = 91 to 96
    str = replace(str,chr(chrNum),&quot; &quot;) 'removes [\]^_`
   next
   for chrNum = 123 to 126
    str = replace(str,chr(chrNum),&quot; &quot;) 'removes {|}~
   next
   strRemPunc = str
  end function
  
  rSearchString = strRemPunc(request.form(&quot;SearchString&quot;))
  
  set Q = Server.CreateObject(&quot;ixsso.Query&quot;)
  set util = Server.CreateObject(&quot;ixsso.Util&quot;)

  Q.Query = &quot;$CONTENTS &quot;&rSearchString
  Q.Catalog = &quot;Web&quot;
  Q.SortBy = &quot;rank[d]&quot;
  Q.Columns = &quot;DocTitle, vpath, filename, size, write, characterization, rank&quot;
  Q.MaxRecords = 500
  util.AddScopeToQuery Q, &quot;\&quot;, &quot;deep&quot;
  Q.LocaleID = util.ISOToLocaleID(&quot;EN-US&quot;)

  set RS = Q.CreateRecordSet(&quot;nonsequential&quot;)

  RS.PageSize = PageSize
%>
(If a user searchs for nothing with this code it says:CreateRecordset error '80041605'
The query contained only ignored words.)

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top