Last active
December 2, 2016 17:03
-
-
Save lindstromhenrik/9779858 to your computer and use it in GitHub Desktop.
ThenByScore-extension for EPiServer Find
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ITypeSearch<TSource> ThenByScore<TSource>(this ITypeSearch<TSource> search) | |
{ | |
return new Search<TSource, IQuery>(search, context => | |
context.RequestBody.Sort.Add(new Sorting("_score"))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?