indexing service

A

ash

i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it?

thx
 
A

Alan M

need to see code
i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it?

thx
 
A

ash

<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring
%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory, path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced "

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results: "

%>

<table border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date / Time</b></td><td><b>Size</b></td><td><b>Relevance</b></td><td><b>Directory</b></td></tr>

<%
do while not rs.EOF

response.write "<tr><td>" & rs("doctitle") & "</td><td>" & "<a href=" & "'" & rs("path") & "'" & ">" & rs("filename") & "</a>" & "</td><td>" & rs("write") & "</td><td>" & rs("size") & "</td><td>" & rs("rank") & "</td><td>" & rs("directory") & "</td></tr>"

rs.movenext
loop

response.write "</table>"
set rs=nothing
set q=nothing
set util=nothing
%>

</body>
</html>

"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
need to see code
i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it?

thx
 
A

Alan M

Your search string needs to have the correct syntax.

searchstring = "$CONTENTS "& searchstring

see below

<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring

searchstring = "$CONTENTS "& searchstring

%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory, path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced "

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results: "

%>

<table border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date / Time</b></td><td><b>Size</b></td><td><b>Relevance</b></td><td><b>Directory</b></td></tr>

<%
do while not rs.EOF

response.write "<tr><td>" & rs("doctitle") & "</td><td>" & "<a href=" & "'" & rs("path") & "'" & ">" & rs("filename") & "</a>" & "</td><td>" & rs("write") & "</td><td>" & rs("size") & "</td><td>" & rs("rank") & "</td><td>" & rs("directory") & "</td></tr>"

rs.movenext
loop

response.write "</table>"
set rs=nothing
set q=nothing
set util=nothing
%>

</body>
</html>

"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
need to see code
i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it?

thx
 
A

Alan M

Also I would change path to vpath, if you want to return the http path and not the file system path
<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring
%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory, path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced "

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results: "

%>

<table border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date / Time</b></td><td><b>Size</b></td><td><b>Relevance</b></td><td><b>Directory</b></td></tr>

<%
do while not rs.EOF

response.write "<tr><td>" & rs("doctitle") & "</td><td>" & "<a href=" & "'" & rs("path") & "'" & ">" & rs("filename") & "</a>" & "</td><td>" & rs("write") & "</td><td>" & rs("size") & "</td><td>" & rs("rank") & "</td><td>" & rs("directory") & "</td></tr>"

rs.movenext
loop

response.write "</table>"
set rs=nothing
set q=nothing
set util=nothing
%>

</body>
</html>

"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
need to see code
i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it?

thx
 
A

ash

I try it, but still no results is found when i use ASP, but when I search in the "information form" of Indexing service, it could find some results.
Thx
"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
Also I would change path to vpath, if you want to return the http path and not the file system path
<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring
%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory, path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced "

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results: "

%>

<table border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date / Time</b></td><td><b>Size</b></td><td><b>Relevance</b></td><td><b>Directory</b></td></tr>

<%
do while not rs.EOF

response.write "<tr><td>" & rs("doctitle") & "</td><td>" & "<a href=" & "'" & rs("path") & "'" & ">" & rs("filename") & "</a>" & "</td><td>" & rs("write") & "</td><td>" & rs("size") & "</td><td>" & rs("rank") & "</td><td>" & rs("directory") & "</td></tr>"

rs.movenext
loop

response.write "</table>"
set rs=nothing
set q=nothing
set util=nothing
%>

</body>
</html>

"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
need to see code
i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it?

thx
 
S

Slim

I copied your page and added this line and it worked for me

searchstring = "$CONTENTS "& searchstring


I try it, but still no results is found when i use ASP, but when I search in
the "information form" of Indexing service, it could find some results.
Thx
"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
Also I would change path to vpath, if you want to return the http path and
not the file system path
<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring

****
searchstring = "$CONTENTS "& searchstring

****

%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory, path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced
"

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results:
"

%>

