Problem with Index Server Query

Discussion in 'ASP .Net' started by Jorge Varona, Apr 19, 2004.

  1. Jorge Varona

    Jorge Varona Guest

    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?
     
    Jorge Varona, Apr 19, 2004
    #1
    1. Advertising

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

    --
    Peter O'Reilly
     
    Peter O'Reilly, Apr 19, 2004
    #2
    1. Advertising

  3. Jorge Varona

    Jorge Varona Guest

    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.

    "Peter O'Reilly" <!N!O!.S!P!AM!> wrote in message
    news:...
    > What do you mean by getting it to work? Code issues aside, have you

    indexed
    > your pages?
    >
    > --
    > Peter O'Reilly
    >
    >
     
    Jorge Varona, Apr 19, 2004
    #3
  4. 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

    ---
    Posted using Wimdows.net NntpNews Component -

    Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
     
    Mark Saunders, Jul 6, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. savvy
    Replies:
    1
    Views:
    418
    savvy
    Jan 16, 2006
  2. karthikeyavenkat
    Replies:
    2
    Views:
    629
    Bryce
    Mar 17, 2005
  3. abcdef
    Replies:
    0
    Views:
    120
    abcdef
    Oct 7, 2003
  4. Replies:
    1
    Views:
    121
    Bob Barrows [MVP]
    Sep 11, 2005
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    321
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page