NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
More Like This Full Document Query Usageedit
Fluent DSL exampleedit
q .MoreLikeThis(sn => sn .Like(l => l .Document(d => d .Document(Project.Instance) .Routing(Project.Instance.Name) ) .Text("some long text") ) )
Object Initializer syntax exampleedit
new MoreLikeThisQuery { Like = new List<Like> { new LikeDocument<Project>(Project.Instance) { Routing = Project.Instance.Name }, "some long text" } }
Example json output.
{ "more_like_this": { "like": [ { "_index": "project", "_type": "doc", "doc": { "name": "Koch, Collier and Mohr", "state": "BellyUp", "startedOn": "2015-01-01T00:00:00", "lastActivity": "0001-01-01T00:00:00", "leadDeveloper": { "gender": "Male", "id": 0, "firstName": "Martijn", "lastName": "Laarman" }, "location": { "lat": 42.1523, "lon": -80.321 } }, "_routing": "Durgan LLC" }, "some long text" ] } }