<table
border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date /
Time</b></td><td><b>Size</b></td><td><b>Relevance</b></td><td><b>Directory</b></td></tr>

<%
do while not rs.EOF

response.write "<tr><td>" & rs("doctitle") & "</td><td>" & "<a
href=" & "'" & rs("path") & "'" & ">" & rs("filename") & "</a>" &
"</td><td>" & rs("write") & "</td><td>" & rs("size") & "</td><td>" &
rs("rank") & "</td><td>" & rs("directory") & "</td></tr>"

rs.movenext
loop

response.write "</table>"
set rs=nothing
set q=nothing
set util=nothing
%>

</body>
</html>

"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
need to see code
i'm using the indexing service and CreateRecordSet("nonsequential")
in asp.......and i cant retrieve the record although the keywords is
matched. Does anybody know how to solve it?

thx
 
A

ash

I redirect my indexing service to an specific path, is it matter? Because i
try only the default wwwroot, it works(althought not all data are retrieve).



Best Regards, Stephy Ku Innovation Square 2756 6618
Slim said:
I copied your page and added this line and it worked for me

searchstring = "$CONTENTS "& searchstring


I try it, but still no results is found when i use ASP, but when I search in
the "information form" of Indexing service, it could find some results.
Thx
"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
Also I would change path to vpath, if you want to return the http path and
not the file system path
<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring

****
searchstring = "$CONTENTS "& searchstring

****

%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory, path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced
"

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results:
"

%>

<table
border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date /
 
S

Slim

ash said:
I redirect my indexing service to an specific path, is it matter? Because i
try only the default wwwroot, it works(althought not all data are
retrieve).



maybe not all folders have indeing enabled in IIS service manager

Best Regards, Stephy Ku Innovation Square 2756 6618
"Slim" <[email protected]> ¦b¶l¥ó ¤¤
¼¶¼g...
I copied your page and added this line and it worked for me

searchstring = "$CONTENTS "& searchstring


I try it, but still no results is found when i use ASP, but when I search in
the "information form" of Indexing service, it could find some results.
Thx
"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
Also I would change path to vpath, if you want to return the http path and
not the file system path
<html>
<%
' This section sets the various configuration variables

formscope="/"
pagesize = 5000
maxrecords=5000
searchstring=request.form("searchstring")
catalogtosearch="web"
searchrankorder="rank[d]"
origsearch=searchstring

****
searchstring = "$CONTENTS "& searchstring

****

%>

<%
'This section performs the query

dim q
dim util
set q=server.createobject("ixsso.query")
set util=server.createobject("ixsso.util")
q.query=searchstring
q.catalog=catalogtosearch
q.sortby=searchrankorder
q.columns="doctitle, filename, size, write, rank, directory,
path"
q.maxrecords=maxrecords
%>

<%
'This section displays the results

set rs=q.createrecordset("nonsequential")
rs.pagesize=pagesize
response.write"<p>Your search for <b>" & origsearch & "</b> produced
"

if rs.recordcount=0 then response.write "no results"
if rs.recordcount=1 then response.write "1 result: "
if rs.recordcount>1 then response.write(rs.recordcount) & " results:
"

%>

<table
border=1><tr><td><b>Title</b></td><td><b>Filename</b></td><td><b>Date /
Time said:
<%
do while not rs.EOF

response.write "<tr><td>" & rs("doctitle") & "</td><td>" & "<a
href=" & "'" & rs("path") & "'" & ">" & rs("filename") & "</a>" &
"</td><td>" & rs("write") & "</td><td>" & rs("size") & "</td><td>" &
rs("rank") & "</td><td>" & rs("directory") & "</td></tr>"

rs.movenext
loop

response.write "</table>"
set rs=nothing
set q=nothing
set util=nothing
%>

</body>
</html>

"Alan M" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
need to see code
i'm using the indexing service and CreateRecordSet("nonsequential")
in asp.......and i cant retrieve the record although the keywords is
matched. Does anybody know how to solve it?

thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,591
Members
45,103
Latest member
VinaykumarnNevatia
Top