There are probably a lot of challenges here. Here are some I've come up with.

- Preemptive caching of every possibility so we can display the depth in a timely manner.
- Depth means nothing if you select more than one parameter at a time. Apache Solr module requires you to select one parameter at a time so it doesn't face this issue.

Comments

dawehner’s picture

In general this kind of features are called faceted search and there is a reason why you use apachesolr here. It would kill your site performance. Forget it to do this with just sql, this simply does not scale at all.

merlinofchaos’s picture

Status: Active » Closed (won't fix)

I agree with dereine. apache solr excels at this. Views would not.

R.J. Steinert’s picture

Totally agree, the indexing that Apache Solr does as opposed to using strictly sql is definitely a must for performance reasons. Now that the Views backend is pluggable with sources like Apache Solr given to us by apachesolr_views (disclaimer: I haven't had a chance to take that for a test run), do you guys think time would be better spent working on faceted search features like depth for Views or simply working on the Apache Solr Search Integration module?

Thanks for the speedy response guys :).

R.J. Steinert’s picture

I'm also tempted to do something simple like set a job to process every 24 hours that programatically executes a view with every possible set of filter parameter combinations, caches the depth counts, and then hook_form_alter's the exposed filters tacking on the depth count. Do I sound totally bonkers :P ?

R.J. Steinert’s picture

Category: feature » support
Status: Closed (won't fix) » Active

Changed to a support request as I think I'm just looking for some advice.

dawehner’s picture

Personally i think the best thing you could do is to use the search_api module, it seems to be the most flexible solution out there.

Afaik it getting support for faceted api at the moment, so this would really perfectly fit your needs.
You could still use views to display the data, searchapi does this for you.

R.J. Steinert’s picture

Status: Active » Closed (fixed)

Thank you so much for your suggestions Dereine. Sounds like a great solution for my D7 projects. I also have to figure this out for D6. There's a glimmer of hope that I'll be able to do this with the Views Content Cache module as it is already storing the depth counts in the cached results. #1235294: During caching, store result counts for display on exposed filter parameters