Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 3.x: Developing with Sitefinity > Indexing troubles

Indexing troubles

  • Nigel avatar

    Posted on Jun 5, 2008 (permalink)

    Hi

    I've got a couple issues I've haven't been able to resolve myself with indexes.

    1. Page Index - All Pages
    I thought that the page index actually spidered the site. It seems not so, but indexes pages that appear in the site map tree. Thus links to any dynamically generated pages (e.g. a news list or blog post list with a full content page) don't get indexed. Am I missing something or is this expected behavior? If the latter, is there any way around it beside using a custom indexing tool?

    2. Blog Index
    This seems to be limited to the default blog provider. Is there any way to make it index custom blog providers, similar to how you can set up an RSS feeds for different providers? I've studied config pretty closely but can't find anywhere this might be set.

    Thanks for any assistance.

    Reply

  • Nikola Nikola admin's avatar

    Posted on Jun 6, 2008 (permalink)

    Hi Nigel,

    Yes, this is the expected behavior. The PageIndex spiders the pages and indexes their contents, it skips the news and blogs because there is a NewsIndex and BlogIndex available in Sitefinity 3.2 SP2.

    You can create an index containing all three types of indexes and index the contents of the pages, news items and blog items within a single Index.

    About the BlogIndex custom provider, it's not exposed as a property by the UI like in the RSS Feeds. But like other modules, for example News, it shouldn't be a problem to have multiple providers. We'll provide you with a brief example shortly.

    All the best,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Nigel avatar

    Posted on Jun 11, 2008 (permalink)

    Hi Nikola

    Thanks for the information. Any luck with custom BlogIndex provider example?

    Reply

  • Nikola Nikola admin's avatar

    Posted on Jun 11, 2008 (permalink)

    Hello Nigel,

    Custom BlogIndex provider example will be provided at the beginning of next week.
    Don't hesitate to contact us if you have any other questions.

    Kind regards,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Nikola Nikola admin's avatar

    Posted on Jun 20, 2008 (permalink)

    Hi Nigel,

    Sorry for the delay.
    Find the attached archive which contains a very simple implementation of CustomIndexProvider. It is not a custom BlogIndexProvider because implementing a custom provider for blogs is more specific to the blog object itself.

    Generally, building index provider depends on what sort of data and objects are going to be indexed. The current built-in BlogIndexProvider derives from ContentIndexProvider, which is responsible for providing methods and functionalities to index Generic Content items such as News, Blogs etc.

    The provided attached code sample shows implementation of index provider for indexing external data or custom modules which implements custom objects and data retrieval methods.

    Extract the archive contents as described in the included readme.txt. The sample itself is a very basic example and can be improved or modified to meet specific requirements.

    Let me know if it is of any use for your scenario, if this is not the case please provide us with more detailed information, for example:
    - What features or customizations do you want to implement?
    - Are you using the built-in blogs module or you need an Index Provider for custom module?

    Best wishes,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
    Attached files

    Reply

  • Nigel avatar

    Posted on Jun 25, 2008 (permalink)

    Hi Nikola

    Thank you for the information, it helped point me in the right direction. I ended up inheriting from ContentIndexProvider and using basically the same code as the BlogIndexProvider, which works perfectly as my custom blog provider uses the built-in module.

    However, I still have a question you might be able to give me a quick answer on... I want my indexer to index a couple of LongText meta-fields that I have defined for my provider. I had assumed that I would just add them to the MetaFields string array:

    protected override string[] MetaFields 
        { 
            get 
            { 
                if (base.MetaFields.Length > 0) 
                { 
                    return base.MetaFields; 
                } 
                return new string[] { "Title""Author""Publication_Date""Ingredients""Summary" }; 
            } 
        } 
     

    But this has no effect. Text in those meta fields doesn't get indexed. Can you tell me what I'm doing wrong?

    Thanks again.

    Reply

  • Nikola Nikola admin's avatar

    Posted on Jun 26, 2008 (permalink)

    Hello Nigel,

    I'm glad the sample helped you. As for the meta fields, "string[] MetaFields" indicates which fields should be taken from the contents of the item. If no contents are provided for those fields no data would be indexed.

    The additional fields you want to be included, have to be first created as described in the User Manual, Section Customizing Modules > Adding Custom Meta Fields.

    Please refer to the mentioned section of the User Manual and let us know if this is the case.

    Regards,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Nigel avatar

    Posted on Jul 15, 2008 (permalink)

    Hi Nikola

    Thanks for your reply. I'm familiar with creating custom meta fields, however, I still can't get them indexed. All of these fields are populated for each post.

    I thought maybe the issue related to the check for base.MetaFields, but commenting this out makes no difference. Any other suggestions? Below is a copy of my index provider.

    Thanks

        public class RecipeIndexProvider : ContentIndexProvider 
        { 
            // Fields 
            private IBlog blogImpl; 
     
            // Methods 
            private IBlog GetBlog(IContent item) 
            { 
                if ((this.blogImpl == null) || (this.blogImpl.ID != item.ParentID)) 
                { 
                    this.blogImpl = ((IBlogProvider) base.Manager.Provider).GetBlog(item.ParentID); 
                    if (this.blogImpl == null
                    { 
                        throw new ArgumentException("Invalid Blog ID"); 
                    } 
                } 
                return this.blogImpl; 
            } 
     
            protected override string GetDefaultContentProvider() 
            { 
                return "Recipes"// BlogManager.DefaultContentProvider; 
            } 
     
            protected override string GetItemUrl(IContent contentItem, string singleItemUrl, CultureInfo culture) 
            { 
                if (string.IsNullOrEmpty(singleItemUrl)) 
                { 
                    IBlog blog = this.GetBlog(contentItem); 
                    if (string.IsNullOrEmpty(blog.PostPage)) 
                    { 
                        singleItemUrl = blog.BlogPage; 
                    } 
                    else 
                    { 
                        singleItemUrl = blog.PostPage; 
                    } 
                    if (string.IsNullOrEmpty(singleItemUrl)) 
                    { 
                        singleItemUrl = string.Format("~/{0}", blog.Name); 
                    } 
                } 
                return base.GetItemUrl(contentItem, singleItemUrl, culture); 
            } 
     
            // Properties 
            protected override string ContentItemKeyImpl 
            { 
                get 
                { 
                    return "RecipeItem"
                } 
            } 
     
            protected override string ContentProviderKeyImpl 
            { 
                get 
                { 
                    return "RecipeProv"
                } 
            } 
     
            public override string Description 
            { 
                get 
                { 
                    return "Indexes the recipe section."
                } 
            } 
     
            public override string FilterExpression 
            { 
                get 
                { 
                    return "Title='InVariantCulture';"
                } 
            } 
     
            protected override string[] MetaFields 
            { 
                get 
                { 
                    if (base.MetaFields.Length > 0) 
                    { 
                        return base.MetaFields; 
                    } 
                    return new string[] { "Title""Ingredients""RecipeSummary" }; 
                } 
            } 
     
            public override string Name 
            { 
                get 
                { 
                    return "RecipeIndex"
                } 
            } 
        } 

    Reply

  • Nigel avatar

    Posted on Jul 15, 2008 (permalink)

    Nevermind, I figured it out. Have implemented my own IIndexerInfo to get more control over the processing of metafields.

    Reply

  • Nikola Nikola admin's avatar

    Posted on Jul 16, 2008 (permalink)

    Hi Nigel,

    Glad you solve it. You figured it out right, the IIndexerInfo implementation through its' methods GetData() and GetMetaData() is returning the data to be indexed.

    Custom IndexerInfo like the one I previously posted here, gives you more flexibility to implement custom logic and control over the data passed.

    Don't hesitate to contact us if you have other questions.

    All the best,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Posted on Jul 18, 2008 (permalink)

    Is there any more information I can get on doing custom searches.  I have extended the events module with some more metafields and I am wanting to beable to search through depending on certain metafield values.

    Reply

  • Nikola Nikola admin's avatar

    Posted on Jul 21, 2008 (permalink)

    Hello Chris,

    There is no such built-in functionality and the term to search for is applied to all indexed content including metafields.
    If you use unique values in the metafields then you should be able to include this value and search term joined by AND operator to perform the search.

    Best wishes,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Venkat avatar

    Posted on Dec 16, 2008 (permalink)

    Hi Nigel,

    Can you please send me the code which  worked for you.I want to implement a custom index provider for Blogs.

    Thanks
    Venkat

    Reply

  • Nigel avatar

    Posted on Dec 16, 2008 (permalink)

    Hi Venkat

    Here's the code from the 4 classes in my custom index provider.

    RecipeIndexProvider - please note you will need to change the returned value of GetDefaultContentProvider to whatever your custom blog provider name is. Also note you will need to adjust all the public properties to suit.
    using System; 
    using System.Collections.Generic; 
    using System.Text; 
    using System.Globalization; 
    using Telerik.Cms.Engine; 
    using Telerik.Blogs; 
     
    namespace RecipeIndexer 
        public class RecipeIndexProvider : ContentIndexProvider 
        { 
            // Fields 
            private IBlog blogImpl; 
     
            // Methods 
            private IBlog GetBlog(IContent item) 
            { 
                if ((this.blogImpl == null) || (this.blogImpl.ID != item.ParentID)) 
                { 
                    this.blogImpl = ((IBlogProvider) base.Manager.Provider).GetBlog(item.ParentID); 
                    if (this.blogImpl == null
                    { 
                        throw new ArgumentException("Invalid Blog ID"); 
                    } 
                } 
                return this.blogImpl; 
            } 
     
            protected override string GetDefaultContentProvider() 
            { 
                return "Recipes"// BlogManager.DefaultContentProvider; 
            } 
     
            protected override string GetItemUrl(IContent contentItem, string singleItemUrl, CultureInfo culture) 
            { 
                if (string.IsNullOrEmpty(singleItemUrl)) 
                { 
                    IBlog blog = this.GetBlog(contentItem); 
                    if (string.IsNullOrEmpty(blog.PostPage)) 
                    { 
                        singleItemUrl = blog.BlogPage; 
                    } 
                    else 
                    { 
                        singleItemUrl = blog.PostPage; 
                    } 
                    if (string.IsNullOrEmpty(singleItemUrl)) 
                    { 
                        singleItemUrl = string.Format("~/{0}", blog.Name); 
                    } 
                } 
                return base.GetItemUrl(contentItem, singleItemUrl, culture); 
            } 
     
            protected override Telerik.Framework.Search.IIndexerInfo GetIndexerInfo(string path, IContent content, CultureInfo cult) 
            { 
                return new RecipeIndexerInfo(path, content, this.MetaFields, cult); 
            } 
      
            // Properties 
            protected override string ContentItemKeyImpl 
            { 
                get 
                { 
                    return "RecipeItem"
                } 
            } 
     
            protected override string ContentProviderKeyImpl 
            { 
                get 
                { 
                    return "RecipeProv"
                } 
            } 
     
            public override string Description 
            { 
                get 
                { 
                    return "Indexes the recipe section."
                } 
            } 
     
            public override string FilterExpression 
            { 
                get 
                { 
                    return "Title='InVariantCulture';"
                } 
            } 
     
            protected override string[] MetaFields 
            { 
                get 
                { 
                    //if (base.MetaFields.Length > 0) 
                    //{ 
                    //    return base.MetaFields; 
                    //} 
                    return new string[] { "Title""Ingredients""RecipeSummary""Vegetarian""LowFat" }; 
                } 
            } 
     
            public override string Name 
            { 
                get 
                { 
                    return "RecipeIndex"
                } 
            } 
        } 
     
     

    RecipeIndexerInfo - note GetMetaData. This is where you add and format your meta data as necessary for indexing.
    using System; 
    using System.Collections.Generic; 
    using System.Text; 
    using System.Globalization; 
    using Telerik.Cms.Engine; 
    using Telerik.Blogs; 
    using Telerik.Framework.Search; 
    using System.Reflection; 
     
    namespace RecipeIndexer 
        public class RecipeIndexerInfo: IIndexerInfo 
        { 
            // Fields 
            protected IContent content; 
            private CultureInfo culture; 
            protected string[] metaFields; 
            private string mimeType; 
            private string path; 
     
            // Methods 
            public RecipeIndexerInfo(string path, IContent content, string[] metaFields) : this(path, content, metaFields, null
            { 
            } 
     
            public RecipeIndexerInfo(string path, IContent content, string[] metaFields, CultureInfo culture) 
            { 
                this.path = path; 
                this.content = content; 
                if (metaFields == null
                { 
                    this.metaFields = new string[0]; 
                } 
                else 
                { 
                    this.metaFields = metaFields; 
                } 
                this.culture = culture; 
            } 
     
            public virtual byte[] GetData() 
            { 
                if (this.culture != null
                { 
                    if (this.culture.Name.Length == 0) 
                    { 
                        PropertyInfo property = this.content.GetType().GetProperty("LangID"); 
                        if (property != null
                        { 
                            property.SetValue(this.content, 0x7f, null); 
                        } 
                    } 
                    else 
                    { 
                        this.content.Language = this.culture.Name; 
                    } 
                } 
                string content = (stringthis.content.Content; 
                if (this.metaFields.Length > 0) 
                { 
                    content = content + this.GetMetaData(); 
                } 
                return this.Encoding.GetBytes(content); 
            } 
     
            protected virtual string GetMetaData() 
            { 
                StringBuilder builder = new StringBuilder(); 
                foreach (string str in this.metaFields) 
                {                 
                    builder.AppendLine(); 
                    builder.Append("<"); 
                    builder.Append(str); 
                    builder.Append(">"); 
                     
                    switch (str) 
                    { 
                        case "Ingredients"
                            builder.Append(DecodeIngredients((stringthis.content.GetMetaData(str))); 
                            break
                        case "Vegetarian"
                            if (DecodeStringBool((stringthis.content.GetMetaData(str))) 
                                builder.Append(str.ToLower()); 
                            break
                        case "LowFat"
                            if (DecodeStringBool((string)this.content.GetMetaData(str))) 
                                builder.Append("lowfat, low fat, lo fat, lofat"); 
                            break
                        default
                            builder.Append(this.content.GetMetaData(str)); 
                            break
                    } 
                     
                    builder.Append("</"); 
                    builder.Append(str); 
                    builder.Append(">"); 
                } 
                return builder.ToString(); 
            } 
     
            private bool DecodeStringBool(string mc) 
            { 
                if (String.IsNullOrEmpty(mc)) 
                    return false
                else 
                { 
                    if (mc.Equals("1")) 
                        return true
                    else 
                        return false
                } 
            } 
     
            private string DecodeIngredients(string ci) 
            { 
                if(String.IsNullOrEmpty(ci)) 
                    return ""
                else 
                { 
                    char[] splitter = { ';' }; 
                    StringBuilder builder = new StringBuilder(); 
                    string[] s = ci.Split(splitter); 
                    for(int i = 0; i < (s.GetUpperBound(0) -1); i++) 
                        builder.Append(System.Web.HttpContext.Current.Server.UrlDecode(s[i]) + "<br />"); 
     
                    return builder.ToString(); 
                } 
            } 
     
            // Properties 
            public virtual Encoding Encoding 
            { 
                get 
                { 
                    return Encoding.Unicode; 
                } 
            } 
     
            public virtual string MimeType 
            { 
                get 
                { 
                    return this.content.MimeType; 
                } 
            } 
     
            public virtual string Path 
            { 
                get 
                { 
                    return this.path; 
                } 
            } 
        } 
     

    ViewControl - You probably don't need to alter this
    using System.Collections.Generic; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    using Telerik.Cms.Web.UI; 
    using Telerik.Framework.Search; 
    using Telerik.Framework.Web; 
     
    namespace RecipeIndexer 
        public class ViewControl : CompositeControl, ISearchViewControl 
        { 
            #region Properties 
     
            public string TemplatePath 
            { 
                get 
                { 
                    object o = this.ViewState["TemplatePath"]; 
                    //if (o == null) 
                    //    return "~/Sitefinity/Admin/ControlTemplates/CustomIndexViewControl.ascx"; 
                    return (string)o; 
                } 
                set 
                { 
                    this.ViewState["TemplatePath"] = value; 
                } 
            } 
     
            public ITemplate ItemTemplate 
            { 
                get 
                { 
                    if (this.itemTemplate == null
                        this.itemTemplate = ControlUtils.GetTemplate<DefaultTemplate>(this.TemplatePath); 
                    return this.itemTemplate; 
                } 
            } 
            #endregion 
            #region Methods 
     
            protected override void CreateChildControls() 
            { 
                this.container = new ControlContainer(this); 
                this.ItemTemplate.InstantiateIn(this.container); 
                this.Controls.Add(this.container); 
            } 
            #endregion 
            #region Private Fields 
     
            private ControlContainer container; 
            private ITemplate itemTemplate; 
            private IDictionary<stringstring> settings; 
            #endregion 
            #region Default Template 
     
            protected class DefaultTemplate : ITemplate 
            { 
                public void InstantiateIn(Control container) 
                { 
                } 
            } 
            #endregion 
            #region Container 
     
            protected class ControlContainer : GenericContainer<ViewControl> 
            { 
                public ControlContainer(ViewControl owner) 
                    : base(owner) 
                { 
                } 
            } 
            #endregion 
            #region ISearchViewControl Members 
     
            public void InitializeSettings(IDictionary<stringstring> settings) 
            { 
                this.settings = settings; 
            } 
            #endregion 
        } 

    SettingsControl - again, you probably won't need to change anything here
    using System.Collections.Generic; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    using Telerik.Cms.Web.UI; 
    using Telerik.Framework.Search; 
     
    namespace RecipeIndexer 
        public class SettingsControl : CompositeControl, ISettingsControl 
        { 
            #region Properties 
     
            public string ControlTemplatePath 
            { 
                get 
                { 
                    object o = this.ViewState["ControlTemplatePath"]; 
                    //if (o == null) 
                    //    return "~/Sitefinity/Admin/ControlTemplates/CustomIndexSettingsControl.ascx"; 
                    return (string)o; 
                } 
                set 
                { 
                    this.ViewState["ControlTemplatePath"] = value; 
                } 
            } 
     
            public IDictionary<stringstring> GetSettings() 
            { 
                this.settings = new Dictionary<stringstring>(); 
                return this.settings; 
            } 
            #endregion 
            #region Methods 
     
            protected override void CreateChildControls() 
            { 
                this.ctrlContainer = new Container(this); 
                this.controlTemplate = new DefaultTemplate(this.settings); 
                this.controlTemplate.InstantiateIn(this.ctrlContainer); 
                this.Controls.Add(this.ctrlContainer); 
            } 
     
            public void InitSettings(IDictionary<stringstring> settings) 
            { 
                this.settings = settings; 
            } 
            #endregion 
            #region Default Template 
     
            protected class DefaultTemplate : ITemplate 
            { 
                public DefaultTemplate(IDictionary<stringstring> settings) 
                { 
                    this.settings = settings; 
                } 
     
                public void InstantiateIn(Control container) 
                { 
                } 
     
                private IDictionary<stringstring> settings; 
            } 
            #endregion 
            #region Container 
     
            protected class Container : GenericContainer<SettingsControl> 
            { 
                public Container(SettingsControl owner) 
                    : base 
                    (owner) 
                { 
                } 
            } 
            #endregion 
            #region Private Fields 
     
            private IDictionary<stringstring> settings; 
            private Container ctrlContainer; 
            private ITemplate controlTemplate; 
            #endregion 
        } 

    Finally, once you build your index provider, you need to make an entry in web.config. This is what my "IndexClients" key looks like:
    <indexClients> 
        <add name="PageIndex" type="Telerik.Cms.Search.PageIndexProvider, Telerik.Cms" settingsControl="Telerik.Cms.Web.UI.PageIndexSettings, Telerik.Cms" viewSettingsControl="Telerik.Cms.Web.UI.SearchViewControl, Telerik.Cms" description="Provides indexing services for CMS Pages."/> 
        <add name="RecipeIndex" type="RecipeIndexer.RecipeIndexProvider, RecipeIndexer" settingsControl="RecipeIndexer.SettingsControl, RecipeIndexer" viewSettingsControl="RecipeIndexer.ViewControl, RecipeIndexer" description="Provides indexing services for Recipe Pages."/> 
    </indexClients> 

    Hope that helps.

    Reply

  • Venkat avatar

    Posted on Dec 17, 2008 (permalink)

    Hi Nigel,

    Thank you for your reply.It really helped me a lot.

    How can get the Categories of blogs in the code.

    in GetData() method of RecipeIndexerInfo.

    here i want to include specific category/tag  blog post content only.

    if I am able to get the blog categories/tags  my problem will be solved.

    Here is my sample code

             public IIndexerInfo[] GetContentToIndex()<br>        {<br>            BlogManager manager = new BlogManager("Blogs");<br>            Category category = new Category("Blogs");<br>            IList list1=null;<br>            if (manager != null)<br>            {<br>                list1 = manager.GetBlogs();<br>            }<br>            //Number or records to be added for indexing<br>            int count = 10;<br><br>            //Test content values<br>            //string title = "Test title ";<br>            //string text = "Test content ";<br>            <br>            List<IIndexerInfo> list = new List<IIndexerInfo>();<br><br>            for (int i = 0; i < list1.Count; i++)<br>            {<br>                Hashtable metaFields = new Hashtable();            <br>                //foreach (string key in this.MetaFields)<br>                //{<br>                //    metaFields.Add(key, "");<br>                //}<br>                Blog blog=((Blog)list1[i]);<br>                metaFields["Name"] = blog.Name;<br>                //metaFields["Title"] = title + i;<br>                for(int j=0;j<blog.PostsCount;j++)<br>                {<br>                    Telerik.Cms.Engine.Data.CmsContentBase post=blog.Posts[j] as Telerik.Cms.Engine.Data.CmsContentBase;<br>                    post.<br>                list.Add(<br>                    new CustomIndexerInfo(<br>                    //string.Format("http://localhost/details.aspx?id={0}", i),<br>                     GetItemUrl( blog),<br>                    metaFields,<br>                    post.Content.ToString())<br>                    );<br><br>                }<br>            }<br><br>            return list.ToArray();<br>        }<br><br>

    Thank you
     Venkat


    Reply

  • Venkat avatar

    Posted on Dec 17, 2008 (permalink)

    Sorry the code i supplied is some what messy here is the formated code.

            public IIndexerInfo[] GetContentToIndex()
            {
                BlogManager manager = new BlogManager("Blogs");
                Category category = new Category("Blogs");
                IList list1=null;
                if (manager != null)
                {
                    list1 = manager.GetBlogs();
                }
                //Number or records to be added for indexing
                int count = 10;

                //Test content values
                //string title = "Test title ";
                //string text = "Test content ";
               
                List<IIndexerInfo> list = new List<IIndexerInfo>();

                for (int i = 0; i < list1.Count; i++)
                {
                    Hashtable metaFields = new Hashtable();           
                    //foreach (string key in this.MetaFields)
                    //{
                    //    metaFields.Add(key, "");
                    //}
                    Blog blog=((Blog)list1[i]);
                    metaFields["Name"] = blog.Name;
                    //metaFields["Title"] = title + i;
                    for(int j=0;j<blog.PostsCount;j++)
                    {
                        Telerik.Cms.Engine.Data.CmsContentBase post=blog.Posts[j] as Telerik.Cms.Engine.Data.CmsContentBase;
                        post.
                    list.Add(
                        new CustomIndexerInfo(
                        //string.Format("http://localhost/details.aspx?id={0}", i),
                         GetItemUrl( blog),
                        metaFields,
                        post.Content.ToString())
                        );

                    }
                }

                return list.ToArray();
            }

    Reply

  • Venkat avatar

    Posted on Dec 17, 2008 (permalink)

    Hi Nigel,

    Can we search in news letters also.I want to extend my search to News letters also.

    Thank you
    Venkat

    Reply

  • Nigel avatar

    Posted on Dec 19, 2008 (permalink)

    Hi Venkat

    I'm afraid I don't know the answer on Blog categories without trying a few tests which I'm not able to do at the moment. Perhaps somebody from Telerik support can offer a suggestion on that.

    WRT news, isn't there a news indexer already available in SiteFinity?

    Nigel

    Reply

  • Georgi Georgi admin's avatar

    Posted on Dec 19, 2008 (permalink)

    Hi,

    The category of each content item could be taken with the code:
    string category = contentItem.GetMetaData("Category").ToString(); 
    where contentItem is IContent object

    You may also check whether you have searchable=true attribute for the category metafield in your web.config file for your provider.

    As for the indexes we have, there are PageIndex, NewsIndex and BlogsIndex providers.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Venkat avatar

    Posted on Dec 22, 2008 (permalink)

    He George,

    Yeah! we have three index providers

    page index ,news index,blog index

    we have another module news letters also

    I want to index that module also.does it possible!

    Thank you
    Venkat

    Reply

  • Georgi Georgi admin's avatar

    Posted on Dec 23, 2008 (permalink)

    Hi Venkat,

    You can index the newsletters only if you have a provider for this module. The indexing engine could have custom indexing providers. I wonder why you need indexing for this module though. There is no control that can show the newsletters on the public page.
    I suggest you creating a special News provider which will store your newsletters. Whenever you create a newsletter, you create a News item in this provider. This way, you can index it, and in fact you will be indexing the newsletters themselves.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Venkat avatar

    Posted on Jan 16, 2009 (permalink)


    He George,

    In our application some blogs posts are pointing to aspx pages.

    Now my Custom Index provider Searching in the blog content.

    I want to append those pages also to this search index.

    Can you please help me how to add these.I know there is a possibility but I dont know How to do it.

    Thank you.
    Venkat

    Reply

  • Nikolai Nikolai admin's avatar

    Posted on Jan 16, 2009 (permalink)

    Hello Venkat,

    Below is a solution which can help solve your problem:
    1. Go to your index and edit it
    2. Add the Page Index and mark the pages you need.(see attachment)
    3. Save and Re-Index again

    I hope this helps. Let us know if you encounter more problems.

    All the best,
    Nikolai
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
    Attached files

    Reply

  • Venkat avatar

    Posted on Jan 20, 2009 (permalink)

    Hi Nikolai ,

    Here in my CustomIndex provider, I am getting the data from blogs only.

    To this Index I added Page Index also,but no use.No results are showing from the pages.But Reindex showing me nore keywords than the prevoius so I think it indexed all the pages but not showing them.

    Can you please give me suggestions.
    Venkat.

    Reply

  • Georgi Georgi admin's avatar

    Posted on Jan 23, 2009 (permalink)

    Hello Venkat,

    If you are getting results only for the Blogs module, then the Pages are:
    • Not indexed
    • having low page rank and therefore not shown in the results.
    You may try tweaking the searchInfoProvider.xml file, which should be created under the index directory, and see if this will help.
    Sincerely yours,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Posted on Aug 20, 2009 (permalink)

    Why not integrate with Google Business Search? It seems like it would handle all dynamic content and document types?

    Reply

  • Georgi Georgi admin's avatar

    Posted on Aug 21, 2009 (permalink)

    Hi,

    I am not sure how and why exactly you want this engine integrated. Could you please elaborate?

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.

    Reply

  • Posted on Aug 21, 2009 (permalink)

    Georgi,
     
    In the past for clients that use a lot of PDF and Word documents in their sites we used Windows Indexing service and wrote custom scripts against it, what it lacked was the ability to index the sites for true site searching and we relegated to using a third party search installation. A couple of years ago Google began to offer their search API that could be branded for small sites for free. Similiar to how you pull in Google maps the Search API could be used also. I do not know the current state, but for larger sites (impressions) they charged $100 per year, smaller sites were free. It may be worth the investment time to speak with them as they have already created the wheel so to speak.

    I will be looking at using their API with our deployment of Sitefinity as our client (an Ohio law firm) has thousands of documents that are searched daily. It may be a co-integration with what you have in your current system (3.7) as without this funcitonality we would not be able to convince them to use your product.

    Just wanted to suggest another avenue for you application. I really enjoy the CMS you have created and look forward to the advancements you continue to make.

    Michael

    Reply

  • Georgi Georgi admin's avatar

    Posted on Aug 26, 2009 (permalink)

    Hello Michael,

    Thank you very much for the details I requested.

    It sounds interesting. We will definitely have this discussed, and I will research it as well. If such an option is possible, it will be helpful to a lot of people with the current versions. 

    Your account has been updated for providing us with this information.

    Thank you once again!

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 3.x: Developing with Sitefinity > Indexing troubles