tire-contrib icon indicating copy to clipboard operation
tire-contrib copied to clipboard

Add ability to pass document id to More Like This

Open ghost opened this issue 11 years ago • 5 comments

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

ghost avatar May 25 '13 12:05 ghost

@mereghost, can you have a look at it? https://github.com/karmi/tire-contrib/blob/master/lib/tire/queries/more_like_this.rb

karmi avatar Jun 03 '13 12:06 karmi

Correct me if i'm wrong https://github.com/karmi/tire-contrib/blob/master/lib/tire/queries/more_like_this.rb is doing http://www.elasticsearch.org/guide/reference/query-dsl/mlt-query/

It looks like http://www.elasticsearch.org/guide/reference/api/more-like-this/ uses a direct API call but underneath, it's calling the mlt-query.

Wonder if there's any way we can accomplish the same behavior using the existing search query, or we'll have to implement a direct API call. I might find some time to draft one out maybe.

tmlee avatar Jul 21 '13 07:07 tmlee

@tmlee The "more like this document" API is indeed a bit different. You should achieve the same with more_like_this query, just pass the string and the list of fields.

karmi avatar Jul 21 '13 08:07 karmi

Oh, crap I just saw that. =/

I intend to implement that as I need it on a project, but schedule is a bit... tight right now. I'll see if I can dedicate some time for this.

mereghost avatar Jul 26 '13 16:07 mereghost

@mereghost No worries .)

karmi avatar Jul 27 '13 09:07 karmi