Fog Creek Software
Discussion Board




Search times out

Excellent product.

One problem: after I upgraded to the 3.x.x, "Full text of case" searches *always* timeout. "Title of case" searches work just fine.

We use SQL Server 7.0.

I can get search to return something - i.e. not timeout - if I remove title searching in GetSQLSearchFull. Here's the changed bit of code from CBugList.asp:

        If g_fMSSQL Then
            ' *** comment the following line ***
            ' sTitle = " SELECT TOP 50 ixBug FROM Bug where sTitle LIKE ? OR ( Bug.ixBug = " & ixBug & ") "
            sTitle = ""
            sFull = "  SELECT DISTINCT TOP 50 Bug.ixBug as ixBug " & _
                " FROM (Bug INNER JOIN BugEvent ON Bug.ixBug = BugEvent.ixBug) " & _
                " WHERE Contains(BugEvent.s, " & SqlQuote(QuoteForContains(QuoteForLike(sSearchFor))) & ") "

            If Not fClosedBugsToo Then
                ' *** comment the following line ***
                'sTitle = sTitle & " AND Bug.fOpen = 1 "
                sFull = sFull & " AND Bug.fOpen = 1 "
            End If
            
            ' *** and edit this to remove sTitle ***
            s = "SELECT TOP 50 " & GetSQLFields( bixOnly ) & _
                "  FROM " & GetSQLTables( False ) & _
                " WHERE (ixBug IN " & _
                " ( " & sFull & " ))"
            '    " ( " & sTitle & _
            '    "    UNION " & _
            '    sFull & " ))"

It can't be a full text indexing issue, since that part of the query is working. Could it have something to do with the "LIKE ?" clause in the title query?

I'll let you guys figure it out.

I like to search
Thursday, August 21, 2003

*  Recent Topics

*  Fog Creek Home