Created
March 22, 2012 20:53
-
-
Save SupermanScott/2164332 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function createQueryDSL($query, $skip, $limit) { | |
$query_json = array( | |
'query' => array( | |
'custom_filters_score' => array( | |
'query' => array( | |
'query_string' => array( | |
'fields' => array('title^5', 'message', 'vanity_url^3', 'full_name^5'), | |
'query' => $query, | |
'use_dis_max' => TRUE, | |
), | |
), | |
'filters' => array( | |
array('filter' => array('term' => array('user_verified' => TRUE)), 'boost' => 3.0), | |
), | |
), | |
), | |
'size' => $limit, | |
'from' => $skip, | |
); | |
return $query_json; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got it to work something like the above gist