You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
More Like Thisedit
The more like this (mlt) API allows to get documents that are "like" a specified document.
Fluent DSLedit
var result = client.MoreLikeThis<ElasticsearchProject>(mlt => mlt .Id(1) .MltFields(p => p.Country, p => p.Content) .MinDocFreq(1) .Search(s => s .From(0) .Size(20) ) );
Object Initializer Syntaxedit
var request = new MoreLikeThisRequest<ElasticsearchProject>(1) { MltFields = new PropertyPathMarker[] { "country", "content"}, MinDocFreq = 1, Search = new SearchRequest { From = 0, Size = 10 } }; var result = client.MoreLikeThis<ElasticsearchProject>(request);
Handling the MLT responseedit
.MoreLikeThis<T>
behaves just like .Search<T>
in that it also returns an ISearchResponse<T>
.
See the original docs for more information.