Hello,
I'm trying this code written in
VB Script and its returning 0 records, inspite there are records. When I query the index server directly, I get records, but with this code i get 0 records. Can someone help?
Thanks in anticipation,
Rakesh
Dim ixQuery ' Index Server query object.
Set ixQuery = CreateObject("ixsso.Query")
If (Err.Description <> "") Then
MsgBox err.Description
End If
ixQuery.Columns = "filename,rank"
ixQuery.SortBy = "rank[d]"
ixQuery.Query = "Agreement"
ixQuery.Maxrecords = 1000
ixQuery.Catalog = "query://coiw2ptidbdev/system"
Dim util
Set util = CreateObject("ixsso.Util")
util.AddScopeToQuery ixQuery, "/", "deep"
If (Err.Description <> "") Then
MsgBox err.Description
End If
' Run the query (i.e. create the recordset).
Dim queryRS
'Set queryRS = CreateObject("ADODB.Recordset")
Set queryRS = ixQuery.CreateRecordSet("nonsequential")
' Check the query result. If it timed out or return no records, then show
' an appropriate message. Otherwise, show the hits.
If (Err.Description <> "") Then
MsgBox err.Description
Else
If queryRS Is Nothing Then
MsgBox "No records found"
ElseIf (ixQuery.QueryTimedOut) Then
MsgBox "Query Timedout"
ElseIf ( queryRS.EOF or queryRS.BOF or queryRS.RecordCount <= 0 ) Then
msgbox cstr(queryRS.RecordCount)
'MsgBox "No Matches found"
Else
queryRS.PageSize = rowCount
MsgBox cstr(queryRS.PageSize)
If (Err.Number <> 0) Then
MsgBox "Record Display Error: " & Err.Description
End If
End If
End If