+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / which tables Imetasearchinfo does refer while filtering

which tables Imetasearchinfo does refer while filtering

5 posts, 0 answered
  1. Ashish
    Ashish avatar
    7 posts
    Registered:
    18 Apr 2011
    07 Nov 2011
    Link to this post
    Admin,

    I am using sitefinty 3.7

    I want to know which tables Imetasearchinfo does refer while filtering

    as i am getting different values of metadata (publication date in news) than that of present in sf_GCMetaData

    is there any caculation or something else is  done while retrieving date using imetasearchinfo from news module

    as data retrieved data doesnt match wid that of data present in sf_GCMetaData

    please any one can help me on this,    its  URGENT...........



    regards

    Ashish
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Nov 2011
    Link to this post
    Hello Ashish,

    The sf_GCMetaData table holds only the meta field values for the news items. The news items are stored in sf_CmsContentBase and their text content is stored in sf_CmsTextContent table.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ashish
    Ashish avatar
    7 posts
    Registered:
    18 Apr 2011
    10 Nov 2011
    Link to this post
    Hello Admin,

    Thnks for your reply

    But my actual problem is i am getting different publication date by using GetContent Method  to that of present in
    sf_GCMetaData  there is difference of few hours

    Why this problem is there

    is there any DateTime setting present in Sitefinity 

    Please help  ...

    Regards,

    Ashish

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    10 Nov 2011
    Link to this post
    Hello Ashish,

    The date  - Date is resolved depending on the culture Sys.CultureInfo.CurrentCulture which is the standard Microsoft Ajax object. Please take a look at this post and check the current culture and try to set the date value from the database by using the js code provided there to see the result that will be returned.
    If the problem is related to the time zone you can convert the dates as shown in the articles below



    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Ashish
    Ashish avatar
    7 posts
    Registered:
    18 Apr 2011
    11 Nov 2011
    Link to this post

    HI Admin,

    Thnks for ur reply.

    But my Actual Concern is following

    This is d Code I am using

    // First i am finding latest Publication date of News

     

    filters =

    new IMetaSearchInfo[3];

     

    filters[0] =

    new MetaSearchInfo(MetaValueTypes.LongText, "MG_Category", category, SearchCondition.Like);

     

    filters[1] =

    new MetaSearchInfo(MetaValueTypes.Boolean, "IsEdited", true, SearchCondition.Equal);

     

    filters[2] =

    new MetaSearchInfo(MetaValueTypes.Boolean, "Active_Flag", true, SearchCondition.Equal);

     

    list = objMgr.Content.GetContent(0, 1,

    "Publication_Date DESC", filters);

     

     

    if (list.Count > 0)

     

    {

     

    if (toDate == null)

     

    toDate =

    Convert.ToDateTime(((Telerik.Cms.Engine.Data.CmsContentBase)(list[0])).GetMetaData("Publication_Date").ToString());

     

    if (frmDate == null)

     

    frmDate = toDate.Value.AddDays(-1);

     

    // Latest Publication Date is Mismatch with that of present in sf_GCMetaData
    // Because of this I am not getting result  in Folowing Code
    // actually if i am getting latest publication date for given filter then i shuld get result in preceding filter
    but i am not getting result because of MIsmatch in date
    // So can u please help me in this

    filters2 =

    new IMetaSearchInfo[5];

     

    filters2[0] =

    new MetaSearchInfo(MetaValueTypes.LongText, "MG_Category", category, SearchCondition.Like);

     

    filters2[1] =

    new MetaSearchInfo(MetaValueTypes.Boolean, "IsEdited", true, SearchCondition.Equal);

     

    filters2[2] =

    new MetaSearchInfo(MetaValueTypes.Boolean, "Active_Flag", true, SearchCondition.Equal);

     

    filters2[3] =

    new MetaSearchInfo(MetaValueTypes.DateTime, "Publication_Date", frmDate, SearchCondition.GreaterOrEqual);

     

    filters2[4] =

    new MetaSearchInfo(MetaValueTypes.DateTime, "Publication_Date", toDate,SearchCondition.LessOrEqual);

     

     

     

     

     

     

    if (count > 0)

     

    contentList = objMgr.Content.GetContent(

    "Publication_Date DESC", filters2).Cast<CmsContentBase>().AsEnumerable().Where(a => a.GetMetaData("Title").ToString().ToLower().Contains(searchStr.ToLower())

     

    || a.GetMetaData(

    "Summary").ToString().ToLower().Contains(searchStr.ToLower())).ToList();

     

     

    else

     

     

     

     

     

    contentList = objMgr.Content.GetContent(

    "Publication_Date DESC", filters2).Cast<CmsContentBase>().ToList();

    Please Help me

    Regards,
    Ashish Naik


     

Register for webinar
5 posts, 0 answered