The following sample code shows how you can get a search index as a SearchIndexInfo object:
[C#]
using CMS.SiteProvider;
...
// Get search index object from database by searchIndexID SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(1); |
The following sample code shows how you can get a DataSet containing search indexes from the system:
[C#]
using System.Data; using CMS.SiteProvider;
...
string where = "IndexID < 10"; string orderby = "IndexDisplayName"; int topN = 10; string selectedColumns = "IndexID, IndexName, IndexSettings, IndexType";
// Get dataset of search indexes according to the given parameters DataSet ds = SearchIndexInfoProvider.GetSearchIndexes(where, orderby);
DataSet ds2 = SearchIndexInfoProvider.GetSearchIndexes(where, orderby, topN, selectedColumns); |
Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?api_getting_search_index_data.htm