Guest User

Untitled

a guest
Jul 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. // create a query with a custom start, rows, fields and sort setting
  4. $query = new Solarium_Query_Select;
  5.  
  6. // you can add a filterquery based on a config array
  7. $query->addFilterQuery(array(
  8. 'key' => 'fq1',
  9. 'tag' => array('populationLimit'),
  10. 'query' => 'population:[1 TO 1000000]',
  11. ));
  12.  
  13. // or create a filterquery instance yourself, using its API
  14. $filterQuery = new Solarium_Query_Select_FilterQuery;
  15. $filterQuery->setKey('fq1')
  16. ->addTag('populationLimit')
  17. ->setQuery('population:[1 TO 1000000]');
  18. $query->addFilterQuery($filterQuery);
Add Comment
Please, Sign In to add comment