Describe the reason for these changes and the problem that they solve
There had been a decent amount of tech debt building in between the web endpoint, product models, and core search code in the knowledge-graph.
Recent changes to canonicalization in order to support query-time evaluation of synonyms had highlighted this again, and it seems worthwhile to pay down some of the debt with this changeset.
Briefly summarize the changes
Canonicalization logic is moved into the core Product class
Consistent ProducyAnalyzer and ProductStemmer subclasses are introduced for indexing and query-time document transformation
Product display name, content generation and ID generation are refactored
How have the changes been tested?
Unit test coverage is provided
The product hierarchy.json has been regenerated locally via pipenv run python -m scripts.hierarchy --update
List any issues that this change relates to
Relates to #29
Relates to #30
Describe the reason for these changes and the problem that they solve
There had been a decent amount of tech debt building in between the web endpoint, product models, and core search code in the
knowledge-graph
.Recent changes to canonicalization in order to support query-time evaluation of synonyms had highlighted this again, and it seems worthwhile to pay down some of the debt with this changeset.
Briefly summarize the changes
Product
classProducyAnalyzer
andProductStemmer
subclasses are introduced for indexing and query-time document transformationHow have the changes been tested?
hierarchy.json
has been regenerated locally viapipenv run python -m scripts.hierarchy --update
List any issues that this change relates to Relates to #29 Relates to #30