RE: Index server refuses to generate characterizations



Hi

This may be a silly question, but have you made the characterization
retrievable (cached) ?
I think it's query-only in the catalog by default, not readable.

http://msdn2.microsoft.com/en-us/library/ms951672.aspx

To add meta properties to the property cache, invoke the Index Server
Microsoft Management Console (MMC) administration tool. Open the catalog and
select Properties from the tree view. Select the property to be added and
then right-click it. Then click Properties and check the Cached box.

Documents must be reindexed.

Eric

"jeremypollack" wrote:

Hey all,

Trying to do something simple here. I created a catalog for my site,
and am trying to query it. Generally, querying seems to work, but the
one thing I cannot get it to do is retrieve characterizations.

Yes, I did go to Catalog->Properties->Generation, turn off "Inherit
above settings from service" and turn on "Generate abstracts"
Yes, I have restarted the service and done a Rescan (Full) on all of
my indexed directories.

Here is my code :

protected void btnSearch_Click(object sender, EventArgs e)
{
lblOut.Text = "";

OleDbConnection connection = null;
OleDbCommand command = null;
OleDbDataReader reader = null;
string searchText = txtSearch.Text.Replace("'", "''");

connection = new OleDbConnection();
connection.ConnectionString = "Provider=MSIDXS; Data Source=
\"Babble\";";
connection.Open();

command = connection.CreateCommand();
command.CommandText = "select * from WEBINFO where
FREETEXT(Contents, '" + searchText + "') order by rank desc ";
command.CommandType = CommandType.Text;

reader = command.ExecuteReader();

while (reader.Read())
{
lblOut.Text += ((string)reader["path"]) +
((string)reader["filename"]) + " : " +
((string)reader["characterization"]) + "<br/><br/>";
}

reader.Dispose();
connection.Dispose();
}

When I click the button to do a search, I get the following error on
the line where I write the output to lblOut:
Unable to cast object of type 'System.DBNull' to type 'System.String'.

(and yes, this is test code, which is why I'm not doing any validation
checks)

Anybody know what I could be doing wrong?

--Jeremy


.


Loading