Problem with Index Server Query

J

Jorge Varona

Greetings,
I am having a difficult time trying to get my index server query to work.
Here's the code:

// create a connection object and command object, to connect the Index
Server

System.Data.OleDb.OleDbConnection odbSearch = new
System.Data.OleDb.OleDbConnection();

System.Data.OleDb.OleDbCommand cmdSearch = new
System.Data.OleDb.OleDbCommand();

//assign the connecting string to the oledb connection object

odbSearch.ConnectionString = string.Format("Provider=MSIDXS;Data
Source={0};","intranet");

//assign connection to command object cmdSearch

cmdSearch.Connection = odbSearch;

//Query to search a free text string in the catalog in the contents of the
indexed documents in the catalog


try

{

cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization "

+" from scope('DEEP TRAVERSAL OF \"/\")' "

+" where FREETEXT('"+txtSearch.Text +"') "

+" and filename <> 'search.aspx' order by rank desc ";


odbSearch.Open();

int cnt;

try

{

OleDbDataReader rdrSearch = cmdSearch.ExecuteReader();


//dg1.DataSource=rdrSearch;

//dg1.DataBind();

//cnt=1;

while( rdrSearch.Read())

{

//Response.Write("OK<br>");

System.Diagnostics.Debug.WriteLine(rdrSearch[0].ToString());

getpagelink(rdrSearch);

}

}

catch(Exception ex)

{

System.Diagnostics.Debug.WriteLine(ex.Message);

}

odbSearch.Close();

}

Does anyone have any ideas why this wont work?
 
P

Peter O'Reilly

What do you mean by getting it to work? Code issues aside, have you indexed
your pages?
 
J

Jorge Varona

Background:
Yes they are indexed. The Catalog "INTRANET" is on the webserver's index
server and points to a shared folder on another server. When I test the page
to get results I get nothing. From the MMC->Query Form I get the listings
that I should be getting. I really don't want to wrap the ixsso to query the
index server being that EVERYONE seems to have gotten the query to work
using OLEDB.
 
M

Mark Saunders

Hi,

i was wondering if anyone had managed to use this type of query of manually cached properties?

i need to return and test on an expiredDate field but cannot seem to query anything but the default DocTitle etc.

I have cached the fields in Index Server, Stopped and Started the service and also rebuilt the catalogs.

Any help would be most appreciated!


thanks
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top