How do I exclude certain files from the Index Serv

Results 1 to 3 of 3

Thread: How do I exclude certain files from the Index Serv

  1. #1
    Join Date
    Dec 1969

    Default How do I exclude certain files from the Index Serv

    I am setting up Index Server on a Windows 2000 machine. I am using the ADO way of connecting to it, and I got it all to work fine. Basically I am creating a recordset to loop through the records and display information on them, and I also added a paging mechanism on it. Like this:<BR>...<BR> Set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.ConnectionString = "provider=msidxs; Data Source=English"<BR> objConn.Open<BR> Set objRS = Server.CreateObject("ADODB.RecordSet")<BR> objRS.CursorLocation = 3 &#039;adUseClient<BR> objRS.CacheSize = 10<BR> objRS.Open strSearch, objConn, 1, 1<BR> objRS.PageSize = 10<BR>...<BR><BR>The problem is I want to exclude certain files from being shown here BUT I STILL WANT THEM TO BE INDEXED THROUGH THE SERVER. Meaning that I can not use the IIS Console to just unlick the "Index this" file or directory.<BR><BR>Any ideas on how to structure my query in the recordset to exclude certain file types (like *.inc) or folders, or specific files?<BR><BR>Thanks.<BR><BR>PS: the strQuery is done through this function:<BR><BR>...<BR>Function BuildQuery()<BR> &#039;-- build SQL query string for Index Server ADO query<BR> SQL = "SELECT DocTitle, Filename, Vpath, Size, Write, Characterization, Rank FROM "<BR> If strScope = "" Then<BR> SQL = SQL & "SCOPE() "<BR> Else<BR> SQL = SQL & "SCOPE(&#039;DEEP TRAVERSAL OF " & QUOT & strScope & QUOT & "&#039;)"<BR> End if<BR> strQText = strQuery<BR> If InStr(strQText, " ") &#062; 0 Or InStr(strQText, "&#039;") &#062; 0 Then<BR> blnAddedQ = False<BR> If Left(strQText, 1) &#060;&#062; QUOT Then<BR> strQText = QUOT & strQText<BR> blnAddedQ = True<BR> End If<BR> If Right(strQText, 1) &#060;&#062; QUOT Then<BR> strQText = strQText & QUOT<BR> blnAddedQ = True<BR> End If<BR> If blnAddedQ Then<BR> intQPos = Instr(2, strQText, QUOT)<BR> Do While intQPos &#062; 0 And intQPos &#060; Len(strQText)<BR> strQText = Left(strQText, intQPos - 1) & " " & Mid(strQText, intQPos + 1)<BR> intQPos = Instr(2, strQText, QUOT)<BR> Loop<BR> End If<BR> End If<BR> SQL = SQL & " WHERE CONTAINS (&#039;" & strQText & "&#039;) &#062; 0 ORDER BY Rank DESC"<BR> BuildQuery = SQL<BR>End Function<BR>...

  2. #2
    yy Guest

    Default RE: How do I exclude certain files from the Index

    If you don&#039;t want to show these pages, why index?

  3. #3
    Join Date
    Dec 1969

    Default Because I search for them internally

    We have a public search page and internal one. In the internal one you can search for anything. But I don&#039;t want that on the public site.<BR><BR>Any ideas then on solving this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts