Hello,

I'm playing with Jackrabbit and thinking to store all Amazon product 
information in an Jackrabbit instance.

There are about millions of products. For each product, first I will create a 
node for it. For example, I will have a node /B001/114/162/K for product 
B00114162K which is a Canon camcorder. 

For each product, I use Amazon API to get the product information from Amazon, 
which is in XML format. Below is an example. 

<Item>
  <ASIN>B00114162K</ASIN>
  <CustomerReviews>
    <AverageRating>4.5</AverageRating>
    <TotalReviews>182</TotalReviews>
    <TotalReviewPages>37</TotalReviewPages>
    <Review>
        <ASIN>B00114162K</ASIN>
        <Rating>5</Rating>
        <HelpfulVotes>0</HelpfulVotes>
        <CustomerId>A1XWEK7KWEQ7OB</CustomerId>
        <TotalVotes>0</TotalVotes>
        <Date>2009-01-15</Date>
        <Summary>please help</Summary>
        <Content>i am very interested in buying the hf100 but have a couple of 
questions that i'm hoping someone can assist me with.  first, how easy or 
difficult is it to share the video via email or post on the net.  this is very 
important to me as my primary purpose for buying the camera is to regularly 
share video of my kids with family who live far away. </Content>
    </Review>

    </Review>
        .........
    </Review>
  <CustomerReviews>
</Item>

Under the node I created for the product, I will map the xml structure to jcr 
node structure. For example, I will have a node at 
/B00/114/162/K/CustomerReviews to store the reviews. The node type is also 
called 'CustomerReviews'. This node has a property AverageRating which value is 
4.5. This node
has child node Review which contains the review information.

Use cases:

    Remove a product
    Insert a product
    select * from CustomerReivews where AverageRating > 4
    select * from Review where ASIN='xxxx' and Rating>3
    ....

Do you guys see any problem here? 

Thanks a lot,
Kevin

Reply via email to