Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

BestBetCollection Class

Represents a collection of BestBet objects.

System.Object
  Microsoft.Office.Server.Search.Administration.BestBetCollection

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public sealed class BestBetCollection : IEnumerable

Use the GetAllBestBets method of the Keywords class to get the collection of all the best bets for a site.

Use the BestBets property of the Keyword class to get the collection of best bets associated with a specific keyword.

To add a new best bet to the collection, use the Create() method of the BestBetCollection class.

To remove the association between a best bet and a keyword without deleting the best bet, use the Remove() method of the BestBetCollection class.

To delete a best bet, use the Delete() method of the BestBet class.

Use an indexer to return a single best bet from the BestBetCollection class. For example, assuming the collection is assigned to a variable named bestBets, use bestBets[index] in Microsoft Visual C# or bestBets(index) in Microsoft Visual Basic, where index is a System.Uri object representing the best bet's URL.

For more information about keywords and best bets in SharePoint Enterprise Search, see Managing Keywords.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.