You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by do...@apache.org on 2016/08/29 18:11:54 UTC

[02/15] incubator-predictionio-site git commit: Based on apache/incubator-predictionio#8fa95bf5a76f2c345a1b6ede3cb2ae5a3cf2c528

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/productranking/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/productranking/quickstart/index.html b/templates/productranking/quickstart/index.html
index bd6ff63..2ed3b5a 100644
--- a/templates/productranking/quickstart/index.html
+++ b/templates/productranking/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span>               MyApp1 |    1 | 3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span>               MyApp2 |    2 | io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, let&#39;s collect some training data for the app of this Engine. By default, the Product Ranking Engine Template supports 2 types of entities: <strong>user</strong> and <strong>item</strong>, and event <strong>view</strong>. A user can view an item. This template requires &#39;$set&#39; user event, &#39;$set&#39; item event and user-view-item events.</p><p>You can send these events to PredictionIO Event Server in real-time easily by making a HTTP request or through the provided SDK. Please see <a href="/appintegration/">App Integration Overview</a> for more details how to integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer with the following <code>curl</code> commands (The corresponding SDK code is showed in other tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. N
 ote that <code>localhost:7070</code> is the default URL of the Event Server.</p><p>For convenience, set your access key to the shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for this user. To send this event, run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-85a2bb56-552c-4e1d-b5a3-324fde5c2e18">REST API</a></li> <li data-lang="python"><a href="#tab-59c865f8-9928-4f15-9cdb-ecd732e54a58">Python SDK</a></li> <li data-lang="php"><a href="#tab-fe554686-350f-4390-8305-d88988239798">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-0abf6555-d462-490e-9e42-4fdaf047bf45">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-d5c235e8-fcc1-45a6-
 9a0f-17714a8d46a0">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-85a2bb56-552c-4e1d-b5a3-324fde5c2e18"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, let&#39;s collect some training data for the app of this Engine. By default, the Product Ranking Engine Template supports 2 types of entities: <strong>user</strong> and <strong>item</strong>, and event <strong>view</strong>. A user can view an item. This template requires &#39;$set&#39; user event, &#39;$set&#39; item event and user-view-item events.</p><p>You can send these events to PredictionIO Event Server in real-time easily by making a HTTP request or through the provided SDK. Please see <a href="/appintegration/">App Integration Overview</a> for more details how to integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer with the following <code>curl</code> commands (The corresponding SDK code is showed in other tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. N
 ote that <code>localhost:7070</code> is the default URL of the Event Server.</p><p>For convenience, set your access key to the shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for this user. To send this event, run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-be3c56f1-72a5-4a59-abab-f1aa92c78598">REST API</a></li> <li data-lang="python"><a href="#tab-27deec80-4c40-4ee9-9644-22ca093055b0">Python SDK</a></li> <li data-lang="php"><a href="#tab-d1e94788-feb4-49c4-8004-52441220a1be">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-fa7f3390-4be2-49c2-8b4a-2f7735ccaf7f">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-515d51e2-dfb3-40f2-
 8e09-8d07ccd268d9">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-be3c56f1-72a5-4a59-abab-f1aa92c78598"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -47,7 +47,7 @@ Your system is all ready to go.
   "entityId" : "u0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-59c865f8-9928-4f15-9cdb-ecd732e54a58"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-27deec80-4c40-4ee9-9644-22ca093055b0"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -78,7 +78,7 @@ Your system is all ready to go.
   <span class="n">entity_type</span><span class="o">=</span><span class="s">"user"</span><span class="p">,</span>
   <span class="n">entity_id</span><span class="o">=&lt;</span><span class="n">USER_ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-fe554686-350f-4390-8305-d88988239798"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-d1e94788-feb4-49c4-8004-52441220a1be"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -103,7 +103,7 @@ Your system is all ready to go.
   <span class="s1">'entityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="nx">USER</span> <span class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-0abf6555-d462-490e-9e42-4fdaf047bf45"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-fa7f3390-4be2-49c2-8b4a-2f7735ccaf7f"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -120,7 +120,7 @@ Your system is all ready to go.
   <span class="s1">'user'</span><span class="p">,</span>
   <span class="o">&lt;</span><span class="no">USER</span> <span class="no">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-d5c235e8-fcc1-45a6-9a0f-17714a8d46a0"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-515d51e2-dfb3-40f2-8e09-8d07ccd268d9"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -145,7 +145,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityType</span><span class="o">(</span><span class="s">"user"</span><span class="o">)</span>
   <span class="o">.</span><span class="na">entityId</span><span class="o">(&lt;</span><span class="n">USER_ID</span><span class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span class="na">createEvent</span><span class="o">(</span><span class="n">userEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item &quot;i0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for the item. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-e4217e5c-4660-4c82-b515-7e5eb2e4cf8e">REST API</a></li> <li data-lang="python"><a href="#tab-b6f82fdd-5c5a-4d57-bc15-862ce714f9db">Python SDK</a></li> <li data-lang="php"><a href="#tab-fb0c38d9-94a6-45f4-9ccb-6cfc82e4fb82">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-b6444745-1038-4e5e-a24c-5b961418b827">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-75eafc97-e872-4cbe-ae56-99cd0dd9a074">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-e4217e5c-4660-4c82-b515-7e5eb2e4cf8e"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td cla
 ss="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item &quot;i0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for the item. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-36dd9ee9-5ebe-46ff-95c3-7d4cc363f7c5">REST API</a></li> <li data-lang="python"><a href="#tab-e46ef133-9632-4673-9662-f6f4d804874b">Python SDK</a></li> <li data-lang="php"><a href="#tab-cc611ee7-6a3f-4901-b2d2-59c0a8f3888b">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-0265fbbf-fb73-4ccc-8334-b22c6c27516d">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-9545d7ee-edd2-4ec6-9271-9e1bd659b74e">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-36dd9ee9-5ebe-46ff-95c3-7d4cc363f7c5"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td cla
 ss="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -160,7 +160,7 @@ Your system is all ready to go.
   "entityId" : "i0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-b6f82fdd-5c5a-4d57-bc15-862ce714f9db"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-e46ef133-9632-4673-9662-f6f4d804874b"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -173,7 +173,7 @@ Your system is all ready to go.
   <span class="n">entity_type</span><span class="o">=</span><span class="s">"item"</span><span class="p">,</span>
   <span class="n">entity_id</span><span class="o">=&lt;</span><span class="n">ITEM_ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-fb0c38d9-94a6-45f4-9ccb-6cfc82e4fb82"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-cc611ee7-6a3f-4901-b2d2-59c0a8f3888b"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -190,7 +190,7 @@ Your system is all ready to go.
 <span class="p">));</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-b6444745-1038-4e5e-a24c-5b961418b827"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-0265fbbf-fb73-4ccc-8334-b22c6c27516d"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -203,7 +203,7 @@ Your system is all ready to go.
   <span class="o">&lt;</span><span class="no">ITEM</span> <span class="no">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-75eafc97-e872-4cbe-ae56-99cd0dd9a074"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-9545d7ee-edd2-4ec6-9271-9e1bd659b74e"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -214,7 +214,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityType</span><span class="o">(</span><span class="s">"item"</span><span class="o">)</span>
   <span class="o">.</span><span class="na">entityId</span><span class="o">(&lt;</span><span class="n">ITEM_ID</span><span class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span class="na">createEvent</span><span class="o">(</span><span class="n">itemEvent</span><span class="o">)</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user &quot;u0&quot; view item &quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time will be used if eventTime is not specified), you can send a view event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-b6483e5f-bbc2-4fd1-9946-a47bededeba9">REST API</a></li> <li data-lang="python"><a href="#tab-f8b0c711-2dd4-4d84-9c92-fa1604511791">Python SDK</a></li> <li data-lang="php"><a href="#tab-bed28b93-2927-4b0a-b2d1-da382be386c8">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-e9c5615f-8e66-40b9-af37-96fa4ab7242a">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-dd9f3123-fe8b-4e63-8e92-4beb2e3b03af">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-b6483e5f-bbc2-4fd1-9946-a47bededeba9"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text
 -align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user &quot;u0&quot; view item &quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time will be used if eventTime is not specified), you can send a view event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-13e5aacc-5cf6-47aa-bce8-cec94e291225">REST API</a></li> <li data-lang="python"><a href="#tab-73ddbe8a-6377-4e80-b2e8-57f692cf5fbe">Python SDK</a></li> <li data-lang="php"><a href="#tab-b51fe532-b25c-4e51-b8e5-35fe7d5d8bf1">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-05baea84-ff7e-49fc-aff8-6ad949f86b01">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-d97b590b-06cc-4d6f-b731-9a8f7f6826d1">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-13e5aacc-5cf6-47aa-bce8-cec94e291225"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text
 -align: right"><pre class="lineno">1
 2
 3
 4
