Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Implement "more like this" #53

Closed
rlr opened this issue Aug 7, 2012 · 5 comments
Closed

Implement "more like this" #53

rlr opened this issue Aug 7, 2012 · 5 comments
Milestone

Comments

@rlr
Copy link
Contributor

rlr commented Aug 7, 2012

Please? :)

http://www.elasticsearch.org/guide/reference/api/more-like-this.html

@rlr
Copy link
Contributor Author

rlr commented Aug 27, 2012

I just realized pyes implements this:

def morelikethis(self, index, doc_type, id, fields, **query_params):
        """
        Execute a "more like this" search query against one or more fields and get back search hits.
        """
        path = self._make_path([index, doc_type, id, '_mlt'])
        query_params['fields'] = ','.join(fields)
        return self._send_request('GET', path, params=query_params)

I am not sure if it is worth wrapping that in elasticutils or not. It doesn't seem like it fits well as part of S() at least.

@willkg
Copy link
Member

willkg commented Aug 28, 2012

So, I agree it's not something we'd want to add to S because it's not a chainable transform--it's a separate sort of thing.

However, my big plan is to ditch pyes. So while you could implement this in SUMO directly with pyes, I don't think I want to implement it that way in ElasticUtils.

@rlr
Copy link
Contributor Author

rlr commented Aug 28, 2012

@willkg Do you have any ideas on how this should be done in EU? I can do it, but I am not sure what the API should look like.

@willkg
Copy link
Member

willkg commented Aug 30, 2012

(Talked with @rlr directly a few times between then and now.)

The new plan is to implement an MLT class that's at the same level as S and takes an S which it uses to derive a bunch of information from. And it'll also take an id and a list of fields.

rlr added a commit to rlr/elasticutils that referenced this issue Aug 31, 2012
Adds a MLT class for making _mlt API calls.
@rlr
Copy link
Contributor Author

rlr commented Aug 31, 2012

Fixed ^

@rlr rlr closed this as completed Aug 31, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants