Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

External best bets not working



We have on premise Find and it seems that external best bets are not working.

I set up an external best bet and when searching for the phrase this best bet is not returned. Note that internal best bets are working as expected and we are using .ApplyBestBets() in the code.

I can see an ExternalUrlBestBet in the backend index but all it has is a type and a GUID Id, so I guess it could not be indexing correctly?

Is there anything obvious that I'm missing?



Feb 26, 2020 15:18
Feb 26, 2020 15:31

If you are using GetContentResults() it won't work as it will only return/filter on IContent.

Should work if you Filter / MatchType on ExternalUrlBestBet.

Feb 26, 2020 21:18

Hi, thanks to both of you for your replies.

We had some filters that exclude results based on content property values, commenting these out returns the external best bets.

The only problem is that we need these filters in place as the content properties allow editors to exclude content from the search results.

An example of one of the filters is

search = search.Filter(x => ((ContentPageBase)x).ExcludeFromSearchResults.Match(false));

We have the same for images and media as well.

Any suggestions on how to include these filters and allowing the external best bets to be returned?

Feb 27, 2020 13:25

Hi Mark

Try something like

search = search.Filter(x => ((ContentPageBase)x).ExcludeFromSearchResults.Match(false) | x => (x as PageData).MatchType(typeof(ExternalUrlBestBet)));


search = search.Filter(x => ((ContentPageBase)x).ExcludeFromSearchResults.Match(false) | x => x.MatchType(typeof(ExternalUrlBestBet)));

Feb 27, 2020 20:59

All sorted now thanks to your suggestions and help. Much appreciated!

Feb 28, 2020 11:47
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.