Skip to content

Conversation

robertlyson
Copy link
Contributor

Hello guys,

Right now we are unable to run query like this one:

var searchResponse = client.Search<Document>(s => s.Query(q => q
    .MoreLikeThis(mlt => mlt.Documents(docs => docs.Document(new Document {Id = 1})))));

It sends empty query to elasticsearch:

StatusCode: 200, 
Method: POST, 
Url: http://localhost:9200/my_index/document/_search, 
Request: {}, 

Documentation stays that

The only required parameters are either docs, ids or like_text

so I think this PR should resolve the issue.

Reported on SO.

Thanks.

@gmarz
Copy link
Contributor

gmarz commented Jun 3, 2015

LGTM 👍 thank you @robertlyson !

gmarz added a commit that referenced this pull request Jun 3, 2015
MoreLikeThis query should accept documents or ids
@gmarz gmarz merged commit 87640aa into elastic:develop Jun 3, 2015
@gmarz gmarz added Bug labels Jun 3, 2015
@robertlyson robertlyson deleted the MoreLikeThisConditionlessBug branch June 5, 2015 07:52
@gmarz gmarz added v1.6.0 and removed v1.5.2 labels Jun 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants