• Welcome to KonaKart Community Forum. Please login or sign up.
 
May 11, 2024, 06:47:44 am

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - grempel

1
Hi,

I am currently working on a KonaKart installation that uses Solr for search capabilities.

I am looking for a way to produce a table for a given search that displays every category and the number of products in the current search results that belong to each category.

Ie.
All Products (1000)
- Outdoors (500)
- - Sports (250)
- - Gardening (125)
- - Lawn care (125)
- Kitchen (250)
- - Appliances (250)
- Automotive (250)
- - Engine Parts (200)
- - Accessories (50)
- - Other (0)
- Misc (0)

I currently have 2 ways to do this, both of which are terribly inefficient.

Method #1: Return every product in the list (don't use paging/offsets) and manually group product results into categories and count.
Problem: Large lists transmit too much data, subsequent response time is very slow.

Method #2: Rerun the same search query for each category independently and don't return descriptions, and set paging size as small as possible to get the Total Product Count from the result set.
Problem: Search query by itself is efficient, but performing it 30+ times just to return a count takes 20-30 seconds which is very slow.

Is there any way to query konakart with a specific search that can give me a count of the number of results for each category?

Thank you,

Garret