Closed muzidudu closed 2 years ago
Hey @muzidudu, there is currently no builder for more_like_this
query, but you can use a raw query:
$query = [
'more_like_this' => [
'fields' => ['title', 'description'],
'like' => 'Once upon a time',
'min_term_freq' => 1,
'max_query_terms' => 12
]
];
$searchResult = Book::searchQuery($query)->execute();
thx for reply !
I know how to do it.
How do you implement this code
GET /_search { "query": { "more_like_this" : { "fields" : ["title", "description"], "like" : "Once upon a time", "min_term_freq" : 1, "max_query_terms" : 12 } } }