Service - Category Tree Standard

From Izara Wiki
Jump to navigation Jump to search

Overview

Handler service for the standard category tree type.

Repository

https://bitbucket.org/stb_working/category-tree-standard/src/master/

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configTag: "defaultValue"
	configKey: "locationTreeAreaNodeId"
	configValue: {eg: id for USA, or international?}
}
{
	configTag: "defaultValue"
	configKey: "browseQuantity"
	configValue: {eg: 1}
}

CategoryTreeNode

Fields

catalogId
(partition key)
categoryId
(sort key)
filter
full filter for this node, will often match catalog's default filter unless specifically set not to
requiredData
searchType
sellOffer|product|variantProduct
filterMatchCatalog
bool
defaults to true, if true will be updated to always match the catalog's filter, if false must manually update
requiredDataMatchCatalog
bool
defaults to true, if true will be updated to always match the catalog's filter, if false must manually update
searchTypeMatchCatalog
bool
if set to true then will update when catalog searchType changes

Neptune graph database

Category Tree

Records all category relationships within one Catalog.

All child category results should show in a parents results

  • A child category might include products that are not part of a parent category, but when browsing the parent category we want to show all results that return for child categories.
  • We can do this by accumulating all child filters into the parents filter.
  • If all children share the same catalog default filter this is not too difficult, we add an or filter that includes all child categoryId's.
  • If some children have custom filters we will need to separate them out as a separate or filter that groups that child's categoryId with it's filter
  • I believe processing these large filters can still be efficient because hash of filter exists for the full (or any partial) filter and we cache results for each part of the filter.

Adding client submitted filter

  • Would get added as an and grouped filter.

Top level results

  • Each catalog has a top level record saved into CategoryTreeNode table, categoryId = 0, this will be a combination of catalog filter, and all child categoryIds

Ideas

  • This service could hold a list of Products for each category and do things like record popularity etc.. partial lists would be OK, anything we want to add. For features like popularity might not want to remove products when they no longer match the catagory, might want to maintain their details in case get added again. This type of idea might be served through the graph database.
  • Our current structure allows one category to have multiple parents, that child category will have the same settings no matter what path you travel through the tree to reach it. Not sure how to handle presentation of the parent category/location for any category, maybe most popular, or simply first found?

Working documents

Category Tree Standard