Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32060

Index Server (File Search)

$
0
0
 

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.

  1. 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.
  2. 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
  3. 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.CissoQueryDim Util As Cisso.CissoUtil =New Cisso.CissoUtil


SearchBy = ddlfind.TextIf(Len(SearchString)>0)ThenIf(Len(SearchBy)>0)ThenIf((SearchBy =".")Or(SearchBy =" "))Then' don't need to do anything to the stringElse
            SearchString ="( "& SearchString.Replace(" ", SearchBy)&" )"EndIfEndIfEndIf

CompSearch =""' search by product IDIf 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 IfElse' search by StreamIf(CLng(StreamID)<>CLng(-1))Then
        CompSearch = CompSearch &"( @Stream = "& StreamID &" ) "'End IfEndIfEndIf' only get defect assigned to meIf rdMyDefects.Checked =TrueThen
    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")&" )) "EndIfElse
    hItems.Add("rdMyDefects","False")EndIf' 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.IfNot 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 webserversDim RS As ADODB.RecordsetDim convertedDataSet As DataSet

    sSrvrName = Request.ServerVariables("SERVER_NAME")If(InStr(sSrvrName,"answerlink")>0Or InStr(sSrvrName,"infor")>0Or InStr(sSrvrName,"usalwalweb1")>0Or InStr(sSrvrName,"usalwalweb2")>0Or _
         InStr(sSrvrName,"usalwalweb3")>0Or InStr(sSrvrName,"usalwalweb4")>0Or InStr(sSrvrName,"infor365")>0)ThenIf InStr(sSrvrName,"qa")=0Then'Query.Catalog = "query://usalwaldata/Web"EndIfEndIf' Query.Catalog = "Defects"
    Util.AddScopeToQuery(Query, Application("PublicMap")+"/"& FormScope &"/","deep")If Session("ALink_Display_Lang")<>""Then
        Query.LocaleID = Util.ISOToLocaleID(SiteLocale)EndIf'execute the search, check for errors creating recordset. If error, display message.'On Error Resume NextTry
        RS = Query.CreateRecordset("nonsequential")
                       lblErrorDisplay.Text =String.Format(GetLocalResourceObjectIf(RS.EOF)Then
        lblErrorDisplay.Visible =False
        noResultsDisplay.Visible =TrueIf Query.QueryIncomplete Then
            tblError.Visible =True
            topNavigationDiv.Visible =False
            SearchResult.Visible =False
            resultsDisplayDiv.Visible =False
            downNavigationDiv.Visible =False
            lblErrorDisplay.Text = GetLocalResourceObject("TooExpensive")ElseIf Query.QueryTimedOut Then
                tblError.Visible =True
                topNavigationDiv.Visible =False
                SearchResult.Visible =False
                resultsDisplayDiv.Visible =False
                downNavigationDiv.Visible =False
                lblErrorDisplay.Text = GetLocalResourceObject("TimeOutErr")EndIfEndIfElse
        convertedDataSet = ConvertToDataSet(RS)EndIf
                    Err.Clear()EndSub

v


Viewing all articles
Browse latest Browse all 32060

Trending Articles