Created
February 15, 2013 08:47
-
-
Save Yegoroff/4959198 to your computer and use it in GitHub Desktop.
PlainElastic.Net QueryBuilder with Sort and ignore_unmapped parameter
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
SearchResult<Tweet> searchResult = client.Search( | |
new SearchCommand("twitter", "tweet"), | |
new QueryBuilder<Tweet>() | |
.Query(q => q | |
.Term(t => t | |
.Field(tweet => tweet.User) | |
.Value("testUser") | |
.Boost(2) | |
) | |
) | |
.Sort(s=>s | |
.Field(t=>t.Message, order: SortDirection.asc, ignoreUnmapped: true) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment