locked
Microsoft Indexing Services-Document Search RRS feed

  • Question

  • User-16010594 posted

    Hi all,

    I m creating catalog on Microsoft Indexing Services on my machine's computer management console.

    This catalog need to be added/deleted from asp.net web application.

    I want to search document existing my web application's physical folder.

    Now i m getting error while removing scope of catalog which i dont want.In 

    the bellow line:

      Catalog.RemoveScope(Scope.Path);

    as 

    Troubleshooting Exceptions: System.ArgumentException

    plz help me to overcome this.

    Thanx.

    Wednesday, September 25, 2013 9:37 AM

Answers

  • User-166373564 posted

    Hi,

    I can hardly troubleshoot just according to your description above,

    Please refer to sample codes below, I think it will be good reference. To remove a search scope, call the method RemoveScope() on the Catalog object and pass along the path of the search scope.

    private void RemoveScope_Click(object sender, EventArgs e)
    {
        string CatalogName = ListOfCatalogs.SelectedItems[0].Text;
        string ScopePath =
             ListOfScopes.SelectedItems[0].SubItems[3].Text
        // ask the user to confirm the deletion of the search scope
        if (MessageBox.Show(this, ConfirmDeleteScope, ScopePath,
                     MessageBoxButtons.YesNo,
                     MessageBoxIcon.Question) == DialogResult.Yes)
        {
            // get the catalog handle
            ICatAdm Catalog = GetCatalog(CatalogName);
            // delete the selected scope
            Catalog.RemoveScope(ScopePath);
            // refresh the list of scopes
            FillScopeList(ListOfCatalogs.SelectedItems[0].Text);
        }
    }

    Learn how to add or remove a search scope to a catalog: http://www.codeproject.com/Articles/10871/Administrate-Indexing-Server-from-within-your-appl 

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 26, 2013 11:02 PM

All replies

  • User-166373564 posted

    Hi,

    I can hardly troubleshoot just according to your description above,

    Please refer to sample codes below, I think it will be good reference. To remove a search scope, call the method RemoveScope() on the Catalog object and pass along the path of the search scope.

    private void RemoveScope_Click(object sender, EventArgs e)
    {
        string CatalogName = ListOfCatalogs.SelectedItems[0].Text;
        string ScopePath =
             ListOfScopes.SelectedItems[0].SubItems[3].Text
        // ask the user to confirm the deletion of the search scope
        if (MessageBox.Show(this, ConfirmDeleteScope, ScopePath,
                     MessageBoxButtons.YesNo,
                     MessageBoxIcon.Question) == DialogResult.Yes)
        {
            // get the catalog handle
            ICatAdm Catalog = GetCatalog(CatalogName);
            // delete the selected scope
            Catalog.RemoveScope(ScopePath);
            // refresh the list of scopes
            FillScopeList(ListOfCatalogs.SelectedItems[0].Text);
        }
    }

    Learn how to add or remove a search scope to a catalog: http://www.codeproject.com/Articles/10871/Administrate-Indexing-Server-from-within-your-appl 

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 26, 2013 11:02 PM
  • User-16010594 posted

    Thanx for reply .

    But i m getting error in the same code as i refered http://www.codeproject.com/Articles/10871/Administrate-Indexing-Server-from-within-your-appl.

    So plz let me kno further how to solve this.

    Monday, September 30, 2013 6:01 AM
  • User-166373564 posted

    Hi,

    You could download the Indexing server admin console (sample) in the link above, and test it on your side, check whether it still has same problem,

    then you can give some modifications according to your requirements.

    Regards

     

    Monday, September 30, 2013 9:26 PM
  • User-16010594 posted

    Hi,

    Now i m using below code for searching Files on remote machine with the help of microsoft indexing services catalog.

    catalog=MyCatalog resides on remote machine.

    My question is : this query returns null and dont give any error.

    So i m not able to figure out why it gives null.

    Do i need to add something like usernname & pwd for remote machine?

    CissoQueryClass q = new CissoQueryClass();


    CissoUtilClass util = new CissoUtilClass();

    OleDbDataAdapter da = new OleDbDataAdapter();


    System.Data.DataSet ds = new System.Data.DataSet("IndexServerResults");

    q.Query = TextBox1.Text;


    q.DefineColumn("testing = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 testing");

    q.Catalog = "query://REmoteserver/MyCatalog";


    q.SortBy = "rank[d]";


    q.Columns = "rank, path, size, testing";

    util.AddScopeToQuery(q, @"D:\test\index-me\", "deep");

    util.AddScopeToQuery(q, @"'" + strPath + "'", "deep");

    object o = q.CreateRecordset("nonsequential");


    da.Fill(ds, o, "IndexServerResults");

    DataGrid1.DataSource = ds;


    DataGrid1.DataBind();

    Thursday, October 10, 2013 2:48 AM
  • User-16010594 posted

    I m using below line of code for accessing remote server catalog document search

    select DocTitle,Filename,Size,PATH,URL from remoteservername.mycatalog..Scope()

    but that is not returning records.

    I m in confusion what else is needed as there is no err no permission message.

    Monday, October 21, 2013 6:38 AM