@@ -233,7 +233,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-10T12:34:56.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-f8b0c711-2dd4-4d84-9c92-fa1604511791"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-73ddbe8a-6377-4e80-b2e8-57f692cf5fbe"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -250,7 +250,7 @@ Your system is all ready to go.
   <span class="n">target_entity_type</span><span class="o">=</span><span class="s">"item"</span><span class="p">,</span>
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-bed28b93-2927-4b0a-b2d1-da382be386c8"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-b51fe532-b25c-4e51-b8e5-35fe7d5d8bf1"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -269,7 +269,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="nx">ITEM</span> <span class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-e9c5615f-8e66-40b9-af37-96fa4ab7242a"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-05baea84-ff7e-49fc-aff8-6ad949f86b01"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -286,7 +286,7 @@ Your system is all ready to go.
     <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="no">ITEM</span> <span class="no">ID</span><span class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-dd9f3123-fe8b-4e63-8e92-4beb2e3b03af"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-d97b590b-06cc-4d6f-b731-9a8f7f6826d1"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -344,14 +344,14 @@ User u10 views item i7
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed successfully and running, you should see a console message similar to the following:</p><div class="highlight shell"><table style="border-spacing: 0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted results. To rank items with IDs &quot;i1&quot;, &quot;i3&quot;, &quot;i10&quot;, &quot;i2&quot;, &quot;i5&quot;, &quot;i31&quot;, &quot;i9&quot; for user &quot;u2&quot;. You send this JSON <code>{ &quot;user&quot;: &quot;u2&quot;, &quot;items&quot;: [&quot;i1&quot;, &quot;i3&quot;, &quot;i10&quot;, &quot;i2&quot;, &quot;i5&quot;, &quot;i31&quot;, &quot;i9&quot;] }</code> to the deployed engine and it will return a JSON of the ranked items. Simply send a query by making a HTTP request or through the <code>EngineCl
 ient</code> of an SDK.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-ec6818c0-3b15-458b-9ae6-12ec3b1c8361">REST API</a></li> <li data-lang="python"><a href="#tab-5bacc608-152d-4313-812e-a19a34af95fe">Python SDK</a></li> <li data-lang="php"><a href="#tab-9ccd2fbd-7aab-4eac-878e-58f1b79b4143">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-7f337975-cbb1-43c5-8d91-c78cad1b1b4e">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-8df99d50-97a3-47d5-b362-d43e7d3d8958">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-ec6818c0-3b15-458b-9ae6-12ec3b1c8361"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted results. To rank items with IDs &quot;i1&quot;, &quot;i3&quot;, &quot;i10&quot;, &quot;i2&quot;, &quot;i5&quot;, &quot;i31&quot;, &quot;i9&quot; for user &quot;u2&quot;. You send this JSON <code>{ &quot;user&quot;: &quot;u2&quot;, &quot;items&quot;: [&quot;i1&quot;, &quot;i3&quot;, &quot;i10&quot;, &quot;i2&quot;, &quot;i5&quot;, &quot;i31&quot;, &quot;i9&quot;] }</code> to the deployed engine and it will return a JSON of the ranked items. Simply send a query by making a HTTP request or through the <code>EngineCl
 ient</code> of an SDK.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-8d3fc6a1-6bb2-49ab-ba19-0e3557b0ca7d">REST API</a></li> <li data-lang="python"><a href="#tab-f9aa1e96-9193-458d-9a98-ac6df7f6a164">Python SDK</a></li> <li data-lang="php"><a href="#tab-fb97bcb0-2a2e-4f01-9011-40ad66f5a102">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-7c249897-bfcc-4560-a0b3-83dbef6aff6d">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-8c4965df-643d-427a-b99e-834040a5a0e1">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-8d3fc6a1-6bb2-49ab-ba19-0e3557b0ca7d"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "user": "u2", "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"]}'</span> <span class="se">\</span>
 http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-5bacc608-152d-4313-812e-a19a34af95fe"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-f9aa1e96-9193-458d-9a98-ac6df7f6a164"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -362,7 +362,7 @@ http://localhost:8000/queries.json
   <span class="s">"user"</span><span class="p">:</span> <span class="s">"u2"</span><span class="p">,</span>
   <span class="s">"items"</span><span class="p">:</span> <span class="p">[</span><span class="s">"i1"</span><span class="p">,</span> <span class="s">"i3"</span><span class="p">,</span> <span class="s">"i10"</span><span class="p">,</span> <span class="s">"i2"</span><span class="p">,</span> <span class="s">"i5"</span><span class="p">,</span> <span class="s">"i31"</span><span class="p">,</span> <span class="s">"i9"</span><span class="p">]</span>
 <span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-9ccd2fbd-7aab-4eac-878e-58f1b79b4143"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-fb97bcb0-2a2e-4f01-9011-40ad66f5a102"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -385,7 +385,7 @@ http://localhost:8000/queries.json
 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-7f337975-cbb1-43c5-8d91-c78cad1b1b4e"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-7c249897-bfcc-4560-a0b3-83dbef6aff6d"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -402,7 +402,7 @@ http://localhost:8000/queries.json
   <span class="s1">'items'</span> <span class="o">=&gt;</span> <span class="p">[</span><span class="s1">'i1'</span><span class="p">,</span> <span class="s1">'i3'</span><span class="p">,</span> <span class="s1">'i10'</span><span class="p">,</span> <span class="s1">'i2'</span><span class="p">,</span> <span class="s1">'i5'</span><span class="p">,</span> <span class="s1">'i31'</span><span class="p">,</span> <span class="s1">'i9'</span><span class="p">])</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-8df99d50-97a3-47d5-b362-d43e7d3d8958"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-8c4965df-643d-427a-b99e-834040a5a0e1"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/productranking/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/productranking/quickstart/index.html.gz b/templates/productranking/quickstart/index.html.gz
