Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesImplementing ISearchableImplementing ISearchable
Previous
 
Next
New Post
4/15/2010 3:50 PM
 

Unfortunately your code got all chopped up by the editor here on the site. can you paste it into notepad, copy from there, before pasting into the forums to clean it up without color coding.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
4/16/2010 3:10 AM
 

Hi Chris,

Sorry about that, here you go...

public SearchItemInfoCollection GetSearchItems(ModuleInfo modInfo)
{
 var articlesRepository = new ArticlesRepository();
 List<Article> articleList = articlesRepository.GetMostRecentArticles(null, null);
 

var searchItemCollection = new SearchItemInfoCollection();
 foreach (Article article in articleList)
 {
    var searchItem = new SearchItemInfo
     (modInfo.ModuleTitle + " - " + article.Headline,
      article.Headline,
      0,
      article.DateFrom, modInfo.ModuleID,
      Convert.ToString(article.ArticleId),
      article.Headline + article.Summary + article.Body);
 

     searchItem.GUID = "articleid=" + article.ArticleId;
  
     searchItemCollection.Add(searchItem);
 }
 return searchItemCollection;
}

 
New Post
4/16/2010 12:09 PM
 
You might try clearing out the search tables to make sure everything is working properly. It is possible that DNN isn't updating things that have already been indexed? If you do a select * from searchitem do you see your items in the search tables? Do they have that GUID assigned to them?

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
4/19/2010 5:04 AM
 

Hi Chris

Thanks for your response, you were right, the GUID was not set in the searchitem table records.

I've cleared this out reindexed the search and the GUID field is now set. However, the URLs that appear in the search results still are still ...NewsArticle.aspx as opposed to ...NewsArticle.aspx?articleId=12.

Is there something else I need to do?

Thanks again for the continued help.

Stuart

 
New Post
4/19/2010 5:07 AM
 

Actually, sorry Chris. Please ignore my last post, that did work! I just had a blonde moment.

Please ignore my last post and many thanks for your help!

Stuart

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesImplementing ISearchableImplementing ISearchable


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out