I am having problem in "Index Search". Index search is searching the specified text in file or folder. Currently i am using csso dll and configuring index server on windows server 2003 and it is working fine,however when i configure the same on window server 2008 it's not working. Another problem with current csso dll is it's not searching for some reserved words. Please let me know if anybody have solution to make it work on Windows Server 2008 using cisso dll or any other way. any help would highly appreciated. - Cisso is microsoft Inter.cisso dll were we need to pass input parameters and it will return recordset .We need to register this dll to system32.
- In window server 2003, the result is shown correctly with the code written below, however same is not working and showing "no Catalog found" in windows server 2008
You can see the steps to confiure Index server in the link below:http://support.microsoft.com/kb/954822
Here is the code for above explanationHere is the code for above explanation
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSearch.Click ' ******************************************************************************************
' Index Server Stuff
' ******************************************************************************************
'
' *** Modifying the Form's Search Scope.
'
FormScope = "DefectSearch"
'
' *** Modifying the Number of Returned Query Results.
'
' You can set the number of query results returned on a single page
' using the variable below.
PageSize = Throttle
' *** Setting the Locale.
'
' The following line sets the locale used for queries. In most cases, this
' should match the locale of the server. You can set the locale below.
SiteLocale = "EN-US"
Dim Query As Cisso.CissoQuery = New Cisso.CissoQuery
Dim Util As Cisso.CissoUtil = New Cisso.CissoUtil
SearchBy = ddlfind.Text
If (Len(SearchString) > 0) Then
If (Len(SearchBy) > 0) Then
If ((SearchBy = ".") Or (SearchBy = " ")) Then
' don't need to do anything to the string
Else
SearchString = "( " & SearchString.Replace(" ", SearchBy) & " )"
End If
End If
End If
CompSearch = ""
' search by product ID
If bProductSearch Then
CompSearch = CompSearch & "(( @subject_id1 = " & SubjectID & " ) or ( @subject_id2 = " & SubjectID & " ) or ( @subject_id3 = " & SubjectID & " ) or ( @subject_id4 = " & SubjectID & " ) or ( @subject_id5 = " & SubjectID & " ) or ( @subject_id6 = " & SubjectID & " ) or ( @subject_id7 = " & SubjectID & " ) or ( @subject_id8 = " & SubjectID & " ) or ( @subject_id9 = " & SubjectID & " ) or ( @subject_id10 = " & SubjectID & " )) "
' End If
Else
' search by Stream
If (CLng(StreamID) <> CLng(-1)) Then
CompSearch = CompSearch & "( @Stream = " & StreamID & " ) "
'End If
End If
End If
' only get defect assigned to me
If rdMyDefects.Checked = True Then
hItems.Add("rdMyDefects", "True")
If (CompSearch <> String.Empty) Then
CompSearch = CompSearch & " & (( @developer = " & Session("Username") & " ) or ( @tester = " & Session("Username") & " ) or ( @installer = " & Session("Username") & " ) or ( @packager = " & Session("Username") & " ) or ( @support_owner = " & Session("Username") & " ) or ( @researcher = " & Session("Username") & " )) "
Else
CompSearch = "(( @developer = " & Session("Username") & " ) or ( @tester = " & Session("Username") & " ) or ( @installer = " & Session("Username") & " ) or ( @packager = " & Session("Username") & " ) or ( @support_owner = " & Session("Username") & " ) or ( @researcher = " & Session("Username") & " )) "
End If
Else
hItems.Add("rdMyDefects", "False")
End If
' MKH - 19 Aug 2002 - Important note, don't delete!
' Set dialect to 1 for backwards compatiblity. Win2K defaults to 2 for newer syntax. If not
' set to 1 Then the page, as coded will give erroneous results. If set to 2 the query syntax
' on this page must be re-coded.
If Not DoSQL Then
Session.Remove("RecordCount")
Query.Dialect = 1
Query.Query = CompSearch
Query.SortBy = "rank[d],write"
Query.MaxRecords = Throttle
Query.DefineColumn("defect_id (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 defect_id")
Query.DefineColumn("Stream (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 Stream")
Query.AllowEnumeration = True
'RSJ-This allows use of remote catalog on usalwaldata instead of using the local catalog on each webserver
'helps deliver same search results across all webservers
Dim RS As ADODB.Recordset
Dim convertedDataSet As DataSet
sSrvrName = Request.ServerVariables("SERVER_NAME")
If (InStr(sSrvrName, "answerlink") > 0 Or InStr(sSrvrName, "infor") > 0 Or InStr(sSrvrName, "usalwalweb1") > 0 Or InStr(sSrvrName, "usalwalweb2") > 0 Or _
InStr(sSrvrName, "usalwalweb3") > 0 Or InStr(sSrvrName, "usalwalweb4") > 0 Or InStr(sSrvrName, "infor365") > 0) Then
If InStr(sSrvrName, "qa") = 0 Then
'Query.Catalog = "query://usalwaldata/Web"
End If
End If
' Query.Catalog = "Defects"
Util.AddScopeToQuery(Query, Application("PublicMap") + "/" & FormScope & "/", "deep")
If Session("ALink_Display_Lang") <> "" Then
Query.LocaleID = Util.ISOToLocaleID(SiteLocale)
End If
'execute the search, check for errors creating recordset. If error, display message.
'On Error Resume Next
Try
RS = Query.CreateRecordset("nonsequential")
lblErrorDisplay.Text = String.Format(GetLocalResourceObject
If (RS.EOF) Then
lblErrorDisplay.Visible = False
noResultsDisplay.Visible = True
If Query.QueryIncomplete Then
tblError.Visible = True
topNavigationDiv.Visible = False
SearchResult.Visible = False
resultsDisplayDiv.Visible = False
downNavigationDiv.Visible = False
lblErrorDisplay.Text = GetLocalResourceObject("TooExpensive")
Else
If Query.QueryTimedOut Then
tblError.Visible = True
topNavigationDiv.Visible = False
SearchResult.Visible = False
resultsDisplayDiv.Visible = False
downNavigationDiv.Visible = False
lblErrorDisplay.Text = GetLocalResourceObject("TimeOutErr")
End If
End If
Else
convertedDataSet = ConvertToDataSet(RS)
End If
Err.Clear()
End Sub
v |