Hi, I am working on setting my company’s course catalog index and here is the data I have so far:
As you can see, the credits attr has quite a large amount of data as each course has credits attached and breaking down by profession state and each state can offer multiple credit types and each credit type can link to multiple credit categories.
I currently hit the roadblock of index size too big since courses often times can have more than 50 profession credit states.
I did try to follow the doc to split up the credits into multiple records with the provided Laravel Scout Extended package functionality to add
splitCredits method in my Course model just so each course record will have one item under credits attr. The approach definitely resolves the index size issue. But I’ve encountered issues having the facets to show the proper count (I’ve already setup
id our internal unique identifier for the course and set
distinct to true)
For example, when I set facet
credits.status (possible value is either Self Apply or Approved), both facet item counts show a lot more than the total number of courses and obviously that’s because I’ve separate credits into multiple records for the same course and the count I assume reflected that.
So, my question is if splitting the record as I mentioned the right approach? If yes, how do I resolve the count issue to make it count on a distinct course level. Otherwise, any insights on the better way of managing this data structure and be able to easily setup different facets within credits attr for other things like
Let me know if it’s clear enough.
Thanks a lot!