Posted By

alassiter on 12/03/10


Tagged


Versions (?)

two searches


 / Published in: Rails
 

  1. products = ThinkingSphinx::Search.search(searchtext, {
  2. :with => {
  3. :enabled => true,
  4. :dummy => false,
  5. :visible => true,
  6. :in_stock => true,
  7. #:category_standard => true,
  8. #:standard => true,
  9. :store_id => 1
  10. },
  11. :without => {
  12. # skip PTrans store, FC tickets, and FC store
  13. :category_id => [0, 29, 31, 46]
  14. },
  15. :classes => [ Product ]
  16. }.merge(options))
  17.  
  18. categories = ThinkingSphinx::Search.search(searchtext, {
  19. :without => {
  20. # skip PTrans store, FC tickets, and FC store
  21. :category_id => [0, 29, 31, 46]
  22. },
  23. :classes => [ Category ]
  24. }.merge(options))
  25.  
  26. return products + categories

Report this snippet  

You need to login to post a comment.