get_product_trend
Table of Contents
Get Product Trend Solr
With shop_id as mandatory filter and other optional filters as input, returns most trendy prod_ids from the prod_id's shop category. The app is mostly used by visualytics for dashboard purposes and by the solr updater from the pipeline.
The application runs with Flask dockerized in a container. It uses the zookeeper client for the solr connection.
Host
Git
DB source
reads from: Live Solr
returns picalike ids with highest trend score based on the given filters
This is how a response looks like:
{ "count": count, "description":"Attribute Trends", "link":"http://picalike.com", "generator":"http://picalike.com", "title":"picalike Request", "modified":str(datetime.datetime.now()), "ids": [ {"name":_name, "shop_cat":_shop_cat, "img":_img, "gender":_gender, "price":_price, "extraimg":_extraimg, "location":_location, "id":_picalike_id, "picalike_cat":_picalike_cat, "w":_cluster_trend, "prod_id":_prod_id, "prod_type": _prod_type, "available": _available, "attributes": _attributes, "keywords": _keywords} ] }
Input
- shop_id: string *
- i: prod_id = False # If given, the app only returns the trend score of the given prod_id *
- ignore_not_available: boolean = True
- picalike_cat: string = None # if picalike_cat name given, only returns prods from this picalike_cat
- prod_type: string = None
- limit: int = 10
- price_from: int = None
- price_till: int = None
- gender: string = False
- size: string or int = None
- r: boolean = False # r=1 or r=False for not returning the prod_ref
- shop_cat: string = None
- format: json or csv –> Default: json
TODO
Adjust MongoDB Adress if API runs on different server than frontend05-hpc, currently uses ip adress instead of an url
get_product_trend.txt · Last modified: 2024/04/11 14:23 by 127.0.0.1