Hi
Where I have a search which has a category (foreign key) and optional text, should I use thinking sphinx to "search" where a search string has not been submitted, solely the category?
Hi
Where I have a search which has a category (foreign key) and optional text, should I use thinking sphinx to "search" where a search string has not been submitted, solely the category?
It really depends on your use case. Let's say for example you have blog posts, and they have categories a, b, and c.
If you want yoursite.com/a/ to list all posts in category a in order from newest to oldest, then it's probably not the greatest idea to use sphinx/search for that. It will be a simple database query, possibly with pagination.
However, let's say you want that page to list all posts with that category, or that might relate to that category according to the text, and also maybe posts that have tags related to that category. In this case, it is probably best to use a search engine, like sphinx, to power this page. The search engine will be much faster if the equivalent database query is very expensive.