Vous êtes sur la page 1sur 2

=== Products ===

title <str>
affiliate_ids <array<str>>
imageLink <str>
additionalImageLinks <array<str>>
description <str>
unitPriceMeasure <str>
unitPriceBaseMeasure <int>
is_bundle <bool>
gender <str | 'male', 'female', 'unisex'>
ageGroup <str | 'adult'>
category <str>

=== Attributes ===


displayValue <str>
type <marca >

=== Region ===


typr <str | neighborhood, city, state, country>
displayName <str>

=== Advertise (in arango) ===


detail <str>
category <str>
url <str>
price <float>
est_price <float>
mercado <str | "OLX", "ML">
post_img <str>
title <str>
datetime <date>
online <bool>

Mudanças::
"city":"Região de Manaus",
"region":"Brasil",
Agora são entidades/nodulos do grafo separadas

===Get similar products====

// Get all attributes for a specific product title


LET productAttributes = (FOR prod in products FILTER prod.title == "Motorola Moto
g4 16GB" FOR attri IN 1..1 OUTBOUND prod hasAttribute RETURN attri)
FOR att IN productAttributes
// Get all products that have those attributes
FOR product IN 1..1 INBOUND att hasAttribute
// Count all connections and sort them from highest to lowest
COLLECT prodname = product.title
WITH COUNT INTO number
SORT number DESC
RETURN {
name: prodname,
number: number
}

Vous aimerez peut-être aussi