index c5b79fd..32ccc15 100644
Binary files a/templates/productranking/quickstart/index.html.gz and b/templates/productranking/quickstart/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/batch-evaluator/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/batch-evaluator/index.html.gz b/templates/recommendation/batch-evaluator/index.html.gz
index 1262d75..d3d2f92 100644
Binary files a/templates/recommendation/batch-evaluator/index.html.gz and b/templates/recommendation/batch-evaluator/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/blacklist-items/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/blacklist-items/index.html.gz b/templates/recommendation/blacklist-items/index.html.gz
index d94a578..f503d1b 100644
Binary files a/templates/recommendation/blacklist-items/index.html.gz and b/templates/recommendation/blacklist-items/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/customize-data-prep/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/customize-data-prep/index.html.gz b/templates/recommendation/customize-data-prep/index.html.gz
index ba168e1..7a2b123 100644
Binary files a/templates/recommendation/customize-data-prep/index.html.gz and b/templates/recommendation/customize-data-prep/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/customize-serving/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/customize-serving/index.html.gz b/templates/recommendation/customize-serving/index.html.gz
index 25688f9..938c7c3 100644
Binary files a/templates/recommendation/customize-serving/index.html.gz and b/templates/recommendation/customize-serving/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/dase/index.html.gz b/templates/recommendation/dase/index.html.gz
index 049ff46..2c366ac 100644
Binary files a/templates/recommendation/dase/index.html.gz and b/templates/recommendation/dase/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/evaluation/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/evaluation/index.html.gz b/templates/recommendation/evaluation/index.html.gz
index c7e5d32..a122f7c 100644
Binary files a/templates/recommendation/evaluation/index.html.gz and b/templates/recommendation/evaluation/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/how-to/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/how-to/index.html.gz b/templates/recommendation/how-to/index.html.gz
index a0dfddc..11c8b6a 100644
Binary files a/templates/recommendation/how-to/index.html.gz and b/templates/recommendation/how-to/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/recommendation/quickstart/index.html b/templates/recommendation/quickstart/index.html
index 23af001..8014dd8 100644
--- a/templates/recommendation/quickstart/index.html
+++ b/templates/recommendation/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span>               MyApp1 |    1 | 3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span>               MyApp2 |    2 | io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, let&#39;s collect some training data. By default, the Recommendation Engine Template supports 2 types of events: <strong>rate</strong> and <strong>buy</strong>. A user can give a rating score to an item or he can buy an item. This template requires user-view-item and user-buy-item events.</p><div class="alert-message info"><p>This template can easily be customized to consider more user events such as <em>like</em>, <em>dislike</em> etc.</p></div><p>You can send these events to PredictionIO Event Server in real-time easily by making a HTTP request or through the provided SDK. Please see <a href="/appintegration/">App Integration Overview</a> for more details how to integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer with the following <code>curl</code> commands (The corresponding SDK code is showed in other tabs)
 .</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. Note that <code>localhost:7070</code> is the default URL of the Event Server.</p><p>For convenience, set your access key to the shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>For example, when a user with ID &quot;u0&quot; rate an item with ID &quot;i0&quot; with rating of 5 on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send the following &quot;rate&quot; event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-3845504a-03ab-4644-9fea-75cb15087087">REST API</a></li> <li data-lang="python"><a href="#tab-0a55de6f-3c82-4e3c-af36-125a4adb112a">Python SDK</a></li> <li data-lang="php"><a href="#tab-7b06d4d3-e6d7-4ab9-99a5-fc5f94ec654f">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-06a817ed-5979
 -4fdf-83a2-b58d784fa4f2">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-327c1aa3-f2c3-432b-811f-f4dad1bb5a91">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-3845504a-03ab-4644-9fea-75cb15087087"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, let&#39;s collect some training data. By default, the Recommendation Engine Template supports 2 types of events: <strong>rate</strong> and <strong>buy</strong>. A user can give a rating score to an item or he can buy an item. This template requires user-view-item and user-buy-item events.</p><div class="alert-message info"><p>This template can easily be customized to consider more user events such as <em>like</em>, <em>dislike</em> etc.</p></div><p>You can send these events to PredictionIO Event Server in real-time easily by making a HTTP request or through the provided SDK. Please see <a href="/appintegration/">App Integration Overview</a> for more details how to integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer with the following <code>curl</code> commands (The corresponding SDK code is showed in other tabs)
 .</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. Note that <code>localhost:7070</code> is the default URL of the Event Server.</p><p>For convenience, set your access key to the shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>For example, when a user with ID &quot;u0&quot; rate an item with ID &quot;i0&quot; with rating of 5 on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send the following &quot;rate&quot; event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-a62aca11-0386-45bd-871d-b79c6d242c8d">REST API</a></li> <li data-lang="python"><a href="#tab-2e2bd3ec-a7a1-4a74-b205-2c1545c46488">Python SDK</a></li> <li data-lang="php"><a href="#tab-de2a8845-8cf7-45b4-8dd5-456c5140e7a5">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-6ca813e0-ffad
 -4c97-9ace-1f1d2d8d318a">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-c6a7edc2-6a3b-483f-9063-742e7ec854a2">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-a62aca11-0386-45bd-871d-b79c6d242c8d"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -57,7 +57,7 @@ Your system is all ready to go.
   }
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-0a55de6f-3c82-4e3c-af36-125a4adb112a"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-2e2bd3ec-a7a1-4a74-b205-2c1545c46488"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -92,7 +92,7 @@ Your system is all ready to go.
     <span class="n">target_entity_id</span><span class="o">=&lt;</span><span class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span><span class="p">,</span>
     <span class="n">properties</span><span class="o">=</span> <span class="p">{</span> <span class="s">"rating"</span> <span class="p">:</span> <span class="nb">float</span><span class="p">(</span><span class="o">&lt;</span><span class="n">RATING</span><span class="o">&gt;</span><span class="p">)</span> <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-7b06d4d3-e6d7-4ab9-99a5-fc5f94ec654f"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-de2a8845-8cf7-45b4-8dd5-456c5140e7a5"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -123,7 +123,7 @@ Your system is all ready to go.
    <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span><span class="s1">'rating'</span><span class="o">=&gt;</span> <span class="o">&lt;</span><span class="nx">RATING</span><span class="o">&gt;</span><span class="p">)</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-06a817ed-5979-4fdf-83a2-b58d784fa4f2"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-6ca813e0-ffad-4c97-9ace-1f1d2d8d318a"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -150,7 +150,7 @@ Your system is all ready to go.
   <span class="p">}</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-327c1aa3-f2c3-432b-811f-f4dad1bb5a91"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-c6a7edc2-6a3b-483f-9063-742e7ec854a2"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -179,7 +179,7 @@ Your system is all ready to go.
     <span class="o">.</span><span class="na">property</span><span class="o">(</span><span class="s">"rating"</span><span class="o">,</span> <span class="k">new</span> <span class="n">Float</span><span class="o">(&lt;</span><span class="n">RATING</span><span class="o">&gt;));</span>
 <span class="n">client</span><span class="o">.</span><span class="na">createEvent</span><span class="o">(</span><span class="n">rateEvent</span><span class="o">);</span>
 
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a user with ID &quot;u1&quot; buy an item with ID &quot;i2&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time will be used if eventTime is not specified), you can send the following &quot;rate&quot; event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-8ab0cfd0-7d4d-417b-934e-0e5e0deaba50">REST API</a></li> <li data-lang="python"><a href="#tab-b16a9d23-6ddb-4671-a029-0b616747077d">Python SDK</a></li> <li data-lang="php"><a href="#tab-4265b560-f3a9-4436-b178-2e4a78a63d15">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-e7c91b26-42ef-4144-97a9-be4d3f5072c1">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-72ae2550-c9a1-4c51-9dbc-55c34ac57bd0">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-8ab0cfd0-7d4d-417b-934e-0e5e0deaba50"> <div class="highlight shell"> <table style="border-spacing: 0"><tbod
 y><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a user with ID &quot;u1&quot; buy an item with ID &quot;i2&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time will be used if eventTime is not specified), you can send the following &quot;rate&quot; event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-e9314b92-af16-49de-8e6b-41aec6a79dcf">REST API</a></li> <li data-lang="python"><a href="#tab-091b6507-ab36-4603-a98a-b224d0027877">Python SDK</a></li> <li data-lang="php"><a href="#tab-9ac3111e-d0a9-45b5-8706-3076e116e9ed">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-1712ec04-1b05-4847-ba97-a1ee173a2e46">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-49774c1f-56ca-4446-b6bc-f9633bcae849">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-e9314b92-af16-49de-8e6b-41aec6a79dcf"> <div class="highlight shell"> <table style="border-spacing: 0"><tbod
 y><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -198,7 +198,7 @@ Your system is all ready to go.
   "targetEntityId" : "i2",
   "eventTime" : "2014-11-10T12:34:56.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-b16a9d23-6ddb-4671-a029-0b616747077d"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-091b6507-ab36-4603-a98a-b224d0027877"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -213,7 +213,7 @@ Your system is all ready to go.
     <span class="n">target_entity_type</span><span class="o">=</span><span class="s">"item"</span><span class="p">,</span>
     <span class="n">target_entity_id</span><span class="o">=&lt;</span><span class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-4265b560-f3a9-4436-b178-2e4a78a63d15"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-9ac3111e-d0a9-45b5-8706-3076e116e9ed"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -232,7 +232,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="nx">ITEM</span> <span class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-e7c91b26-42ef-4144-97a9-be4d3f5072c1"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-1712ec04-1b05-4847-ba97-a1ee173a2e46"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -249,7 +249,7 @@ Your system is all ready to go.
     <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="no">ITEM</span> <span class="no">ID</span><span class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-72ae2550-c9a1-4c51-9dbc-55c34ac57bd0"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-49774c1f-56ca-4446-b6bc-f9633bcae849"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -297,17 +297,17 @@ Your system is all ready to go.
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed successfully and running, you should see a console message similar to the following:</p><div class="highlight shell"><table style="border-spacing: 0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can try to retrieve predicted results. To recommend 4 movies to user whose id is 1, you send this JSON <code>{ &quot;user&quot;: &quot;1&quot;, &quot;num&quot;: 4 }</code> to the deployed engine and it will return a JSON of the recommended movies. Simply send a query by making a HTTP request or through the <code>EngineClient</code> of an SDK.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control"> <li data-lang
 ="json"><a href="#tab-9f5cb82a-5897-4783-84ed-f2eeabb958de">REST API</a></li> <li data-lang="python"><a href="#tab-05601f7e-3b4f-43a6-b920-80f68c74325a">Python SDK</a></li> <li data-lang="php"><a href="#tab-94a8351e-34f4-4607-bb03-d1ee2b323f34">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-be80cf42-82a2-4c18-90e4-0ab11b22c70e">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-b618edf2-4678-442b-9ba6-2ecca76f8bac">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-9f5cb82a-5897-4783-84ed-f2eeabb958de"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can try to retrieve predicted results. To recommend 4 movies to user whose id is 1, you send this JSON <code>{ &quot;user&quot;: &quot;1&quot;, &quot;num&quot;: 4 }</code> to the deployed engine and it will return a JSON of the recommended movies. Simply send a query by making a HTTP request or through the <code>EngineClient</code> of an SDK.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control"> <li data-lang
 ="json"><a href="#tab-51434063-5ef2-4a94-8fee-7c00e839a0fd">REST API</a></li> <li data-lang="python"><a href="#tab-44244d63-f03b-4072-9d86-4ce755d65601">Python SDK</a></li> <li data-lang="php"><a href="#tab-a8ba8d73-70f4-4865-9546-7859bcb92c0f">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-d17369c4-2e20-46d2-8901-10e40ea1202c">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-b1d4cd2c-078e-4f2f-86b0-ce77ff12086e">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-51434063-5ef2-4a94-8fee-7c00e839a0fd"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "user": "1", "num": 4 }'</span> http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-05601f7e-3b4f-43a6-b920-80f68c74325a"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-44244d63-f03b-4072-9d86-4ce755d65601"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="kn">import</span> <span class="nn">predictionio</span>
 <span class="n">engine_client</span> <span class="o">=</span> <span class="n">predictionio</span><span class="o">.</span><span class="n">EngineClient</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="s">"http://localhost:8000"</span><span class="p">)</span>
 <span class="k">print</span> <span class="n">engine_client</span><span class="o">.</span><span class="n">send_query</span><span class="p">({</span><span class="s">"user"</span><span class="p">:</span> <span class="s">"1"</span><span class="p">,</span> <span class="s">"num"</span><span class="p">:</span> <span class="mi">4</span><span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-94a8351e-34f4-4607-bb03-d1ee2b323f34"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-a8ba8d73-70f4-4865-9546-7859bcb92c0f"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -326,7 +326,7 @@ Your system is all ready to go.
 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-be80cf42-82a2-4c18-90e4-0ab11b22c70e"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-d17369c4-2e20-46d2-8901-10e40ea1202c"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -339,7 +339,7 @@ Your system is all ready to go.
 <span class="n">response</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="nf">send_query</span><span class="p">(</span><span class="s1">'user'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="no">USER</span> <span class="no">ID</span><span class="o">&gt;</span><span class="p">,</span> <span class="s1">'num'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="no">NUMBER</span> <span class="p">(</span><span class="n">integer</span><span class="p">)</span><span class="o">&gt;</span><span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-b618edf2-4678-442b-9ba6-2ecca76f8bac"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-b1d4cd2c-078e-4f2f-86b0-ce77ff12086e"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/quickstart/index.html.gz b/templates/recommendation/quickstart/index.html.gz
index b3eb562..cd5f6af 100644
Binary files a/templates/recommendation/quickstart/index.html.gz and b/templates/recommendation/quickstart/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/reading-custom-events/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/reading-custom-events/index.html.gz b/templates/recommendation/reading-custom-events/index.html.gz
index f5a75ee..eecc9ce 100644
Binary files a/templates/recommendation/reading-custom-events/index.html.gz and b/templates/recommendation/reading-custom-events/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/recommendation/training-with-implicit-preference/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/recommendation/training-with-implicit-preference/index.html.gz b/templates/recommendation/training-with-implicit-preference/index.html.gz
index 63bbc71..993d533 100644
Binary files a/templates/recommendation/training-with-implicit-preference/index.html.gz and b/templates/recommendation/training-with-implicit-preference/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/similarproduct/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/similarproduct/dase/index.html.gz b/templates/similarproduct/dase/index.html.gz
index f5879ca..d0a51a0 100644
Binary files a/templates/similarproduct/dase/index.html.gz and b/templates/similarproduct/dase/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/similarproduct/how-to/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/similarproduct/how-to/index.html.gz b/templates/similarproduct/how-to/index.html.gz
index 7505323..d65f2e0 100644
Binary files a/templates/similarproduct/how-to/index.html.gz and b/templates/similarproduct/how-to/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/similarproduct/multi-events-multi-algos/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/similarproduct/multi-events-multi-algos/index.html.gz b/templates/similarproduct/multi-events-multi-algos/index.html.gz
index 17a13d7..aa7f77c 100644
Binary files a/templates/similarproduct/multi-events-multi-algos/index.html.gz and b/templates/similarproduct/multi-events-multi-algos/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/817db928/templates/similarproduct/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/similarproduct/quickstart/index.html b/templates/similarproduct/quickstart/index.html
index 62f2272..ea315ee 100644
--- a/templates/similarproduct/quickstart/index.html
+++ b/templates/similarproduct/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span>               MyApp1 |    1 | 3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span>               MyApp2 |    2 | io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, let&#39;s collect some training data for the app of this Engine. By default, the Similar Product Engine Template supports 2 types of entities: <strong>user</strong> and <strong>item</strong>, and event <strong>view</strong>. An item has the <strong>categories</strong> property, which is a list of category names (String). A user can view an item. Respectively, this template requires &#39;$set&#39; user event, &#39;$set&#39; item event, and user-view-item events.</p><div class="alert-message info"><p>This template can easily be customized to consider more user events such as <em>buy</em>, <em>rate</em> and <em>like</em>.</p></div><p>You can send these events to PredictionIO Event Server in real-time easily by making a HTTP request or through the provided SDK. Please see <a href="/appintegration/">App Integration Overview</a> for more detail
 s how to integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer with the following <code>curl</code> commands (The corresponding SDK code is showed in other tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. Note that <code>localhost:7070</code> is the default URL of the Event Server.</p><p>For convenience, set your access key to the shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for this user. To send this event, run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-ad216345-4bdb-4005-a4af-0b20f0adf70e">REST API</a></li> <li data-lang="python"><a href="#tab-3e36a647-478
 2-4835-a9bb-7c0d47851e13">Python SDK</a></li> <li data-lang="php"><a href="#tab-483aa2f6-ff71-4741-a992-d082d0c0104b">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-3edd70df-014f-47e4-9249-1735f2176183">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-9bf982d1-2462-4af2-90d3-f87b22058b86">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-ad216345-4bdb-4005-a4af-0b20f0adf70e"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, let&#39;s collect some training data for the app of this Engine. By default, the Similar Product Engine Template supports 2 types of entities: <strong>user</strong> and <strong>item</strong>, and event <strong>view</strong>. An item has the <strong>categories</strong> property, which is a list of category names (String). A user can view an item. Respectively, this template requires &#39;$set&#39; user event, &#39;$set&#39; item event, and user-view-item events.</p><div class="alert-message info"><p>This template can easily be customized to consider more user events such as <em>buy</em>, <em>rate</em> and <em>like</em>.</p></div><p>You can send these events to PredictionIO Event Server in real-time easily by making a HTTP request or through the provided SDK. Please see <a href="/appintegration/">App Integration Overview</a> for more detail
 s how to integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer with the following <code>curl</code> commands (The corresponding SDK code is showed in other tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. Note that <code>localhost:7070</code> is the default URL of the Event Server.</p><p>For convenience, set your access key to the shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for this user. To send this event, run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-e787fd0a-07fa-4c03-a5bd-f90474fdfb54">REST API</a></li> <li data-lang="python"><a href="#tab-d66ac68b-41b
 f-4cfd-967c-ccdb23c98ecb">Python SDK</a></li> <li data-lang="php"><a href="#tab-ba9b2d58-13aa-4708-a566-ac8712f7a166">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-6813c51a-3e9b-4a77-8bbf-ce5279a07388">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-6f49710c-523d-4396-9038-956b76c8aae3">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-e787fd0a-07fa-4c03-a5bd-f90474fdfb54"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -47,7 +47,7 @@ Your system is all ready to go.
   "entityId" : "u0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-3e36a647-4782-4835-a9bb-7c0d47851e13"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-d66ac68b-41bf-4cfd-967c-ccdb23c98ecb"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -86,7 +86,7 @@ Your system is all ready to go.
   <span class="n">event_time</span><span class="o">=</span><span class="n">datetime</span><span class="p">(</span>
     <span class="mi">2014</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mo">02</span><span class="p">,</span> <span class="mi">09</span><span class="p">,</span> <span class="mi">39</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="mi">618000</span><span class="p">,</span> <span class="n">pytz</span><span class="o">.</span><span class="n">timezone</span><span class="p">(</span><span class="s">'US/Pacific'</span><span class="p">)</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-483aa2f6-ff71-4741-a992-d082d0c0104b"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-ba9b2d58-13aa-4708-a566-ac8712f7a166"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -111,7 +111,7 @@ Your system is all ready to go.
   <span class="s1">'entityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="nx">USER</span> <span class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-3edd70df-014f-47e4-9249-1735f2176183"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-6813c51a-3e9b-4a77-8bbf-ce5279a07388"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -128,7 +128,7 @@ Your system is all ready to go.
   <span class="s1">'user'</span><span class="p">,</span>
   <span class="o">&lt;</span><span class="no">USER</span> <span class="no">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-9bf982d1-2462-4af2-90d3-f87b22058b86"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-6f49710c-523d-4396-9038-956b76c8aae3"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -153,7 +153,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityType</span><span class="o">(</span><span class="s">"user"</span><span class="o">)</span>
   <span class="o">.</span><span class="na">entityId</span><span class="o">(&lt;</span><span class="n">USER_ID</span><span class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span class="na">createEvent</span><span class="o">(</span><span class="n">userEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item &quot;i0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for the item. Note that the item is set with categories properties: <code>&quot;c1&quot;</code> and <code>&quot;c2&quot;</code>. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-47f808dd-c794-4f00-91b1-e0551c18b1af">REST API</a></li> <li data-lang="python"><a href="#tab-4d50a75b-0043-4d67-9a50-dc0e94f03960">Python SDK</a></li> <li data-lang="php"><a href="#tab-0c020e3e-a8b7-4538-937a-87b97fd67a18">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-0c2f32ef-4029-41fc-968d-2f6d01e9ca45">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-f47bedff-4dc5-4604-9d6b-c33e852c9ab2">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-47f808
 dd-c794-4f00-91b1-e0551c18b1af"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item &quot;i0&quot; is created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if eventTime is not specified), you can send a <code>$set</code> event for the item. Note that the item is set with categories properties: <code>&quot;c1&quot;</code> and <code>&quot;c2&quot;</code>. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-e9418fc9-1065-4973-bec0-1386094d9cc8">REST API</a></li> <li data-lang="python"><a href="#tab-7c404526-afe1-4504-bc1c-9ec4cd407f8c">Python SDK</a></li> <li data-lang="php"><a href="#tab-955b2920-048b-400a-8160-2e9835366a3c">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-aa49731f-04bd-449f-a177-bb6305acaade">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-1e6dedd2-dcec-4952-b032-b9b7a812c752">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-e9418f
 c9-1065-4973-bec0-1386094d9cc8"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -174,7 +174,7 @@ Your system is all ready to go.
   }
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-4d50a75b-0043-4d67-9a50-dc0e94f03960"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-7c404526-afe1-4504-bc1c-9ec4cd407f8c"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -193,7 +193,7 @@ Your system is all ready to go.
     <span class="s">"categories"</span> <span class="p">:</span> <span class="p">[</span><span class="s">"&lt;CATEGORY_1&gt;"</span><span class="p">,</span> <span class="s">"&lt;CATEGORY_2&gt;"</span><span class="p">]</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-0c020e3e-a8b7-4538-937a-87b97fd67a18"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-955b2920-048b-400a-8160-2e9835366a3c"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -214,7 +214,7 @@ Your system is all ready to go.
 <span class="p">));</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-0c2f32ef-4029-41fc-968d-2f6d01e9ca45"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-aa49731f-04bd-449f-a177-bb6305acaade"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -231,7 +231,7 @@ Your system is all ready to go.
   <span class="p">}</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-f47bedff-4dc5-4604-9d6b-c33e852c9ab2"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-1e6dedd2-dcec-4952-b032-b9b7a812c752"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -244,7 +244,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityId</span><span class="o">(&lt;</span><span class="n">ITEM_ID</span><span class="o">&gt;)</span>
   <span class="o">.</span><span class="na">property</span><span class="o">(</span><span class="s">"categories"</span><span class="o">,</span> <span class="n">ImmutableList</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="s">"&lt;CATEGORY_1&gt;"</span><span class="o">,</span> <span class="s">"&lt;CATEGORY_2&gt;"</span><span class="o">));</span>
 <span class="n">client</span><span class="o">.</span><span class="na">createEvent</span><span class="o">(</span><span class="n">itemEvent</span><span class="o">)</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user &quot;u0&quot; view item &quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time will be used if eventTime is not specified), you can send a view event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-71edec07-d181-485d-bc72-8db5a6cb7de2">REST API</a></li> <li data-lang="python"><a href="#tab-6178f4df-9c9c-496f-b5b5-09e450c61964">Python SDK</a></li> <li data-lang="php"><a href="#tab-941f7d26-0d9a-45b6-83db-5f04cebf36ff">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-e9601495-4cd4-4fc5-ad3f-5fd3e3799439">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-af65d2a9-95c6-4972-9d15-de183ccbd989">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-71edec07-d181-485d-bc72-8db5a6cb7de2"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text
 -align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user &quot;u0&quot; view item &quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time will be used if eventTime is not specified), you can send a view event. Run the following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li data-lang="json"><a href="#tab-73a9c1d9-848f-4cc3-8e8d-fb0ca1e1f340">REST API</a></li> <li data-lang="python"><a href="#tab-273279d5-660a-42a8-8937-04b78f148309">Python SDK</a></li> <li data-lang="php"><a href="#tab-7ad334ba-449b-420f-b071-1b97a24fcaf9">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-acafda85-5513-4125-870b-09348b0233df">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-37f8ed78-908f-40f6-853f-33f2512f12ac">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-73a9c1d9-848f-4cc3-8e8d-fb0ca1e1f340"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text
 -align: right"><pre class="lineno">1
 2
 3
 4
@@ -263,7 +263,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-10T12:34:56.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-6178f4df-9c9c-496f-b5b5-09e450c61964"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-273279d5-660a-42a8-8937-04b78f148309"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -280,7 +280,7 @@ Your system is all ready to go.
   <span class="n">target_entity_type</span><span class="o">=</span><span class="s">"item"</span><span class="p">,</span>
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-941f7d26-0d9a-45b6-83db-5f04cebf36ff"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-7ad334ba-449b-420f-b071-1b97a24fcaf9"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -299,7 +299,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="nx">ITEM</span> <span class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-e9601495-4cd4-4fc5-ad3f-5fd3e3799439"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-acafda85-5513-4125-870b-09348b0233df"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -316,7 +316,7 @@ Your system is all ready to go.
     <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span class="o">&lt;</span><span class="no">ITEM</span> <span class="no">ID</span><span class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-af65d2a9-95c6-4972-9d15-de183ccbd989"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-37f8ed78-908f-40f6-853f-33f2512f12ac"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -376,19 +376,19 @@ User u10 views item i29
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed successfully and running, you should see a console message similar to the following:</p><div class="highlight shell"><table style="border-spacing: 0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted results. To retrieve 4 items which are similar to item ID &quot;i1&quot;. You send this JSON <code>{ &quot;items&quot;: [&quot;i1&quot;], &quot;num&quot;: 4 }</code> to the deployed engine and it will return a JSON of the recommended items. Simply send a query by making a HTTP request or through the <code>EngineClient</code> of an SDK.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control
 "> <li data-lang="json"><a href="#tab-7440a44e-2e45-4bda-9cc0-bd9da88ad068">REST API</a></li> <li data-lang="python"><a href="#tab-2d02fb0b-18a2-43cc-bb74-2c1d461d2572">Python SDK</a></li> <li data-lang="php"><a href="#tab-4eb21c63-562d-4ad4-a7ef-4416a3ed3c6e">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-b3c14c57-7aad-41bf-aee5-b86b2570c4d6">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-6f52c601-24ae-45fc-a315-b6daa024454f">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-7440a44e-2e45-4bda-9cc0-bd9da88ad068"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine process.</p><p>By default, the deployed engine binds to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>. You can visit that page in your web browser to check its status.</p><p><img alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted results. To retrieve 4 items which are similar to item ID &quot;i1&quot;. You send this JSON <code>{ &quot;items&quot;: [&quot;i1&quot;], &quot;num&quot;: 4 }</code> to the deployed engine and it will return a JSON of the recommended items. Simply send a query by making a HTTP request or through the <code>EngineClient</code> of an SDK.</p><p>With the deployed engine running, open another temrinal and run the following <code>curl</code> command or use SDK to send the query:</p><div class="tabs"> <ul class="control
 "> <li data-lang="json"><a href="#tab-8e2fe29d-df01-4eb3-bff5-803ad38b9c72">REST API</a></li> <li data-lang="python"><a href="#tab-86567b97-64d2-42f7-949f-bd2719412a6f">Python SDK</a></li> <li data-lang="php"><a href="#tab-349aca86-af51-425b-a058-ad3e131b3f1c">PHP SDK</a></li> <li data-lang="ruby"><a href="#tab-2f84150d-8578-4a3e-956a-ee9e0beeea2c">Ruby SDK</a></li> <li data-lang="java"><a href="#tab-b24b0cdb-1a76-424b-bbae-e7065ba304d9">Java SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-8e2fe29d-df01-4eb3-bff5-803ad38b9c72"> <div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "items": ["i1"], "num": 4 }'</span> <span class="se">\</span>
 http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-2d02fb0b-18a2-43cc-bb74-2c1d461d2572"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" data-lang="python" id="tab-86567b97-64d2-42f7-949f-bd2719412a6f"> <div class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="kn">import</span> <span class="nn">predictionio</span>
 <span class="n">engine_client</span> <span class="o">=</span> <span class="n">predictionio</span><span class="o">.</span><span class="n">EngineClient</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="s">"http://localhost:8000"</span><span class="p">)</span>
 <span class="k">print</span> <span class="n">engine_client</span><span class="o">.</span><span class="n">send_query</span><span class="p">({</span><span class="s">"items"</span><span class="p">:</span> <span class="p">[</span><span class="s">"i1"</span><span class="p">],</span> <span class="s">"num"</span><span class="p">:</span> <span class="mi">4</span><span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-4eb21c63-562d-4ad4-a7ef-4416a3ed3c6e"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" data-lang="php" id="tab-349aca86-af51-425b-a058-ad3e131b3f1c"> <div class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -407,7 +407,7 @@ http://localhost:8000/queries.json
 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-b3c14c57-7aad-41bf-aee5-b86b2570c4d6"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" data-lang="ruby" id="tab-2f84150d-8578-4a3e-956a-ee9e0beeea2c"> <div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -420,7 +420,7 @@ http://localhost:8000/queries.json
 <span class="n">response</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="nf">send_query</span><span class="p">(</span><span class="s1">'items'</span> <span class="o">=&gt;</span> <span class="p">[</span><span class="s1">'i1'</span><span class="p">],</span> <span class="s1">'num'</span> <span class="o">=&gt;</span> <span class="mi">4</span><span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-6f52c601-24ae-45fc-a315-b6daa024454f"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" data-lang="java" id="tab-b24b0cdb-1a76-424b-bbae-e7065ba304d9"> <div class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4