Discussion:
No results if specifying directory in SCOPE in Index Server
(too old to reply)
Zolt
2007-09-10 19:28:01 UTC
Permalink
Hi,

I need help solving a pretty frustrating problem I have!!!

I have a catalog named "MySite.com".
I have some ASPX pages (VB.NET 2.0) that query the index server.
If I sepcify a directory in the DEEP TRAVERSAL part of the SCOPE section, I
don't get any results. If I leave empty the directory name, I retrieve the
proper files as expected. I have done some tests, and if I leave the scope
directory empty, I get results that are in withing the scope of my other
tests that don't give any result.
Here is what my code looks like :
Dim cn As System.Data.OleDb.OleDbConnection
Dim cmd As System.Data.OleDb.OleDbDataAdapter
Dim ResultsDataSet As Data.DataSet
Dim connString As String
Dim strQuery As String
Dim strSearch As String
Dim strScope As String
Dim strCatalog As String

If Me.RadAboutUs.Checked = True Then
strScope = "/about_us"
ElseIf Me.RadClients.Checked = True Then
strScope = "/clients"
Else
strScope = ""
End If

strCatalog = "MySite.com"
strSearch = Me.txtSearch.text
strQuery = String.Format("SELECT rank, Path, doctitle, filename,
Characterization, write, size FROM SCOPE('DEEP TRAVERSAL OF ""{0}""') WHERE
FREETEXT( '{1}' ) ORDER BY RANK DESC ", strScope, strSearch)

connString = String.Format("Provider=MSIDXS;Data Source='{0}'", strCatalog)
cn = New System.Data.OleDb.OleDbConnection(connString)
cmd = New System.Data.OleDb.OleDbDataAdapter(strQuery, cn)
ResultsDataSet = New Data.DataSet()

cmd.Fill(ResultsDataSet)
For Each ResultRow As Data.DataRow In ResultsDataSet.Tables(0).Rows
...
Next

Anybody has an ideas?

Thanks,
Zolt
Zolt
2007-09-14 15:24:00 UTC
Permalink
OK Figured it out.
I found an article that explains properly how to create a Web Catalog - the
folders were added at the directory level of the catalog, not at the site
definition is IIS Manager. (Index this resource)
Post by Zolt
Hi,
I need help solving a pretty frustrating problem I have!!!
I have a catalog named "MySite.com".
I have some ASPX pages (VB.NET 2.0) that query the index server.
If I sepcify a directory in the DEEP TRAVERSAL part of the SCOPE section, I
don't get any results. If I leave empty the directory name, I retrieve the
proper files as expected. I have done some tests, and if I leave the scope
directory empty, I get results that are in withing the scope of my other
tests that don't give any result.
Dim cn As System.Data.OleDb.OleDbConnection
Dim cmd As System.Data.OleDb.OleDbDataAdapter
Dim ResultsDataSet As Data.DataSet
Dim connString As String
Dim strQuery As String
Dim strSearch As String
Dim strScope As String
Dim strCatalog As String
If Me.RadAboutUs.Checked = True Then
strScope = "/about_us"
ElseIf Me.RadClients.Checked = True Then
strScope = "/clients"
Else
strScope = ""
End If
strCatalog = "MySite.com"
strSearch = Me.txtSearch.text
strQuery = String.Format("SELECT rank, Path, doctitle, filename,
Characterization, write, size FROM SCOPE('DEEP TRAVERSAL OF ""{0}""') WHERE
FREETEXT( '{1}' ) ORDER BY RANK DESC ", strScope, strSearch)
connString = String.Format("Provider=MSIDXS;Data Source='{0}'", strCatalog)
cn = New System.Data.OleDb.OleDbConnection(connString)
cmd = New System.Data.OleDb.OleDbDataAdapter(strQuery, cn)
ResultsDataSet = New Data.DataSet()
cmd.Fill(ResultsDataSet)
For Each ResultRow As Data.DataRow In ResultsDataSet.Tables(0).Rows
...
Next
Anybody has an ideas?
Thanks,
Zolt
Loading...