Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //weight keywords
- $_k = explode('+',$keywords);
- $weight = count($_k);
- $words = array();
- $words2 = array();
- foreach ($_k as $word)
- {
- $words[] = urlencode($word.'^'.$weight);
- $words2[] = urlencode($word.'^'.$weight*0.5);
- $weight--;
- }
- $keywords = 'title:'.implode('+',$words2).'+allFields:'.implode('+',$words);
- $client->setUri($this->_buildUri($keywords));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement