Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$data = json_encode(array(
'query' => array(
'more_like_this' => array(
'fields' => array('title', 'text'),
'like_text' => $text,
'min_term_freq' => 3,
'max_query_terms' => 50,
'percent_terms_to_match' => 0.1,
)
),
'size' => 100,
'fields' => array('id', 'title', 'category'),
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment