Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.88 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to count results in sphinx?
  2. $cl->SetLimits(0,0);
  3.        
  4. mysql> SELECT * FROM test1 WHERE MATCH('test|one|two');
  5. +------+--------+----------+------------+
  6. | id   | weight | group_id | date_added |
  7. +------+--------+----------+------------+
  8. |    1 |   3563 |      456 | 1231721236 |
  9. |    2 |   2563 |      123 | 1231721236 |
  10. |    4 |   1480 |        2 | 1231721236 |
  11. +------+--------+----------+------------+
  12. 3 rows in set (0.01 sec)
  13.  
  14. mysql> SHOW META;
  15. +---------------+-------+
  16. | Variable_name | Value |
  17. +---------------+-------+
  18. | total         | 3     |
  19. | total_found   | 3     |
  20. | time          | 0.005 |
  21. | keyword[0]    | test  |
  22. | docs[0]       | 3     |
  23. | hits[0]       | 5     |
  24. | keyword[1]    | one   |
  25. | docs[1]       | 1     |
  26. | hits[1]       | 2     |
  27. | keyword[2]    | two   |
  28. | docs[2]       | 1     |
  29. | hits[2]       | 2     |
  30. +---------------+-------+
  31. 12 rows in set (0.00 sec)