Skip to content

MoreLikeThis query should accept documents or ids #1431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2015

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