Skip to content

Instantly share code, notes, and snippets.

@lindstromhenrik
Last active December 2, 2016 17:03
Show Gist options
  • Save lindstromhenrik/9779858 to your computer and use it in GitHub Desktop.
Save lindstromhenrik/9779858 to your computer and use it in GitHub Desktop.
ThenByScore-extension for EPiServer Find
public static ITypeSearch<TSource> ThenByScore<TSource>(this ITypeSearch<TSource> search)
{
return new Search<TSource, IQuery>(search, context =>
context.RequestBody.Sort.Add(new Sorting("_score")));
}
@john-mckillip
Copy link

Hi. Thanks for this! Wondering if there is a way to expose the score of a search hit in Find, so that you could filter based on a minimum or range?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment