V
V
Vitaly Semyanchuk2017-02-05 15:15:30
elasticsearch
Vitaly Semyanchuk, 2017-02-05 15:15:30

How to convert More Like This Query to elasticsearch?

Good afternoon. there is a task to add type =2 to this request, type is a custom number field, because of this I can’t use mlt, so I need to redo the request, can anyone come across this?

{
 debug: `similarPr`,
        index: `pr`,
        type: `pr`,
        query: {
            more_like_this: {
                like: [{
                    _index: `pr`,
                    _type: `pr`,
                    _id: id
                }],
                min_term_freq: 1,
                min_doc_freq: 1
            }
        },
        pageSize: 3,
        page: 0,
        fields
     }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question