<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx</link><description>Yesterday I received an interesting question: a customer had the need to import several hundred keywords and related best bets programmatically to a couple of site collections. And for sure he did not want to do this manually using the web UI. I found</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>" + title + "</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#713582</link><pubDate>Wed, 28 Mar 2007 14:49:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:713582</guid><dc:creator>" + title + "</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.virtual-generations.com/2007/03/28/sharepoint-2007-link-dump-3/"&gt;http://www.virtual-generations.com/2007/03/28/sharepoint-2007-link-dump-3/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#754759</link><pubDate>Thu, 12 Apr 2007 18:39:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:754759</guid><dc:creator>Matthias Glubrecht</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;thanks a lot; this post saved us half a day of trial and error, I guess :-)&lt;/p&gt;
&lt;p&gt;Regards, Matthias&lt;/p&gt;</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#1423675</link><pubDate>Mon, 02 Jul 2007 20:54:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1423675</guid><dc:creator>Jerry K.</dc:creator><description>&lt;p&gt;Can you do the same in SPS 2003? (add keywords and best bets programatically)&lt;/p&gt;</description></item><item><title>hoover high school football alabama 2005 schedule</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#1929608</link><pubDate>Sun, 09 Sep 2007 19:06:16 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1929608</guid><dc:creator>hoover high school football alabama 2005 schedule</dc:creator><description>&lt;p&gt;hoover high school football alabama 2005 schedule&lt;/p&gt;
</description></item><item><title>Thank You Stefan</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#2191900</link><pubDate>Wed, 17 Oct 2007 17:46:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2191900</guid><dc:creator>Carlos Sampaio</dc:creator><description>&lt;p&gt;Thank you Stefan for this sample. We had over 1500 keywords, plus Synonyms on our site. This will reduce the effort from days to minutes.&lt;/p&gt;</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#2297923</link><pubDate>Thu, 01 Nov 2007 00:22:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2297923</guid><dc:creator>Cale Hoopes</dc:creator><description>&lt;p&gt;Stefan,&lt;/p&gt;
&lt;p&gt;Since you can do this programmatically and it seems to bind to the SSP does this mean that you can set keywords (synonyms) and best bets at the SSP level for non-MOSS site searching? I'm curious because I have a MCMS 2002 site that we're going to crawl with MOSS and we want to know if we can configure synonyms and best bets.&lt;/p&gt;
&lt;p&gt;Meaning, do you think I could do:&lt;/p&gt;
&lt;p&gt;SearchContext searchContext = SearchContext.GetContext(spsite); &lt;/p&gt;
&lt;p&gt;Keywords keywords = new Keywords(searchContext, new Uri(&amp;quot;&lt;a rel="nofollow" target="_new" href="http://MYCMSSITE/&amp;quot;"&gt;http://MYCMSSITE/&amp;quot;&lt;/a&gt;)); &lt;/p&gt;
&lt;p&gt;// loop begin &lt;/p&gt;
&lt;p&gt;Keyword myKeyword = keywords.AllKeywords.Create(&amp;quot;myKeyword&amp;quot;, DateTime.Now); &lt;/p&gt;
&lt;p&gt;myKeyword.Synonyms.Create(&amp;quot;mySynonym&amp;quot;); &lt;/p&gt;
&lt;p&gt;BestBet bestBet = myKeyword.BestBets.Create(&amp;quot;myBestBet&amp;quot;, &amp;quot;my descript&amp;quot;, new Uri(&amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.myBestBetDestination.com&amp;quot;"&gt;http://www.myBestBetDestination.com&amp;quot;&lt;/a&gt;)); &lt;/p&gt;
&lt;p&gt;myKeyword.Update(); &lt;/p&gt;
&lt;p&gt;Let me know what you think.&lt;/p&gt;
&lt;p&gt;Cale&lt;/p&gt;</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#2301946</link><pubDate>Thu, 01 Nov 2007 14:03:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2301946</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Cale,&lt;/p&gt;
&lt;p&gt;I haven't tried it myself but I think this should also work for non portal content (e.g. MCMS sites).&lt;/p&gt;
&lt;p&gt;Give it a try!&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#2304097</link><pubDate>Thu, 01 Nov 2007 19:46:24 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2304097</guid><dc:creator>Cale Hoopes</dc:creator><description>&lt;p&gt;Ok, I'll let you know how it goes. It sure would be interesting to find out. It's too bad there isn't an interface at the SSP level to set keywords by scope our source or something. Considering you can set authority pages at this level, it seems like it would have made sense to make the keyword interface at that level too.&lt;/p&gt;</description></item><item><title>Creating Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#2589774</link><pubDate>Thu, 29 Nov 2007 22:13:39 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2589774</guid><dc:creator>Life of a Hungarian SharePoint Geek</dc:creator><description>&lt;p&gt;You can administer keywords and best bets on the MOSS admin UI at Search keywords at Site Collection&lt;/p&gt;
</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#3159802</link><pubDate>Wed, 26 Nov 2008 14:44:31 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3159802</guid><dc:creator>Chris Howell</dc:creator><description>&lt;p&gt;How do you move keywords and best bets through different environments to get to production?&lt;/p&gt;
&lt;p&gt;From what I can find out, whilst the keywords and best bets are added within a site collection they are stored in the SSP database.&lt;/p&gt;
&lt;p&gt;The content deployment job for the site does not move the keywords to production. I've found some links saying how to export and import keywords but not easily move between environments with minimum effort.&lt;/p&gt;</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#3159807</link><pubDate>Wed, 26 Nov 2008 15:04:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3159807</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;you need to follow the steps in the links you found.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#3159815</link><pubDate>Wed, 26 Nov 2008 15:18:05 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3159815</guid><dc:creator>Chris Howell</dc:creator><description>&lt;p&gt;OK, thanks. These are the links I found, can you recommend one over the other?&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/searchadmin"&gt;http://www.codeplex.com/searchadmin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.sharepointblogs.com/mingssn/archive/2008/05/09/export-keywords-best-bet-for-sharepoint-2007.aspx"&gt;http://www.sharepointblogs.com/mingssn/archive/2008/05/09/export-keywords-best-bet-for-sharepoint-2007.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'm assuming the codeplex solution as the latter appears in complete?&lt;/p&gt;</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#3159819</link><pubDate>Wed, 26 Nov 2008 15:29:07 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3159819</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;sorry I did not try any of these personally so I cannot do a recommendation.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#3228597</link><pubDate>Tue, 21 Apr 2009 13:06:07 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3228597</guid><dc:creator>Diran</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I've setup Keywords and they seem to work fine. &amp;nbsp;However I've added a contact to receive an alert when the keywords come up for review but the contact doesn't get any emails or alets. &amp;nbsp;I did some further investigations into this and apparently an alert should also go out to the contact when the keyword is initiall setup. &amp;nbsp;Has anyone ever got this to work? &amp;nbsp;I've tried this in all our environments but it doesn't seem to work in any of them.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Diran&lt;/p&gt;</description></item><item><title>re: How To: create Keywords and Best Bets for MOSS Search programmatically</title><link>http://blogs.technet.com/stefan_gossner/archive/2007/03/28/how-to-create-keywords-and-best-bets-for-moss-search-programmatically.aspx#3279802</link><pubDate>Tue, 08 Sep 2009 17:24:37 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3279802</guid><dc:creator>Phil Childs</dc:creator><description>&lt;p&gt;Hi Stefan, I created the keywords and best bets using your code - thanks - and they appeared in the site collection as expected.&lt;/p&gt;
&lt;p&gt;However, I have a problem where they do not appear during a search. If I go into the keyword settings using the UI and just click OK without changing anything, they then appear in the search as normal.&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;</description></item></channel></rss>