You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by bu...@apache.org on 2016/03/26 00:31:55 UTC

[01/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Repository: incubator-asterixdb-site
Updated Branches:
  refs/heads/asf-site a1d490947 -> 08953b2e6


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/overview.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/overview.html b/docs/0.8.8-incubating/overview.html
new file mode 100644
index 0000000..0824800
--- /dev/null
+++ b/docs/0.8.8-incubating/overview.html
@@ -0,0 +1,294 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB: A Big Data Management System</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB: A Big Data Management System</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#WhatIsAsterixDB">What Is AsterixDB?</a></li>
+  
+<li><a href="#GettingAndUsingAsterixDB">Getting and Using AsterixDB</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="What_Is_AsterixDB_Back_to_TOC"></a><a name="WhatIsAsterixDB" id="WhatIsAsterixDB">What Is AsterixDB?</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>In a nutshell, AsterixDB is a full-function BDMS (Big Data Management System) with a rich feature set that distinguishes it from pretty much any other Big Data platform that&#x2019;s out and available today. We believe that its feature set makes it well-suited to modern needs such as web data warehousing and social data storage and analysis. AsterixDB has:</p>
+
+<ul>
+  
+<li>A semistructured NoSQL style data model (ADM) resulting from extending JSON with object database ideas</li>
+  
+<li>An expressive and declarative query language (AQL) that supports a broad range of queries and analysis over semistructured data</li>
+  
+<li>A parallel runtime query execution engine, Hyracks, that has been scale-tested on up to 1000+ cores and 500+ disks</li>
+  
+<li>Partitioned LSM-based data storage and indexing to support efficient ingestion and management of semistructured data</li>
+  
+<li>Support for query access to externally stored data (e.g., data in HDFS) as well as to data stored natively by AsterixDB</li>
+  
+<li>A rich set of primitive data types, including spatial and temporal data in addition to integer, floating point, and textual data</li>
+  
+<li>Secondary indexing options that include B+ trees, R trees, and inverted keyword (exact and fuzzy) index types</li>
+  
+<li>Support for fuzzy and spatial queries as well as for more traditional parametric queries</li>
+  
+<li>Basic transactional (concurrency and recovery) capabilities akin to those of a NoSQL store</li>
+</ul></div>
+<div class="section">
+<h2><a name="Getting_and_Using_AsterixDB_Back_to_TOC"></a><a name="GettingAndUsingAsterixDB" id="GettingAndUsingAsterixDB">Getting and Using AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>You are most likely here because you are interested in getting your hands on AsterixDB&#x2014;so you would like to know how to get it, how to set it up, and how to use it. The following is a list of the supporting documents that we have available today:</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p><a href="install.html">Installing AsterixDB using Managix</a> : This is our installation guide, and it is where you should start. This document will tell you how to obtain, install, and manage instances of <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">AsterixDB</a>, including both single-machine setup (for developers) as well as cluster installations (for deployment in its intended form).</p></li>
+  
+<li>
+<p><a href="aql/primer.html">AsterixDB 101: An ADM and AQL Primer</a> : This is a first-timers introduction to the user model of the AsterixDB BDMS, by which we mean the view of AsterixDB as seen from the perspective of an &#x201c;average user&#x201d; or Big Data application developer. The AsterixDB user model consists of its data modeling features (ADM) and its query capabilities (AQL). This document presents a tiny &#x201c;social data warehousing&#x201d; example and uses it as a backdrop for describing, by example, the key features of AsterixDB. By working through this document, you will learn how to define the artifacts needed to manage data in AsterixDB, how to load data into the system, how to use most of the basic features of its query language, and how to insert and delete data dynamically.</p></li>
+  
+<li>
+<p><a href="aql/datamodel.html">Asterix Data Model (ADM)</a>, <a href="aql/functions.html">Asterix Functions</a>, <a href="aql/allens.html">Asterix functions for Allen&#x2019;s Relations</a>, and <a href="aql/manual.html">Asterix Query Language (AQL)</a> : These are reference documents that catalog the primitive data types and built-in functions available in AQL and the reference manual for AQL itself.</p></li>
+  
+<li>
+<p><a href="api.html">REST API to AsterixDB</a> : Access to data in an AsterixDB instance is provided via a REST-based API. This is a short document that describes the REST API entry points and their URL syntax.</p></li>
+</ol>
+<p>To all who have now come this far: Thanks for your interest in AsterixDB, and for kicking its tires in its Beta form. In addition to getting the system and trying it out, please sign up as a member of the AsterixDB user mailing list (users (at) asterixdb.incubator.apache.org) so that you can contact us easily with your questions, issues, and other feedback. We want AsterixDB to be a &#x201c;big hit&#x201d; some day, and we are anxious to see what users do with it and to learn from that feedback what we should be working on most urgently in the next phase of the project.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/udf.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/udf.html b/docs/0.8.8-incubating/udf.html
new file mode 100644
index 0000000..5f1baa0
--- /dev/null
+++ b/docs/0.8.8-incubating/udf.html
@@ -0,0 +1,388 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Support for User Defined Functions in AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Support for User Defined Functions in AsterixDB</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Support for User Defined Functions in AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PreprocessingCollectedData">Using UDF to preprocess feed-collected data</a></li>
+  
+<li><a href="#WritingAnExternalUDF">Writing an External UDF</a></li>
+  
+<li><a href="#CreatingAnAsterixDBLibrary">Creating an AsterixDB Library</a></li>
+  
+<li><a href="#installingUDF">Installing an AsterixDB Library</a></li>
+</ul>
+<p>In this document, we describe the support for implementing, using, and installing user-defined functions (UDF) in AsterixDB. We will explain how we can use UDFs to preprocess, e.g., data collected using feeds (see the <a href="feeds/tutorial.html">feeds tutorial</a>).</p>
+<div class="section">
+<h3><a name="Installing_an_AsterixDB_Library"></a><a name="installingUDF">Installing an AsterixDB Library</a></h3>
+<p>We assume you have followed the <a href="../install.html">installation instructions</a> to set up a running AsterixDB instance. Let us refer your AsterixDB instance by the name &#x201c;my_asterix&#x201d;.</p>
+
+<ul>
+  
+<li>
+<p>Step 1: Stop the AsterixDB instance if it is in the ACTIVE state.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ managix stop -n my_asterix
+</pre></div></div></li>
+  
+<li>
+<p>Step 2: Install the library using Managix install command. Just to illustrate, we use the help command to look up the syntax</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ managix help  -cmd install
+Installs a library to an asterix instance.
+Options
+n  Name of Asterix Instance
+d  Name of the dataverse under which the library will be installed
+l  Name of the library
+p  Path to library zip bundle
+</pre></div></div></li>
+</ul>
+<p>Above is a sample output and explains the usage and the required parameters. Each library has a name and is installed under a dataverse. Recall that we had created a dataverse by the name - &#x201c;feeds&#x201d; prior to creating our datatypes and dataset. We shall name our library - &#x201c;testlib&#x201d;.</p>
+<p>We assume you have a library zip bundle that needs to be installed. To install the library, use the Managix install command. An example is shown below.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix install -n my_asterix -d feeds -l testlib -p extlibs/asterix-external-data-0.8.7-binary-assembly.zip
+</pre></div></div>
+<p>You should see the following message:</p>
+
+<div class="source">
+<div class="source">
+<pre>    INFO: Installed library testlib
+</pre></div></div>
+<p>We shall next start our AsterixDB instance using the start command as shown below.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix start -n my_asterix
+</pre></div></div>
+<p>You may now use the AsterixDB library in AQL statements and queries. To look at the installed artifacts, you may execute the following query at the AsterixDB web-console.</p>
+
+<div class="source">
+<div class="source">
+<pre>    for $x in dataset Metadata.Function
+    return $x
+
+    for $x in dataset Metadata.Library
+    return $x
+</pre></div></div>
+<p>Our library is now installed and is ready to be used.</p></div></div>
+<div class="section">
+<h2><a name="Preprocessing_Collected_Data"></a><a name="PreprocessingCollectedData" id="PreprocessingCollectedData">Preprocessing Collected Data</a></h2>
+<p>In the following we assume that you already created the <tt>TwitterFeed</tt> and its corresponding data types and dataset following the instruction explained in the <a href="feeds/tutorial.html">feeds tutorial</a>.</p>
+<p>A feed definition may optionally include the specification of a user-defined function that is to be applied to each feed record prior to persistence. Examples of pre-processing might include adding attributes, filtering out records, sampling, sentiment analysis, feature extraction, etc. We can express a UDF, which can be defined in AQL or in a programming language such as Java, to perform such pre-processing. An AQL UDF is a good fit when pre-processing a record requires the result of a query (join or aggregate) over data contained in AsterixDB datasets. More sophisticated processing such as sentiment analysis of text is better handled by providing a Java UDF. A Java UDF has an initialization phase that allows the UDF to access any resources it may need to initialize itself prior to being used in a data flow. It is assumed by the AsterixDB compiler to be stateless and thus usable as an embarrassingly parallel black box. In contrast, the AsterixDB compiler can reason about an AQL 
 UDF and involve the use of indexes during its invocation.</p>
+<p>We consider an example transformation of a raw tweet into its lightweight version called <tt>ProcessedTweet</tt>, which is defined next.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create type ProcessedTweet if not exists as open {
+        id: string,
+        user_name:string,
+        location:point,
+        created_at:string,
+        message_text:string,
+        country: string,
+        topics: {{string}}
+    };
+
+    create dataset ProcessedTweets(ProcessedTweet)
+    primary key id;
+</pre></div></div>
+<p>The processing required in transforming a collected tweet to its lighter version of type <tt>ProcessedTweet</tt> involves extracting the topics or hash-tags (if any) in a tweet and collecting them in the referred &#x201c;topics&#x201d; attribute for the tweet. Additionally, the latitude and longitude values (doubles) are combined into the spatial point type. Note that spatial data types are considered as first-class citizens that come with the support for creating indexes. Next we show a revised version of our example TwitterFeed that involves the use of a UDF. We assume that the UDF that contains the transformation logic into a &#x201c;ProcessedTweet&#x201d; is available as a Java UDF inside an AsterixDB library named &#x2018;testlib&#x2019;. We defer the writing of a Java UDF and its installation as part of an AsterixDB library to a later section of this document.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create feed ProcessedTwitterFeed if not exists
+    using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+    (&quot;consumer.key&quot;=&quot;************&quot;),
+    (&quot;consumer.secret&quot;=&quot;**************&quot;),
+    (&quot;access.token&quot;=&quot;**********&quot;),
+    (&quot;access.token.secret&quot;=&quot;*************&quot;))
+
+    apply function testlib#addHashTagsInPlace;
+</pre></div></div>
+<p>Note that a feed adaptor and a UDF act as pluggable components. These contribute towards providing a generic &#x201c;plug-and-play&#x201d; model where custom implementations can be provided to cater to specific requirements.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Building_a_Cascade_Network_of_Feeds"></a>Building a Cascade Network of Feeds</h4>
+<p>Multiple high-level applications may wish to consume the data ingested from a data feed. Each such application might perceive the feed in a different way and require the arriving data to be processed and/or persisted differently. Building a separate flow of data from the external source for each application is wasteful of resources as the pre-processing or transformations required by each application might overlap and could be done together in an incremental fashion to avoid redundancy. A single flow of data from the external source could provide data for multiple applications. To achieve this, we introduce the notion of primary and secondary feeds in AsterixDB.</p>
+<p>A feed in AsterixDB is considered to be a primary feed if it gets its data from an external data source. The records contained in a feed (subsequent to any pre-processing) are directed to a designated AsterixDB dataset. Alternatively or additionally, these records can be used to derive other feeds known as secondary feeds. A secondary feed is similar to its parent feed in every other aspect; it can have an associated UDF to allow for any subsequent processing, can be persisted into a dataset, and/or can be made to derive other secondary feeds to form a cascade network. A primary feed and a dependent secondary feed form a hierarchy. As an example, we next show an example AQL statement that redefines the previous feed &#x201c;ProcessedTwitterFeed&#x201d; in terms of their respective parent feed (TwitterFeed).</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    drop feed ProcessedTwitterFeed if exists;
+
+    create secondary feed ProcessedTwitterFeed from feed TwitterFeed
+    apply function testlib#addHashTags;
+
+    connect feed ProcessedTwitterFeed to dataset ProcessedTweets;
+</pre></div></div>
+<p>The <tt>addHashTags</tt> function is already provided in the example UDF.To see what records are being inserted into the dataset, we can perform a simple dataset scan after allowing a few moments for the feed to start ingesting data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    for $i in dataset ProcessedTweets limit 10 return $i;
+</pre></div></div>
+<p>For an example of how to write a Java UDF from scratch, the source for the example UDF that has been used in this tutorial is available <a class="externalLink" href="https://github.com/apache/incubator-asterixdb/tree/master/asterix-external-data/src/test/java/org/apache/asterix/external/library">here</a></p></div></div></div>
+<div class="section">
+<h2><a name="Unstalling_an_AsterixDB_Library"></a><a name="installingUDF">Unstalling an AsterixDB Library</a></h2>
+<p>To uninstall a library, use the Managix uninstall command as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix stop -n my_asterix
+
+    $ managix uninstall -n my_asterix -d feeds -l testlib
+</pre></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/yarn.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/yarn.html b/docs/0.8.8-incubating/yarn.html
new file mode 100644
index 0000000..df20c35
--- /dev/null
+++ b/docs/0.8.8-incubating/yarn.html
@@ -0,0 +1,693 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Introduction</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Deploying AsterixDB using YARN</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Introduction</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#arch">Architecture Overview</a></li>
+  
+<li><a href="#prereq">Prerequisites</a></li>
+  
+<li><a href="#tut">Tutorial Installation</a></li>
+  
+<li><a href="#faq">FAQ and Common Issues</a></li>
+  
+<li><a href="#detail">Reference guide to AsterixDB&#x2019;s YARN Client</a></li>
+</ul>
+<p>This is a guide describing how to deploy AsterixDB onto a YARN-based environment.</p></div>
+<div class="section">
+<h2><a name="AsterixDB_and_the_YARN_environment"></a><a name="arch" id="arch">AsterixDB and the YARN environment</a></h2>
+<p>AsterixDB uses a shared-nothing architecture and local file-based storage- not HDFS. Hence we are reliant on the local storage on each node (&#x2018;iodevices&#x2019; in AsterixDB ). In YARN there are 3 main types of storage available: </p>
+
+<ul>
+  
+<li>HDFS file storage (only suitable for long-lived artifacts, can be slower than local disk)</li>
+  
+<li>Ephemeral container storage that is cleaned by YARN after a container exits (unsuitable except for transient artifacts)</li>
+  
+<li>Node-local destinations not managed by YARN, but which are accesable by the container and live beyond its termination.</li>
+</ul>
+<p>AsterixDB uses only the last type of storage, which is available with both the DefaultContainerExecutor and LinuxContainerExecutor. However keep in mind that with the DefaultContainerExecutor, the directory must be accessable by the same process that the YARN NodeManager is running as, while with the LinuxContainerExecutor it must be accessable by the unix user who is running the job.</p></div>
+<div class="section">
+<h2><a name="Prerequisites"></a><a name="prereq" id="prereq">Prerequisites</a></h2>
+<p>For this tutorial it will be assumed that we have a YARN cluster with the proper environment variables set. To test this, try running the DistributedShell example that is distributed as part of Apache Hadoop. If that sample application can be run successfully then the environment should be acceptable for launching AsterixDB on to your YARN-enabled cluster.</p>
+<div class="section">
+<h3><a name="Vagrant_and_Puppet_Virtualized_cluster_for_Tutorial"></a>Vagrant and Puppet Virtualized cluster for Tutorial</h3>
+<p>For the purposes of this tutorial, a virtualized cluster that matches all of the tutorial configurations can be found at <a class="externalLink" href="https://github.com/parshimers/yarn-sample-cluster">https://github.com/parshimers/yarn-sample-cluster</a>. It requires a machine with about 4-8GB of RAM to run. To start with this cluster, first clone the repository:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; git clone https://github.com/parshimers/yarn-sample-cluster.git
+    Cloning into 'yarn-sample-cluster'...
+    remote: Counting objects: 490, done.
+    remote: Compressing objects: 100% (315/315), done.
+    remote: Total 490 (delta 152), reused 490 (delta 152)
+    Receiving objects: 100% (490/490), 521.34 KiB | 201.00 KiB/s, done.
+    Resolving deltas: 100% (152/152), done.
+    Checking connectivity... done.
+</pre></div></div>
+<p>If the &#x2018;hostmanager&#x2019; plugin for Vagrant isn&#x2019;t already installed, install it like so:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant plugin install vagrant-hostmanager
+    Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
+    Installed the plugin 'vagrant-hostmanager (1.5.0)'!
+</pre></div></div>
+<p>Then start the tutorial cluster. The hostmanger plugin may ask for sudo at some point, because it updates your hosts file to include the virtual machines.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant up
+    Bringing machine 'nc2' up with 'virtualbox' provider...
+    Bringing machine 'nc1' up with 'virtualbox' provider...
+    Bringing machine 'cc' up with 'virtualbox' provider...
+    ...
+</pre></div></div>
+<p>Once vagrant returns, the environment will be ready. The working directory with the Vagrantfile is also visible to each of the virtual machines (in the /vagrant directory), so we will unzip the Asterix binaries here as well for easy access. The YARN binary can be found on the AsterixDB <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">downloads page</a></p>
+
+<div class="source">
+<div class="source">
+<pre>&#x21aa; unzip -d asterix-yarn/ asterix-yarn-binary-assembly.zip
+...
+</pre></div></div>
+<p>To log into the node from which we will run the rest of the tutorial, use &#x2018;vagrant ssh&#x2019; to get to the CC node and move to the YARN client&#x2019;s location:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant ssh cc
+    [vagrant@cc ~]$
+    [vagrant@cc ~]$ cd /vagrant/asterix-yarn
+    [vagrant@cc asterix-yarn]$ 
+</pre></div></div>
+<h1><a name="tut" id="tut">Tutorial installation</a></h1></div></div>
+<div class="section">
+<h2><a name="Configuration"></a>Configuration</h2>
+<p>To deploy AsterixDB onto a YARN cluster, we need to construct a configuration file that describes the resources that will be requested from YARN for AsterixDB. </p>
+
+<div class="source">
+
+<div class="source">
+<pre>
+<img src="images/yarn_clust.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." />
+<i>Fig. 1</i>:  Illustration of a simple YARN cluster with AsterixDB processes and their locations
+</pre></div>
+</div>
+<p>This AsterixDB cluster description file corresponds to the above deployed scenario.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;cluster xmlns=&quot;yarn_cluster&quot;&gt;
+        &lt;name&gt;my_awesome_instance&lt;/name&gt;
+        &lt;txn_log_dir&gt;/home/yarn/&lt;/txn_log_dir&gt;
+        &lt;iodevices&gt;/home/yarn/&lt;/iodevices&gt;
+        &lt;store&gt;asterix-data&lt;/store&gt;
+        &lt;master_node&gt;
+            &lt;id&gt;cc&lt;/id&gt;
+            &lt;client_ip&gt;10.10.0.2&lt;/client_ip&gt;
+            &lt;cluster_ip&gt;10.10.0.2&lt;/cluster_ip&gt;
+            &lt;client_port&gt;1098&lt;/client_port&gt;
+            &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+            &lt;http_port&gt;8888&lt;/http_port&gt;
+        &lt;/master_node&gt;
+        &lt;node&gt;
+            &lt;id&gt;nc1&lt;/id&gt;
+            &lt;cluster_ip&gt;10.10.0.3&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+        &lt;node&gt;
+            &lt;id&gt;nc2&lt;/id&gt;
+            &lt;cluster_ip&gt;10.10.0.4&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+        &lt;metadata_node&gt;nc1&lt;/metadata_node&gt;
+    &lt;/cluster&gt;
+</pre></div></div>
+<p>In this example we have 3 NCs and one CC. Each node is defined by a unique name (not necessarily hostname) and an IP on which AsterixDB nodes will listen and communicate with eachother. This is the &#x2018;cluster_ip&#x2019; parameter. The &#x2018;client_ip&#x2019; parameter is the interface on which client-facing services are presented, for example the web interface. For the next step this file will be saved as &#x2018;my_awesome_cluster_desc.xml&#x2019; in the configs directory.</p></div>
+<div class="section">
+<h2><a name="Installing_and_starting_the_instance"></a>Installing and starting the instance</h2>
+<p>With this configuration in hand, the YARN client can be used to deploy AsterixDB onto the cluster:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance -c configs/my_awesome_cluster_desc.xml install
+    Waiting for new AsterixDB Instance to start  .
+    Asterix successfully deployed and is now running.
+</pre></div></div>
+<p>The instance will be visible in the YARN RM similar to the below image 
+<div class="source"> </p>
+<div class="source">
+<pre> <img src="images/running_inst.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." /> <i>Fig. 2</i>: Hadoop YARN Resource Manager dashboard with running AsterixDB instance </pre></div> </div>
+<p>Once the client returns success, the instance is now ready to be used. We can now use the asterix instance at the CC&#x2019;s IP (10.10.0.2), on the default port (19001).</p>
+
+<div class="source">
+
+<div class="source">
+<pre>
+<img src="images/asterix_webui.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." />
+<i>Fig. 3</i>:  AsterixDB Web User Interface
+</pre></div>
+</div>
+<p>From here, to try things out we could run the ADM &amp; AQL 101 tutorial or any other sample workload.</p></div>
+<div class="section">
+<h2><a name="Stopping_the_instance"></a>Stopping the instance</h2>
+<p>To stop the instance that was just deployed, the <tt>stop</tt> command is used:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance stop
+    Stopping instance my_awesome_instance
+</pre></div></div>
+<p>This attempts a graceful shutdown of the instance. If for some reason this does not succeed, the <tt>kill</tt> action can be used to force shutdown in a similar fashion:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance kill
+    Are you sure you want to kill this instance? In-progress tasks will be aborted
+    Are you sure you want to do this? (yes/no): yes
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Managing_stopped_instances"></a>Managing stopped instances</h2>
+<p>After stopping the instance no containers on any YARN NodeManagers are allocated. However, the state of the instance is still persisted on the local disks (and to a lesser extent, HDFS) of each machine where a Node Controller was deployed, in the iodevices and transaction log folders. Every instance, running or not can be viewed via the <tt>describe</tt> action:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix describe
+    Existing AsterixDB instances:
+    Instance my_awesome_instance is stopped
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Starting_inactive_instances"></a>Starting inactive instances</h2>
+<p>To start the instance back up once more, the <tt>start</tt> action is used:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance start
+    Waiting for AsterixDB instance to resume .
+    Asterix successfully deployed and is now running.
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Shutting_down_vagrant"></a>Shutting down vagrant</h2>
+<p>To stop the virtual machines, issue the vagrant halt command from the host machine in the folder containing the Vagrantfile:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant halt
+</pre></div></div>
+<h1><a name="detail" id="detail">Listing of Commands and Options</a></h1></div>
+<div class="section">
+<h2><a name="Overview"></a>Overview</h2>
+<p>All commands take the format</p>
+
+<div class="source">
+<div class="source">
+<pre>    asterix [action-specific option] [action]
+</pre></div></div>
+<div class="section">
+<h3><a name="Technical_details"></a>Technical details</h3>
+<p>AsterixDB&#x2019;s YARN client is based on static allocation of containers within Node Managers based on IP. The AM and CC processes are currently not integrated in any fashion.</p>
+<p>The <tt>asterix</tt> command itself is simply a wrapper/launcher around the AsterixClient java class, that provides time-saving default parameters. It is possible to run the client directly with <tt>java -jar</tt> given the correct options as well.</p></div></div>
+<div class="section">
+<h2><a name="Actions"></a>Actions</h2>
+<p>Below is a description of the various actions available via the AsterixDB YARN client</p>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th>Action </th>
+      
+<th>Description </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td><tt>start</tt> </td>
+      
+<td>Starts an existing instance specified by the -name flag </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>install</tt> </td>
+      
+<td>Deploys and starts an AsterixDB instance described by the config specified in the -c parameter, and named by the -n parameter </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>stop</tt> </td>
+      
+<td>Attempts graceful shutdown of an AsterixDB instance specified in the -name parameter </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>kill</tt> </td>
+      
+<td>Forcefully stops an instance by asking YARN to terminate all of its containers. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>destroy</tt> </td>
+      
+<td>Remove the instance specified by -name and all of its stored resources from the cluster </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>describe</tt> </td>
+      
+<td>Show all instances, running or not, visible to the AsterixDB YARN client </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>backup</tt> </td>
+      
+<td>Copies the artifacts from a stopped instance to another directory on HDFS so that the instance can be reverted to that state </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>restore</tt> </td>
+      
+<td>Restores an instance to the state saved in a snapshot </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>lsbackup</tt> </td>
+      
+<td>Lists the stored snapshots from an instance </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>rmbackup</tt> </td>
+      
+<td>Removes a snapshot from HDFS </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>libinstall</tt></td>
+      
+<td>Installs an external library or UDF for use in queries </td>
+    </tr>
+  </tbody>
+</table></div>
+<div class="section">
+<h2><a name="Options"></a>Options</h2>
+<p>Below are all availabe options, and which actions they can be applied to</p>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th>Option </th>
+      
+<th>Long Form </th>
+      
+<th>Short Form </th>
+      
+<th>Usage </th>
+      
+<th>Applicability </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td>Configuration Path </td>
+      
+<td><tt>-asterixConf</tt> </td>
+      
+<td><tt>-c</tt> </td>
+      
+<td><tt>-c [/path/to/file]</tt>. Path to an AsterixDB Cluster Description File </td>
+      
+<td>Only required with <tt>create</tt> . A configuration in DFS defines the existance of an instance. </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Instance Name </td>
+      
+<td><tt>-name</tt> </td>
+      
+<td><tt>-n</tt> </td>
+      
+<td><tt>-n [instance name]</tt> Name/Identifier for instance. </td>
+      
+<td>Required for all actions except <tt>describe</tt> and <tt>lsbackup</tt> </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Asterix Binary Path </td>
+      
+<td><tt>-asterixTar</tt> </td>
+      
+<td><tt>-tar</tt> </td>
+      
+<td><tt>-tar [/path/to/binary]</tt> Path to asterix-server binary. </td>
+      
+<td>This is the AsterixDB server binary that is distributed and run on the DFS. Usually set by default via the launcher script and cached for each instance. Can be manually set, only used in <tt>create</tt> and <tt>install</tt> with <tt>-r</tt> </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Force </td>
+      
+<td><tt>-force</tt> </td>
+      
+<td><tt>-f</tt> </td>
+      
+<td><tt>-f</tt>. Use at your own risk. Disables any sanity-checking during an action. </td>
+      
+<td>Can be applied to any action, but is mostly useful in cases where an instance cannot be removed properly via <tt>destroy</tt> and cleanup of DFS files is desired. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Refresh </td>
+      
+<td><tt>-refresh</tt> </td>
+      
+<td><tt>-r</tt> </td>
+      
+<td><tt>-r</tt>. Replaces cached binary with one mentioned in <tt>-tar</tt>. </td>
+      
+<td>This only has an effect with the <tt>start</tt> action. It can be used to replace/upgrade the binary cached for an instance on the DFS. </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Base Parameters </td>
+      
+<td><tt>-baseConf</tt> </td>
+      
+<td><tt>-bc</tt> </td>
+      
+<td><tt>-bc [path/to/params]</tt>. Specifies parameter file to use during instance creation/alteration. </td>
+      
+<td>This file specifies various internal properties of the AsterixDB system, such as Buffer Cache size and Page size, among many others. It can be helpful to tweak parameters in this file, however caution should be exercised in keeping them at sane values. Only used during <tt>alter</tt> and <tt>create</tt>. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>External library path </td>
+      
+<td><tt>-externalLibs</tt> </td>
+      
+<td><tt>-l</tt> </td>
+      
+<td><tt>-l [path/to/library]</tt>. Specifies an external library to upload to an existing instance. </td>
+      
+<td>Only used in <tt>libinstall</tt>. Specifies the file containing the external function to install </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>External library dataverse. </td>
+      
+<td><tt>-libDataverse</tt> </td>
+      
+<td><tt>-ld</tt> </td>
+      
+<td><tt>-ld [existing dataverse name]</tt> </td>
+      
+<td>Only used in <tt>libinstall</tt>. Specifies the dataverse to install the library in an <tt>-l</tt> option to. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Snapshot ID </td>
+      
+<td><tt>-snapshot</tt> </td>
+      
+<td>[none] </td>
+      
+<td><tt>-snapshot [backup timestamp/ID]</tt> </td>
+      
+<td>Used with <tt>rmbackup</tt> and <tt>restore</tt> to specify which backup to perform the respective operation on. </td>
+    </tr>
+  </tbody>
+</table>
+<h1><a name="faq" id="faq">Frequently Asked Questions and Common Issues</a></h1>
+<div class="section">
+<h3><a name="Q:_Where_are_the_AsterixDB_logs_located"></a>Q: Where are the AsterixDB logs located?</h3>
+<p>A: YARN manages the logs for each container. They are visible in the YARN Resource Manager&#x2019;s web interface or through the hadoop command line utilities ( see <a class="externalLink" href="http://hortonworks.com/blog/simplifying-user-logs-management-and-access-in-yarn/">http://hortonworks.com/blog/simplifying-user-logs-management-and-access-in-yarn/</a> for more details). </p></div>
+<div class="section">
+<h3><a name="Q:_Why_does_AsterixDB_fail_to_start_and_the_logs_contain_errors_like_Container_is_running_beyond_virtual_memory_limits._"></a>Q: Why does AsterixDB fail to start, and the logs contain errors like &#x2018;Container is running beyond virtual memory limits.&#x2019; ?</h3>
+<p>A: This is a quirk of YARN&#x2019;s memory management that can be observed on certain operating systems (mainly CentOS). It is benign unless it causes problems of this type. A work around is to set <tt>yarn.nodemanager.vmem-check-enabled</tt> to <tt>false</tt> in the yarn-site.xml configuration for Hadoop YARN. This makes the NodeManagers avoid checking the virtual memory entirely and instead rely on resident set size to check memory usage among containers.</p></div>
+<div class="section">
+<h3><a name="Q:_How_do_I_upgrade_my_existing_instance"></a>Q: How do I upgrade my existing instance?</h3>
+<p>A: This is a complex question. Generally, one can use the <tt>refresh</tt> option to upgrade the version of an extant AsterixDB instance. However one must be cautious- we do not guarantee ABI compatability between releases. Therefore extreme caution should be exercised when attempting to upgrade this way!</p></div>
+<div class="section">
+<h3><a name="Q:_Does_AsterixDB_work_on_YARN_for_Windows"></a>Q: Does AsterixDB work on YARN for Windows?</h3>
+<p>A: In general, yes! It has been done without much real issue. However it is a infrequent use case, so expect the deployment to have some hiccups. We&#x2019;re always listening on the <a class="externalLink" href="mailto:users@asterixdb.incubator.apache.org">users@asterixdb.incubator.apache.org</a> mailing list for any issues.</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[07/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css b/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css
new file mode 100644
index 0000000..7db4133
--- /dev/null
+++ b/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap v2.1.0
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:con
 tent-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0
  1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offs
 et1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.9
 14893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{mar
 gin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25
 .53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:20px;font-weight:200;line-height:30px}small{font-size:8
 5%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal dt{float:left;width:120px;overflow:hidden;
 clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:130px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px
 ;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-we
 ight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea{width:210px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"]
 ,.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-
 box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #bbb}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)
 ;box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*
 ="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.unedit
 able-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .h
 elp-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning .checkbox:focus,.control-group.warning .radio:focus,.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error 
 .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error .checkbox:focus,.control-group.error .radio:focus,.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control
 -group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success .checkbox:focus,.control-group.success .radio:focus,.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}input:focus:required:invalid,textarea:focus:required:invalid,selec
 t:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:1
 4px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{margin-left:-1px;vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 
 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;pad
 ding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.for
 m-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inli
 ne .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:160px}.form-horizontal .help-block{margin-top:10px;margin-bottom:0}.form-horizontal .form-actions{padding-left:160px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-alig
 n:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child
  td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-b
 ordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-right-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-s
 triped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}table .span1{float:none;width:44px;margin-left:0}table .span2{float:none;width:124px;margin-left:0}table .span3{float:none;width:204px;margin-left:0}table .span4{float:none;width:284px;margin-left:0}table .span5{float:none;width:364px;margin-left:0}table .span6{float:none;width:444px;margin-left:0}table .span7{float:none;width:524px;margin-left:0}table .span8{float:none;width:604px;margin-left:0}table .span9{float:none;width:684px;margin-left:0}table .span10{float:none;width:764px;margin-left:0}table .span11{float:none;width:844px;margin-left:0}table .span12{float:none;width:924px;margin-left:0}table .span13{float:none;width:1004px;margin-left:0}table .span14{float:none;width:1084px;margin-left:0}table .span15{float:none;width:1164px;margin-left:
 0}table .span16{float:none;width:1244px;margin-left:0}table .span17{float:none;width:1324px;margin-left:0}table .span18{float:none;width:1404px;margin-left:0}table .span19{float:none;width:1484px;margin-left:0}table .span20{float:none;width:1564px;margin-left:0}table .span21{float:none;width:1644px;margin-left:0}table .span22{float:none;width:1724px;margin-left:0}table .span23{float:none;width:1804px;margin-left:0}table .span24{float:none;width:1884px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.info td{background-color:#d9edf7}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav>.active>a>[class^="icon-"],.nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[clas
 s^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{back
 ground-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.ic
 on-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72p
 x}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px
 }.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{backgrou
 nd-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-
 certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.car
 et{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:blo
 ck;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100
 %,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:"\2191"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.d
 ropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-rad
 ius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;overflow:visible \9;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 14px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);
 vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-
 shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2p
 x rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:2px}.btn-small{padding:3px 9px;font-size:12px;line-height:18px}.btn-small [class^="icon-"]{margin-top:0}.btn-mini{padding:2px 6px;font-size:11px;line-height:16px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1p
 x 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-image:-moz-linear-gradient(top,#08c,#04c);background-repeat:repeat-x;border-color:#04c #0044cc #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89
 406;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-webki
 t-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-webkit-gradient(linear,0 0,0 100%,from
 (#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));backgr
 ound-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);backgr
 ound-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-image:-moz-linear-gradient(top,#444,#222);background-repeat:repeat-x;border-color:#222 #222222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{
 *padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-group{position:relative;*margin-left:.3em;font-size:0;white-space:nowrap}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group
 >.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;b
 order-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn
 -large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5p
 x;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-bo
 rder-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;t
 ext-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-
 bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eeeeee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radi
 us:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#f
 ff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a
 {-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #dddddd #eee #eeeeee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-
 border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eeeeee #eee #dddddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#555}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radiu
 s:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#555;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#555}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:6px}.navbar .btn-group .btn{margin:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .rad
 io,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;width:100%;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fix
 ed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner,.navbar-static-top .navbar-inner{border:0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;displ
 ay:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#555;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);back
 ground-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-co
 lor:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6
 px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:
 auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .act
 ive>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shado
 w:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-
 webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-image:-moz-linear-gradient(top,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;borde
 r-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{height:40px;margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination li{display:inline}.pagination a,.pagination span{float:left;padding:0 14px;line-height:38px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination a:hover,.pagination .active a,.pagination .active span{background-color:#f5f5f5}.pagination .active a,.pagination .active span{color:#999;cursor:default}.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999;cursor:default;background-color:transparent}.paginatio
 n li:first-child a,.pagination li:first-child span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination li:last-child a,.pagination li:last-child span{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover{color:#999;cursor:default;background-color:#fff}.modal-open .dropdown-menu{z-index:2050}.modal-open .dropdow
 n.open{*z-index:2050}.modal-open .popover{z-index:2060}.modal-open .tooltip{z-index:2080}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3
 s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{m
 argin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);
 -webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-bottom:10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-le
 ft:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:bo
 th}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.label,.badge{font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.lab
 el{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from
 {background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff
 f5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border
 -box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparen
 t 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5
 f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-l
 inear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(star
 tColorstr='#ff62c462',endColorstr

<TRUNCATED>


[14/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/filters.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/filters.html b/docs/0.8.8-incubating/aql/filters.html
new file mode 100644
index 0000000..5f3185b
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/filters.html
@@ -0,0 +1,272 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Filter-Based LSM Index Acceleration</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Filter-Based LSM Index Acceleration</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Filter-Based LSM Index Acceleration</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Motivation">Motivation</a></li>
+  
+<li><a href="#FiltersInAsterixDB">Filters in AsterixDB</a></li>
+  
+<li><a href="#FiltersAndMergePolicies">Filters and Merge Policies</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_Back_to_TOC"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Traditional relational databases usually employ conventional index structures such as B+ trees due to their low read latency. However, such traditional index structures use in-place writes to perform updates, resulting in costly random writes to disk. Today&#x2019;s emerging applications often involve insert-intensive workloads for which the cost of random writes prohibits efficient ingestion of data. Consequently, popular NoSQL systems such as Cassandra, HBase, LevelDB, BigTable, etc. have adopted Log-Structured Merge (LSM) Trees as their storage structure. LSM-trees avoids the cost of random writes by batching updates into a component of the index that resides in main memory &#x2013; an <i>in-memory component</i>. When the space occupancy of the in-memory component exceeds a specified threshold, its entries are <i>flushed</i> to disk forming a new component &#x2013; a <i>disk component</i>. As disk components accumulate on disk, they are periodically merged together subject to 
 a <i>merge policy</i> that decides when and what to merge. The benefit of the LSM-trees comes at the cost of possibly sacrificing read efficiency, but, it has been shown in previous studies that these inefficiencies can be mostly mitigated.</p>
+<p>AsterixDB has also embraced LSM-trees, not just by using them as primary indexes, but also by using the same LSM-ification technique for all of its secondary index structures. In particular, AsterixDB adopted a generic framework for converting a class of indexes (that includes conventional B+ trees, R trees, and inverted indexes) into LSM-based secondary indexes, allowing higher data ingestion rates. In fact, for certain index structures, our results have shown that using an LSM-based version of an index can be made to significantly outperform its conventional counterpart for <i>both</i> ingestion and query speed (an example of such an index being the R-tree for spatial data).</p>
+<p>Since an LSM-based index naturally partitions data into multiple disk components, it is possible, when answering certain queries, to exploit partitioning to only access some components and safely filter out the remaining components, thus reducing query times. For instance, referring to our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, suppose a user always retrieves tweets from the <tt>TweetMessages</tt> dataset based on the <tt>send-time</tt> field (e.g., tweets posted in the last 24 hours). Since there is not a secondary index on the <tt>send-time</tt> field, the only available option for AsterixDB would be to scan the whole <tt>TweetMessages</tt> dataset and then apply the predicate as a post-processing step. However, if disk components of the primary index were tagged with the minimum and maximum timestamp values of the records they contain, we could utilize the tagged information to directly access the primary index and prune comp
 onents that do not match the query predicate. Thus, we could save substantial cost by avoiding scanning the whole dataset and only access the relevant components. We simply call such tagging information that are associated with components, filters. (Note that even if there were a secondary index on <tt>send-time</tt> field, using filters could save substantial cost by avoiding accessing the secondary index, followed by probing the primary index for every fetched entry.) Moreover, the same filtering technique can also be used with any secondary LSM index (e.g., an LSM R-tree), in case the query contains multiple predicates (e.g., spatial and temporal predicates), to obtain similar pruning power.</p></div>
+<div class="section">
+<h2><a name="Filters_in_AsterixDB_Back_to_TOC"></a><a name="FiltersInAsterixDB" id="FiltersInAsterixDB">Filters in AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We have added support for LSM-based filters to all of AsterixDB&#x2019;s index types. To enable the use of filters, the user must specify the filter&#x2019;s key when creating a dataset, as shown below:</p>
+<div class="section">
+<div class="section">
+<h4><a name="Creating_a_Dataset_with_a_Filter"></a>Creating a Dataset with a Filter</h4>
+
+<div class="source">
+<div class="source">
+<pre>    create dataset Tweets(TweetType) primary key tweetid with filter on send-time;
+</pre></div></div>
+<p>Filters can be created on any totally ordered datatype (i.e., any field that can be indexed using a B+ -tree), such as integers, doubles, floats, UUIDs, datetimes, etc.</p>
+<p>When a dataset with a filter is created, the name of the filter&#x2019;s key field is persisted in the <tt>Metadata.Dataset</tt> dataset (which is the metadata dataset that stores the details of each dataset in an AsterixDB instance) so that DML operations against the dataset can recognize the existence of filters and can update them or utilize them accordingly. Creating a dataset with a filter in AsterixDB implies that the primary and all secondary indexes of that dataset will maintain filters on their disk components. Once a filtered dataset is created, the user can use the dataset normally (just like any other dataset). AsterixDB will automatically maintain the filters and will leverage them to efficiently answer queries whenever possible (i.e., when a query has predicates on the filter&#x2019;s key).</p></div></div></div>
+<div class="section">
+<h2><a name="Filters_and_Merge_Policies_Back_to_TOC"></a><a name="FiltersAndMergePolicies" id="FiltersAndMergePolicies">Filters and Merge Policies</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The AsterixDB default merge policy, the prefix merge policy, relies on component sizes and the number of components to decide which components to merge. This merge policy has proven to provide excellent performance for both ingestion and queries. However, when evaluating our filtering solution with the prefix policy, we observed a behavior that can reduce filter effectiveness. In particular, we noticed that under the prefix merge policy, the disk components of a secondary index tend to be constantly merged into a single component. This is because the prefix policy relies on a single size parameter for all of the indexes of a dataset. This parameter is typically chosen based on the sizes of the disk components of the primary index, which tend to be much larger than the sizes of the secondary indexes&#x2019; disk components. This difference caused the prefix merge policy to behave similarly to the constant merge policy (i.e., relatively poorly) when applied to secondary indexes in 
 the sense that the secondary indexes are constantly merged into a single disk component. Consequently, the effectiveness of filters on secondary indexes was greatly reduced under the prefix-merge policy, but they were still effective when probing the primary index. Based on this behavior, we developed a new merge policy, an improved version of the prefix policy, called the correlated-prefix policy. The basic idea of this policy is that it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests to the I/O scheduler on behalf of all other indexes associated with the same dataset. The end result is that secondary indexes will always have the same number of disk components as their primary index under the correlated-prefix merge policy. This has improved query perfor
 mance, since disk components of secondary indexes now have a much better chance of being pruned.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[11/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/manual.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/manual.html b/docs/0.8.8-incubating/aql/manual.html
new file mode 100644
index 0000000..b5a02ed
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/manual.html
@@ -0,0 +1,1029 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; The Asterix Query Language, Version 1.0</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Asterix Query Language (AQL)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>The Asterix Query Language, Version 1.0</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Introduction">1. Introduction</a></li>
+  
+<li><a href="#Expressions">2. Expressions</a></li>
+  
+<li><a href="#Statements">3. Statements</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="a1._Introduction_Back_to_TOC"></a><a name="Introduction" id="Introduction">1. Introduction</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
+<p>This document is intended as a reference guide to the full syntax and semantics of the Asterix Query Language (AQL), the language for talking to AsterixDB. This guide covers both the data manipulation language (DML) aspects of AQL, including its support for queries and data modification, as well as its data definition language (DDL) aspects.  New AsterixDB users are encouraged to read and work through the (friendlier) guide &#x201c;AsterixDB 101: An ADM and AQL Primer&#x201d; before attempting to make use of this document. In addition, readers are advised to read and understand the Asterix Data Model (ADM) reference guide since a basic understanding of ADM concepts is a prerequisite to understanding AQL. In what follows, we detail the features of the AQL language in a grammar-guided manner: We list and briefly explain each of the productions in the AQL grammar, offering examples for clarity in cases where doing so seems needed or helpful.</p></div>
+<div class="section">
+<h2><a name="a2._Expressions_Back_to_TOC"></a><a name="Expressions" id="Expressions">2. Expressions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+
+<div class="source">
+<div class="source">
+<pre>Query ::= Expression
+</pre></div></div>
+<p>An AQL query can be any legal AQL expression.</p>
+
+<div class="source">
+<div class="source">
+<pre>Expression ::= ( OperatorExpr | IfThenElse | FLWOR | QuantifiedExpression )
+</pre></div></div>
+<p>AQL is a fully composable expression language. Each AQL expression returns zero or more Asterix Data Model (ADM) instances. There are four major kinds of expressions in AQL. At the topmost level, an AQL expression can be an OperatorExpr (similar to a mathematical expression), an IfThenElse (to choose between two alternative values), a FLWOR expression (the heart of AQL, pronounced &#x201c;flower expression&#x201d;), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we explore the full AQL grammar.</p>
+<div class="section">
+<h3><a name="Primary_Expressions"></a>Primary Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>PrimaryExpr ::= Literal
+              | VariableRef
+              | ParenthesizedExpression
+              | FunctionCallExpr
+              | DatasetAccessExpression
+              | ListConstructor
+              | RecordConstructor
+</pre></div></div>
+<p>The most basic building block for any AQL expression is the PrimaryExpr. This can be a simple literal (constant) value, a reference to a query variable that is in scope, a parenthesized expression, a function call, an expression accessing the ADM contents of a dataset, a newly constructed list of ADM instances, or a newly constructed ADM record.</p>
+<div class="section">
+<h4><a name="Literals"></a>Literals</h4>
+
+<div class="source">
+<div class="source">
+<pre>Literal        ::= StringLiteral
+                 | IntegerLiteral
+                 | FloatLiteral
+                 | DoubleLiteral
+                 | &quot;null&quot;
+                 | &quot;true&quot;
+                 | &quot;false&quot;
+StringLiteral  ::= (&quot;\&quot;&quot; (&lt;ESCAPE_QUOT&gt; | ~[&quot;\&quot;&quot;])* &quot;\&quot;&quot;)
+                 | (&quot;\'&quot; (&lt;ESCAPE_APOS&gt; | ~[&quot;\'&quot;])* &quot;\'&quot;)
+&lt;ESCAPE_QUOT&gt;  ::= &quot;\\\&quot;&quot;
+&lt;ESCAPE_APOS&gt;  ::= &quot;\\\'&quot;
+IntegerLiteral ::= &lt;DIGITS&gt;
+&lt;DIGITS&gt;       ::= [&quot;0&quot; - &quot;9&quot;]+
+FloatLiteral   ::= &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+                 | &lt;DIGITS&gt; ( &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; ) )?
+                 | &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+DoubleLiteral  ::= &lt;DIGITS&gt;
+                 | &lt;DIGITS&gt; ( &quot;.&quot; &lt;DIGITS&gt; )?
+                 | &quot;.&quot; &lt;DIGITS&gt;
+</pre></div></div>
+<p>Literals (constants) in AQL can be strings, integers, floating point values, double values, boolean constants, or the constant value null. The null value in AQL has &#x201c;unknown&#x201d; or &#x201c;missing&#x201d; value semantics, similar to (though not identical to) nulls in the relational query language SQL.</p>
+<p>The following are some simple examples of AQL literals. Since AQL is an expression language, each example is also a complete, legal AQL query (!).</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>&quot;a string&quot;
+42
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Variable_References"></a>Variable References</h4>
+
+<div class="source">
+<div class="source">
+<pre>VariableRef ::= &lt;VARIABLE&gt;
+&lt;VARIABLE&gt;  ::= &quot;$&quot; &lt;LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt; | &quot;_&quot;)*
+&lt;LETTER&gt;    ::= [&quot;A&quot; - &quot;Z&quot;, &quot;a&quot; - &quot;z&quot;]
+</pre></div></div>
+<p>A variable in AQL can be bound to any legal ADM value. A variable reference refers to the value to which an in-scope variable is bound. (E.g., a variable binding may originate from one of the for or let clauses of a FLWOR expression or from an input parameter in the context of an AQL function body.)</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>$tweet
+$id
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Parenthesized_Expressions"></a>Parenthesized Expressions</h4>
+
+<div class="source">
+<div class="source">
+<pre>ParenthesizedExpression ::= &quot;(&quot; Expression &quot;)&quot;
+</pre></div></div>
+<p>As in most languages, an expression may be parenthesized.</p>
+<p>Since AQL is an expression language, the following example expression is actually also a complete, legal AQL query whose result is the value 2. (As such, you can have Big Fun explaining to your boss how AsterixDB and AQL can turn your 1000-node shared-nothing Big Data cluster into a $5M calculator in its spare time.)</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>( 1 + 1 )
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Function_Calls"></a>Function Calls</h4>
+
+<div class="source">
+<div class="source">
+<pre>FunctionCallExpr ::= FunctionOrTypeName &quot;(&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;)&quot;
+</pre></div></div>
+<p>Functions are included in AQL, like most languages, as a way to package useful functionality or to componentize complicated or reusable AQL computations. A function call is a legal AQL query expression that represents the ADM value resulting from the evaluation of its body expression with the given parameter bindings; the parameter value bindings can themselves be any AQL expressions.</p>
+<p>The following example is a (built-in) function call expression whose value is 8.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>string-length(&quot;a string&quot;)
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Dataset_Access"></a>Dataset Access</h4>
+
+<div class="source">
+<div class="source">
+<pre>DatasetAccessExpression ::= &quot;dataset&quot; ( ( Identifier ( &quot;.&quot; Identifier )? )
+                          | ( &quot;(&quot; Expression &quot;)&quot; ) )
+Identifier              ::= &lt;IDENTIFIER&gt; | StringLiteral
+&lt;IDENTIFIER&gt;            ::= &lt;LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt; | &lt;SPECIALCHARS&gt;)*
+&lt;SPECIALCHARS&gt;          ::= [&quot;$&quot;, &quot;_&quot;, &quot;-&quot;]
+</pre></div></div>
+<p>Querying Big Data is the main point of AsterixDB and AQL. Data in AsterixDB reside in datasets (collections of ADM records), each of which in turn resides in some namespace known as a dataverse (data universe). Data access in a query expression is accomplished via a DatasetAccessExpression. Dataset access expressions are most commonly used in FLWOR expressions, where variables are bound to their contents.</p>
+<p>Note that the Identifier that identifies a dataset (or any other Identifier in AQL) can also be a StringLiteral. This is especially useful to avoid conficts with AQL keywords (e.g. &#x201c;dataset&#x201d;, &#x201c;null&#x201d;, or &#x201c;type&#x201d;).</p>
+<p>The following are three examples of legal dataset access expressions. The first one accesses a dataset called Customers in the dataverse called SalesDV. The second one accesses the Customers dataverse in whatever the current dataverse is. The third one does the same thing as the second but uses a slightly older AQL syntax.</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>dataset SalesDV.Customers
+dataset Customers
+dataset(&quot;Customers&quot;)
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Constructors"></a>Constructors</h4>
+
+<div class="source">
+<div class="source">
+<pre>ListConstructor          ::= ( OrderedListConstructor | UnorderedListConstructor )
+OrderedListConstructor   ::= &quot;[&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;]&quot;
+UnorderedListConstructor ::= &quot;{{&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;}}&quot;
+RecordConstructor        ::= &quot;{&quot; ( FieldBinding ( &quot;,&quot; FieldBinding )* )? &quot;}&quot;
+FieldBinding             ::= Expression &quot;:&quot; Expression
+</pre></div></div>
+<p>A major feature of AQL is its ability to construct new ADM data instances. This is accomplished using its constructors for each of the major ADM complex object structures, namely lists (ordered or unordered) and records. Ordered lists are like JSON arrays, while unordered lists have bag (multiset) semantics. Records are built from attributes that are field-name/field-value pairs, again like JSON. (See the AsterixDB Data Model document for more details on each.)</p>
+<p>The following examples illustrate how to construct a new ordered list with 3 items, a new unordered list with 4 items, and a new record with 2 fields, respectively. List elements can be homogeneous (as in the first example), which is the common case, or they may be heterogeneous (as in the second example). The data values and field name values used to construct lists and records in constructors are all simply AQL expressions. Thus the list elements, field names, and field values used in constructors can be simple literals (as in these three examples) or they can come from query variable references or even arbitrarily complex AQL expressions.</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>[ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]
+
+{{ 42, &quot;forty-two&quot;, &quot;AsterixDB!&quot;, 3.14f }}
+
+{
+  &quot;project name&quot;: &quot;AsterixDB&quot;
+  &quot;project members&quot;: {{ &quot;vinayakb&quot;, &quot;dtabass&quot;, &quot;chenli&quot; }}
+}
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Note"></a>Note</h5>
+<p>When constructing nested records there needs to be a space between the closing braces to avoid confusion with the <tt>}}</tt> token that ends an unordered list constructor: <tt>{ &quot;a&quot; : { &quot;b&quot; : &quot;c&quot; }}</tt> will fail to parse while <tt>{ &quot;a&quot; : { &quot;b&quot; : &quot;c&quot; } }</tt> will work.</p></div></div></div>
+<div class="section">
+<h3><a name="Path_Expressions"></a>Path Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>ValueExpr ::= PrimaryExpr ( Field | Index )*
+Field     ::= &quot;.&quot; Identifier
+Index     ::= &quot;[&quot; ( Expression | &quot;?&quot; ) &quot;]&quot;
+</pre></div></div>
+<p>Components of complex types in ADM are accessed via path expressions. Path access can be applied to the result of an AQL expression that yields an instance of such a type, e.g., a record or list instance. For records, path access is based on field names. For ordered lists, path access is based on (zero-based) array-style indexing. AQL also supports an &#x201c;I&#x2019;m feeling lucky&#x201d; style index accessor, [?], for selecting an arbitrary element from an ordered list. Attempts to access non-existent fields or list elements produce a null (i.e., missing information) result as opposed to signaling a runtime error.</p>
+<p>The following examples illustrate field access for a record, index-based element access for an ordered list, and also a composition thereof.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>({&quot;list&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).list
+
+([&quot;a&quot;, &quot;b&quot;, &quot;c&quot;])[2]
+
+({ &quot;list&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).list[2]
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Logical_Expressions"></a>Logical Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>OperatorExpr ::= AndExpr ( &quot;or&quot; AndExpr )*
+AndExpr      ::= RelExpr ( &quot;and&quot; RelExpr )*
+</pre></div></div>
+<p>As in most languages, boolean expressions can be built up from smaller expressions by combining them with the logical connectives and/or. Legal boolean values in AQL are true, false, and null. (Nulls in AQL are treated much like SQL treats its unknown truth value in boolean expressions.)</p>
+<p>The following is an example of a conjuctive range predicate in AQL. It will yield true if $a is bound to 4, null if $a is bound to null, and false otherwise.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>$a &gt; 3 and $a &lt; 5
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Comparison_Expressions"></a>Comparison Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>RelExpr ::= AddExpr ( ( &quot;&lt;&quot; | &quot;&gt;&quot; | &quot;&lt;=&quot; | &quot;&gt;=&quot; | &quot;=&quot; | &quot;!=&quot; | &quot;~=&quot; ) AddExpr )?
+</pre></div></div>
+<p>AQL has the usual list of suspects, plus one, for comparing pairs of atomic values. The &#x201c;plus one&#x201d; is the last operator listed above, which is the &#x201c;roughly equal&#x201d; operator provided for similarity queries. (See the separate document on <a href="similarity.html">AsterixDB Similarity Queries</a> for more details on similarity matching.)</p>
+<p>An example comparison expression (which yields the boolean value true) is shown below.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>5 &gt; 3
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Arithmetic_Expressions"></a>Arithmetic Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>AddExpr  ::= MultExpr ( ( &quot;+&quot; | &quot;-&quot; ) MultExpr )*
+MultExpr ::= UnaryExpr ( ( &quot;*&quot; | &quot;/&quot; | &quot;%&quot; | &quot;^&quot;| &quot;idiv&quot; ) UnaryExpr )*
+UnaryExpr ::= ( ( &quot;+&quot; | &quot;-&quot; ) )? ValueExpr
+</pre></div></div>
+<p>AQL also supports the usual cast of characters for arithmetic expressions. The example below evaluates to 25.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>3 ^ 2 + 4 ^ 2
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="FLWOR_Expression"></a>FLWOR Expression</h3>
+
+<div class="source">
+<div class="source">
+<pre>FLWOR         ::= ( ForClause | LetClause ) ( Clause )* (&quot;return&quot;|&quot;select&quot;) Expression
+Clause         ::= ForClause | LetClause | WhereClause | OrderbyClause
+                 | GroupClause | LimitClause | DistinctClause
+ForClause      ::= (&quot;for&quot;|&quot;from&quot;) Variable ( &quot;at&quot; Variable )? &quot;in&quot; ( Expression )
+LetClause      ::= (&quot;let&quot;|&quot;with&quot;) Variable &quot;:=&quot; Expression
+WhereClause    ::= &quot;where&quot; Expression
+OrderbyClause  ::= &quot;order&quot; &quot;by&quot; Expression ( ( &quot;asc&quot; ) | ( &quot;desc&quot; ) )?
+                   ( &quot;,&quot; Expression ( ( &quot;asc&quot; ) | ( &quot;desc&quot; ) )? )*
+GroupClause    ::= &quot;group&quot; &quot;by&quot; ( Variable &quot;:=&quot; )? Expression ( &quot;,&quot; ( Variable &quot;:=&quot; )? Expression )*
+                   (&quot;with&quot;|&quot;keeping&quot;) VariableRef ( &quot;,&quot; VariableRef )*
+LimitClause    ::= &quot;limit&quot; Expression ( &quot;offset&quot; Expression )?
+DistinctClause ::= &quot;distinct&quot; &quot;by&quot; Expression ( &quot;,&quot; Expression )*
+Variable       ::= &lt;VARIABLE&gt;
+</pre></div></div>
+<p>The heart of AQL is the FLWOR (for-let-where-orderby-return) expression. The roots of this expression were borrowed from the expression of the same name in XQuery. A FLWOR expression starts with one or more clauses that establish variable bindings. A <tt>for</tt> clause binds a variable incrementally to each element of its associated expression; it includes an optional positional variable for counting/numbering the bindings. By default no ordering is implied or assumed by a <tt>for</tt> clause. A <tt>let</tt> clause binds a variable to the collection of elements computed by its associated expression.</p>
+<p>Following the initial <tt>for</tt> or <tt>let</tt> clause(s), a FLWOR expression may contain an arbitrary sequence of other clauses. The <tt>where</tt> clause in a FLWOR expression filters the preceding bindings via a boolean expression, much like a <tt>where</tt> clause does in a SQL query. The <tt>order by</tt> clause in a FLWOR expression induces an ordering on the data. The <tt>group by</tt> clause, discussed further below, forms groups based on its group by expressions, optionally naming the expressions&#x2019; values (which together form the grouping key for the expression). The <tt>with</tt> subclause of a <tt>group by</tt> clause specifies the variable(s) whose values should be grouped based on the grouping key(s); following the grouping clause, only the grouping key(s) and the variables named in the with subclause remain in scope, and the named grouping variables now contain lists formed from their input values. The <tt>limit</tt> clause caps the number of values returne
 d, optionally starting its result count from a specified offset. (Web applications can use this feature for doing pagination.) The <tt>distinct</tt> clause is similar to the <tt>group-by</tt> clause, but it forms no groups; it serves only to eliminate duplicate values. As indicated by the grammar, the clauses in an AQL query can appear in any order. To interpret a query, one can think of data as flowing down through the query from the first clause to the <tt>return</tt> clause.</p>
+<p>The following example shows a FLWOR expression that selects and returns one user from the dataset FacebookUsers.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $user in dataset FacebookUsers
+where $user.id = 8
+return $user
+</pre></div></div>
+<p>The next example shows a FLWOR expression that joins two datasets, FacebookUsers and FacebookMessages, returning user/message pairs. The results contain one record per pair, with result records containing the user&#x2019;s name and an entire message.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $user in dataset FacebookUsers
+for $message in dataset FacebookMessages
+where $message.author-id = $user.id
+return
+  {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+  };
+</pre></div></div>
+<p>In the next example, a <tt>let</tt> clause is used to bind a variable to all of a user&#x2019;s FacebookMessages. The query returns one record per user, with result records containing the user&#x2019;s name and the set of all messages by that user.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $user in dataset FacebookUsers
+let $messages :=
+  for $message in dataset FacebookMessages
+  where $message.author-id = $user.id
+  return $message.message
+return
+  {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: $messages
+  };
+</pre></div></div>
+<p>The following example returns all TwitterUsers ordered by their followers count (most followers first) and language. When ordering <tt>null</tt> is treated as being smaller than any other value if <tt>null</tt>s are encountered in the ordering key(s).</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $user in dataset TwitterUsers
+  order by $user.followers_count desc, $user.lang asc
+  return $user
+</pre></div></div>
+<p>The next example illustrates the use of the <tt>group by</tt> clause in AQL. After the <tt>group by</tt> clause in the query, only variables that are either in the <tt>group by</tt> list or in the <tt>with</tt> list are in scope. The variables in the clause&#x2019;s <tt>with</tt> list will each contain a collection of items following the <tt>group by</tt> clause; the collected items are the values that the source variable was bound to in the tuples that formed the group. For grouping <tt>null</tt> is handled as a single value.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $x in dataset FacebookMessages
+  let $messages := $x.message
+  group by $loc := $x.sender-location with $messages
+  return
+    {
+      &quot;location&quot; : $loc,
+      &quot;message&quot; : $messages
+    }
+</pre></div></div>
+<p>The use of the <tt>limit</tt> clause is illustrated in the next example.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $user in dataset TwitterUsers
+  order by $user.followers_count desc
+  limit 2
+  return $user
+</pre></div></div>
+<p>The final example shows how AQL&#x2019;s <tt>distinct by</tt> clause works. Each variable in scope before the distinct clause is also in scope after the <tt>distinct by</tt> clause. This clause works similarly to <tt>group by</tt>, but for each variable that contains more than one value after the <tt>distinct by</tt> clause, one value is picked nondeterministically. (If the variable is in the <tt>distinct by</tt> list, then its value will be deterministic.) Nulls are treated as a single value when they occur in a grouping field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $x in dataset FacebookMessages
+  distinct by $x.sender-location
+  return
+    {
+      &quot;location&quot; : $x.sender-location,
+      &quot;message&quot; : $x.message
+    }
+</pre></div></div>
+<p>In order to allow SQL fans to write queries in their favored ways, AQL provides synonyms: <i>from</i> for <i>for</i>, <i>select</i> for <i>return</i>, <i>with</i> for <i>let</i>, and <i>keeping</i> for <i>with</i> in the group by clause. The following query is such an example.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  from $x in dataset FacebookMessages
+  with $messages := $x.message
+  group by $loc := $x.sender-location keeping $messages
+  select
+    {
+      &quot;location&quot; : $loc,
+      &quot;message&quot; : $messages
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Conditional_Expression"></a>Conditional Expression</h3>
+
+<div class="source">
+<div class="source">
+<pre>IfThenElse ::= &quot;if&quot; &quot;(&quot; Expression &quot;)&quot; &quot;then&quot; Expression &quot;else&quot; Expression
+</pre></div></div>
+<p>A conditional expression is useful for choosing between two alternative values based on a boolean condition. If its first (<tt>if</tt>) expression is true, its second (<tt>then</tt>) expression&#x2019;s value is returned, and otherwise its third (<tt>else</tt>) expression is returned.</p>
+<p>The following example illustrates the form of a conditional expression.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>if (2 &lt; 3) then &quot;yes&quot; else &quot;no&quot;
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Quantified_Expressions"></a>Quantified Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>QuantifiedExpression ::= ( ( &quot;some&quot; ) | ( &quot;every&quot; ) ) Variable &quot;in&quot; Expression
+                         ( &quot;,&quot; Variable &quot;in&quot; Expression )* &quot;satisfies&quot; Expression
+</pre></div></div>
+<p>Quantified expressions are used for expressing existential or universal predicates involving the elements of a collection.</p>
+<p>The following pair of examples illustrate the use of a quantified expression to test that every (or some) element in the set [1, 2, 3] of integers is less than three. The first example yields <tt>false</tt> and second example yields <tt>true</tt>.</p>
+<p>It is useful to note that if the set were instead the empty set, the first expression would yield <tt>true</tt> (&#x201c;every&#x201d; value in an empty set satisfies the condition) while the second expression would yield <tt>false</tt> (since there isn&#x2019;t &#x201c;some&#x201d; value, as there are no values in the set, that satisfies the condition).</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>every $x in [ 1, 2, 3 ] satisfies $x &lt; 3
+some $x in [ 1, 2, 3 ] satisfies $x &lt; 3
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h2><a name="a3._Statements_Back_to_TOC"></a><a name="Statements" id="Statements">3. Statements</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+
+<div class="source">
+<div class="source">
+<pre>Statement ::= ( SingleStatement ( &quot;;&quot; )? )* &lt;EOF&gt;
+SingleStatement ::= DataverseDeclaration
+                  | FunctionDeclaration
+                  | CreateStatement
+                  | DropStatement
+                  | LoadStatement
+                  | SetStatement
+                  | InsertStatement
+                  | DeleteStatement
+                  | Query
+</pre></div></div>
+<p>In addition to expresssions for queries, AQL supports a variety of statements for data definition and manipulation purposes as well as controlling the context to be used in evaluating AQL expressions. AQL supports record-level ACID transactions that begin and terminate implicitly for each record inserted, deleted, or searched while a given AQL statement is being executed.</p>
+<p>This section details the statements supported in the AQL language.</p>
+<div class="section">
+<h3><a name="Declarations"></a>Declarations</h3>
+
+<div class="source">
+<div class="source">
+<pre>DataverseDeclaration ::= &quot;use&quot; &quot;dataverse&quot; Identifier
+</pre></div></div>
+<p>The world of data in an AsterixDB cluster is organized into data namespaces called dataverses. To set the default dataverse for a series of statements, the use dataverse statement is provided.</p>
+<p>As an example, the following statement sets the default dataverse to be TinySocial.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+</pre></div></div>
+<p>The set statement in AQL is used to control aspects of the expression evalation context for queries.</p>
+
+<div class="source">
+<div class="source">
+<pre>SetStatement ::= &quot;set&quot; Identifier StringLiteral
+</pre></div></div>
+<p>As an example, the following set statements request that Jaccard similarity with a similarity threshold 0.6 be used for set similarity matching when the ~= operator is used in a query expression.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>set simfunction &quot;jaccard&quot;;
+set simthreshold &quot;0.6f&quot;;
+</pre></div></div>
+<p>When writing a complex AQL query, it can sometimes be helpful to define one or more auxilliary functions that each address a sub-piece of the overall query. The declare function statement supports the creation of such helper functions.</p>
+
+<div class="source">
+<div class="source">
+<pre>FunctionDeclaration  ::= &quot;declare&quot; &quot;function&quot; Identifier ParameterList &quot;{&quot; Expression &quot;}&quot;
+ParameterList        ::= &quot;(&quot; ( &lt;VARIABLE&gt; ( &quot;,&quot; &lt;VARIABLE&gt; )* )? &quot;)&quot;
+</pre></div></div>
+<p>The following is a very simple example of a temporary AQL function definition.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>declare function add($a, $b) {
+  $a + $b
+};
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Lifecycle_Management_Statements"></a>Lifecycle Management Statements</h3>
+
+<div class="source">
+<div class="source">
+<pre>CreateStatement ::= &quot;create&quot; ( DataverseSpecification
+                             | TypeSpecification
+                             | DatasetSpecification
+                             | IndexSpecification
+                             | FunctionSpecification )
+
+QualifiedName       ::= Identifier ( &quot;.&quot; Identifier )?
+DoubleQualifiedName ::= Identifier &quot;.&quot; Identifier ( &quot;.&quot; Identifier )?
+</pre></div></div>
+<p>The create statement in AQL is used for creating persistent artifacts in the context of dataverses. It can be used to create new dataverses, datatypes, datasets, indexes, and user-defined AQL functions.</p>
+<div class="section">
+<h4><a name="Dataverses"></a>Dataverses</h4>
+
+<div class="source">
+<div class="source">
+<pre>DataverseSpecification ::= &quot;dataverse&quot; Identifier IfNotExists ( &quot;with format&quot; StringLiteral )?
+</pre></div></div>
+<p>The create dataverse statement is used to create new dataverses. To ease the authoring of reusable AQL scripts, its optional IfNotExists clause allows creation to be requested either unconditionally or only if the the dataverse does not already exist. If this clause is absent, an error will be returned if the specified dataverse already exists. The <tt>with format</tt> clause is a placeholder for future functionality that can safely be ignored.</p>
+<p>The following example creates a dataverse named TinySocial.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create dataverse TinySocial;
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Types"></a>Types</h4>
+
+<div class="source">
+<div class="source">
+<pre>TypeSpecification    ::= &quot;type&quot; FunctionOrTypeName IfNotExists &quot;as&quot; TypeExpr
+FunctionOrTypeName   ::= QualifiedName
+IfNotExists          ::= ( &quot;if not exists&quot; )?
+TypeExpr             ::= RecordTypeDef | TypeReference | OrderedListTypeDef | UnorderedListTypeDef
+RecordTypeDef        ::= ( &quot;closed&quot; | &quot;open&quot; )? &quot;{&quot; ( RecordField ( &quot;,&quot; RecordField )* )? &quot;}&quot;
+RecordField          ::= Identifier &quot;:&quot; ( TypeExpr ) ( &quot;?&quot; )?
+NestedField          ::= Identifier ( &quot;.&quot; Identifier )*
+IndexField           ::= NestedField ( &quot;:&quot; TypeReference )?
+TypeReference        ::= Identifier
+OrderedListTypeDef   ::= &quot;[&quot; ( TypeExpr ) &quot;]&quot;
+UnorderedListTypeDef ::= &quot;{{&quot; ( TypeExpr ) &quot;}}&quot;
+</pre></div></div>
+<p>The create type statement is used to create a new named ADM datatype. This type can then be used to create datasets or utilized when defining one or more other ADM datatypes. Much more information about the Asterix Data Model (ADM) is available in the <a href="datamodel.html">data model reference guide</a> to ADM. A new type can be a record type, a renaming of another type, an ordered list type, or an unordered list type. A record type can be defined as being either open or closed. Instances of a closed record type are not permitted to contain fields other than those specified in the create type statement. Instances of an open record type may carry additional fields, and open is the default for a new type (if neither option is specified).</p>
+<p>The following example creates a new ADM record type called FacebookUser type. Since it is closed, its instances will contain only what is specified in the type definition. The first four fields are traditional typed name/value pairs. The friend-ids field is an unordered list of 32-bit integers. The employment field is an ordered list of instances of another named record type, EmploymentType.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create type FacebookUserType as closed {
+  &quot;id&quot; :         int32,
+  &quot;alias&quot; :      string,
+  &quot;name&quot; :       string,
+  &quot;user-since&quot; : datetime,
+  &quot;friend-ids&quot; : {{ int32 }},
+  &quot;employment&quot; : [ EmploymentType ]
+}
+</pre></div></div>
+<p>The next example creates a new ADM record type called FbUserType. Note that the type of the id field is UUID. You need to use this field type if you want to have this field be an autogenerated-PK field. Refer to the Datasets section later for more details.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create type FbUserType as closed {
+  &quot;id&quot; :         uuid,
+  &quot;alias&quot; :      string,
+  &quot;name&quot; :       string
+}
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Datasets"></a>Datasets</h4>
+
+<div class="source">
+<div class="source">
+<pre>DatasetSpecification ::= &quot;internal&quot;? &quot;dataset&quot; QualifiedName &quot;(&quot; Identifier &quot;)&quot; IfNotExists
+                         PrimaryKey ( &quot;on&quot; Identifier )? ( &quot;hints&quot; Properties )?
+                         ( &quot;using&quot; &quot;compaction&quot; &quot;policy&quot; CompactionPolicy ( Configuration )? )?
+                         ( &quot;with filter on&quot; Identifier )?
+                       | &quot;external&quot; &quot;dataset&quot; QualifiedName &quot;(&quot; Identifier &quot;)&quot; IfNotExists
+                         &quot;using&quot; AdapterName Configuration ( &quot;hints&quot; Properties )?
+                         ( &quot;using&quot; &quot;compaction&quot; &quot;policy&quot; CompactionPolicy ( Configuration )? )?
+AdapterName          ::= Identifier
+Configuration        ::= &quot;(&quot; ( KeyValuePair ( &quot;,&quot; KeyValuePair )* )? &quot;)&quot;
+KeyValuePair         ::= &quot;(&quot; StringLiteral &quot;=&quot; StringLiteral &quot;)&quot;
+Properties           ::= ( &quot;(&quot; Property ( &quot;,&quot; Property )* &quot;)&quot; )?
+Property             ::= Identifier &quot;=&quot; ( StringLiteral | IntegerLiteral )
+FunctionSignature    ::= FunctionOrTypeName &quot;@&quot; IntegerLiteral
+PrimaryKey           ::= &quot;primary&quot; &quot;key&quot; NestedField ( &quot;,&quot; NestedField )* ( &quot;autogenerated &quot;)?
+CompactionPolicy     ::= Identifier
+PrimaryKey           ::= &quot;primary&quot; &quot;key&quot; Identifier ( &quot;,&quot; Identifier )* ( &quot;autogenerated &quot;)?
+</pre></div></div>
+<p>The create dataset statement is used to create a new dataset. Datasets are named, unordered collections of ADM record instances; they are where data lives persistently and are the targets for queries in AsterixDB. Datasets are typed, and AsterixDB will ensure that their contents conform to their type definitions. An Internal dataset (the default) is a dataset that is stored in and managed by AsterixDB. It must have a specified unique primary key that can be used to partition data across nodes of an AsterixDB cluster. The primary key is also used in secondary indexes to uniquely identify the indexed primary data records. Random primary key (UUID) values can be auto-generated by declaring the field to be UUID and putting &#x201c;autogenerated&#x201d; after the &#x201c;primary key&#x201d; identifier. In this case, values for the auto-generated PK field should not be provided by the user since it will be auto-generated by AsterixDB. Optionally, a filter can be created on a field to f
 urther optimize range queries with predicates on the filter&#x2019;s field. (Refer to <a href="filters.html">Filter-Based LSM Index Acceleration</a> for more information about filters.)</p>
+<p>An External dataset is stored outside of AsterixDB (currently datasets in HDFS or on the local filesystem(s) of the cluster&#x2019;s nodes are supported). External dataset support allows AQL queries to treat external data as though it were stored in AsterixDB, making it possible to query &#x201c;legacy&#x201d; file data (e.g., Hive data) without having to physically import it into AsterixDB. For an external dataset, an appropriate adapter must be selected to handle the nature of the desired external data. (See the <a href="externaldata.html">guide to external data</a> for more information on the available adapters.)</p>
+<p>When creating a dataset, it is possible to choose a merge policy that controls which of the underlaying LSM storage components to be merged. Currently, AsterixDB provides four different merge policies that can be configured per dataset: no-merge, constant, prefix, and correlated-prefix. The no-merge policy simply never merges disk components. While the constant policy merges disk components when the number of components reaches some constant number k, which can be configured by the user. The prefix policy relies on component sizes and the number of components to decide which components to merge. Specifically, it works by first trying to identify the smallest ordered (oldest to newest) sequence of components such that the sequence does not contain a single component that exceeds some threshold size M and that either the sum of the component&#x2019;s sizes exceeds M or the number of components in the sequence exceeds another threshold C. If such a sequence of components exists, the
 n each of the components in the sequence are merged together to form a single component. Finally, the correlated-prefix is similar to the prefix policy but it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests on behalf of all other indexes associated with the same dataset. The default policy for AsterixDB is the prefix policy except when there is a filter on a dataset, where the preferred policy for filters is the correlated-prefix.</p>
+<p>The following example creates an internal dataset for storing FacefookUserType records. It specifies that their id field is their primary key.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create internal dataset FacebookUsers(FacebookUserType) primary key id;
+</pre></div></div>
+<p>The following example creates an internal dataset for storing FbUserType records. It specifies that their id field is their primary key. It also specifies that the id field is an auto-generated field, meaning that a randomly generated UUID value will be assigned to each record by the system. (A user should therefore not proivde a value for this field.) Note that the id field should be UUID.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create internal dataset FbMsgs(FbUserType) primary key id autogenerated;
+</pre></div></div>
+<p>The next example creates an external dataset for storing LineitemType records. The choice of the <tt>hdfs</tt> adapter means that its data will reside in HDFS. The create statement provides parameters used by the hdfs adapter: the URL and path needed to locate the data in HDFS and a description of the data format.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create external dataset Lineitem('LineitemType) using hdfs (
+  (&quot;hdfs&quot;=&quot;hdfs://HOST:PORT&quot;),
+  (&quot;path&quot;=&quot;HDFS_PATH&quot;),
+  (&quot;input-format&quot;=&quot;text-input-format&quot;),
+  (&quot;format&quot;=&quot;delimited-text&quot;),
+  (&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Indices"></a>Indices</h4>
+
+<div class="source">
+<div class="source">
+<pre>IndexSpecification ::= &quot;index&quot; Identifier IfNotExists &quot;on&quot; QualifiedName
+                       &quot;(&quot; ( IndexField ) ( &quot;,&quot; IndexField )* &quot;)&quot; ( &quot;type&quot; IndexType )? ( &quot;enforced&quot; )?
+IndexType          ::= &quot;btree&quot;
+                     | &quot;rtree&quot;
+                     | &quot;keyword&quot;
+                     | &quot;ngram&quot; &quot;(&quot; IntegerLiteral &quot;)&quot;
+</pre></div></div>
+<p>The create index statement creates a secondary index on one or more fields of a specified dataset. Supported index types include <tt>btree</tt> for totally ordered datatypes, <tt>rtree</tt> for spatial data, and <tt>keyword</tt> and <tt>ngram</tt> for textual (string) data. An index can be created on a nested field (or fields) by providing a valid path expression as an index field identifier. An index field is not required to be part of the datatype associated with a dataset if that datatype is declared as open and the field&#x2019;s type is provided along with its type and the <tt>enforced</tt> keyword is specified in the end of index definition. <tt>Enforcing</tt> an open field will introduce a check that will make sure that the actual type of an indexed field (if the field exists in the record) always matches this specified (open) field type.</p>
+<p>The following example creates a btree index called fbAuthorIdx on the author-id field of the FacebookMessages dataset. This index can be useful for accelerating exact-match queries, range search queries, and joins involving the author-id field.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+</pre></div></div>
+<p>The following example creates an open btree index called fbSendTimeIdx on the open send-time field of the FacebookMessages dataset having datetime type. This index can be useful for accelerating exact-match queries, range search queries, and joins involving the send-time field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbSendTimeIdx on FacebookMessages(send-time:datetime) type btree enforced;
+</pre></div></div>
+<p>The following example creates a btree index called twUserScrNameIdx on the screen-name field, which is a nested field of the user field in the TweetMessages dataset. This index can be useful for accelerating exact-match queries, range search queries, and joins involving the screen-name field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index twUserScrNameIdx on TweetMessages(user.screen-name) type btree;
+</pre></div></div>
+<p>The following example creates an rtree index called fbSenderLocIdx on the sender-location field of the FacebookMessages dataset. This index can be useful for accelerating queries that use the <a href="functions.html#spatial-intersect"><tt>spatial-intersect</tt> function</a> in a predicate involving the sender-location field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+</pre></div></div>
+<p>The following example creates a 3-gram index called fbUserIdx on the name field of the FacebookUsers dataset. This index can be used to accelerate some similarity or substring maching queries on the name field. For details refer to the <a href="similarity.html#NGram_Index">document on similarity queries</a>.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbUserIdx on FacebookUsers(name) type ngram(3);
+</pre></div></div>
+<p>The following example creates a keyword index called fbMessageIdx on the message field of the FacebookMessages dataset. This keyword index can be used to optimize queries with token-based similarity predicates on the message field. For details refer to the <a href="similarity.html#Keyword_Index">document on similarity queries</a>.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbMessageIdx on FacebookMessages(message) type keyword;
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Functions"></a>Functions</h4>
+<p>The create function statement creates a named function that can then be used and reused in AQL queries. The body of a function can be any AQL expression involving the function&#x2019;s parameters.</p>
+
+<div class="source">
+<div class="source">
+<pre>FunctionSpecification ::= &quot;function&quot; FunctionOrTypeName IfNotExists ParameterList &quot;{&quot; Expression &quot;}&quot;
+</pre></div></div>
+<p>The following is a very simple example of a create function statement. It differs from the declare function example shown previously in that it results in a function that is persistently registered by name in the specified dataverse.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create function add($a, $b) {
+  $a + $b
+};
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Removal"></a>Removal</h4>
+
+<div class="source">
+<div class="source">
+<pre>DropStatement       ::= &quot;drop&quot; ( &quot;dataverse&quot; Identifier IfExists
+                               | &quot;type&quot; FunctionOrTypeName IfExists
+                               | &quot;dataset&quot; QualifiedName IfExists
+                               | &quot;index&quot; DoubleQualifiedName IfExists
+                               | &quot;function&quot; FunctionSignature IfExists )
+IfExists            ::= ( &quot;if&quot; &quot;exists&quot; )?
+</pre></div></div>
+<p>The drop statement in AQL is the inverse of the create statement. It can be used to drop dataverses, datatypes, datasets, indexes, and functions.</p>
+<p>The following examples illustrate uses of the drop statement.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>drop dataset FacebookUsers if exists;
+
+drop index FacebookUsers.fbSenderLocIndex;
+
+drop type FacebookUserType;
+
+drop dataverse TinySocial;
+
+drop function add;
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="ImportExport_Statements"></a>Import/Export Statements</h3>
+
+<div class="source">
+<div class="source">
+<pre>LoadStatement  ::= &quot;load&quot; &quot;dataset&quot; QualifiedName &quot;using&quot; AdapterName Configuration ( &quot;pre-sorted&quot; )?
+</pre></div></div>
+<p>The load statement is used to initially populate a dataset via bulk loading of data from an external file. An appropriate adapter must be selected to handle the nature of the desired external data. The load statement accepts the same adapters and the same parameters as external datasets. (See the <a href="externaldata.html">guide to external data</a> for more information on the available adapters.) If a dataset has an auto-generated primary key field, a file to be imported should not include that field in it.</p>
+<p>The following example shows how to bulk load the FacebookUsers dataset from an external file containing data that has been prepared in ADM format.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>load dataset FacebookUsers using localfs
+((&quot;path&quot;=&quot;localhost:///Users/zuck/AsterixDB/load/fbu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Modification_Statements"></a>Modification Statements</h3>
+<div class="section">
+<h4><a name="Insert"></a>Insert</h4>
+
+<div class="source">
+<div class="source">
+<pre>InsertStatement ::= &quot;insert&quot; &quot;into&quot; &quot;dataset&quot; QualifiedName Query
+</pre></div></div>
+<p>The AQL insert statement is used to insert data into a dataset. The data to be inserted comes from an AQL query expression. The expression can be as simple as a constant expression, or in general it can be any legal AQL query. Inserts in AsterixDB are processed transactionally, with the scope of each insert transaction being the insertion of a single object plus its affiliated secondary index entries (if any). If the query part of an insert returns a single object, then the insert statement itself will be a single, atomic transaction. If the query part returns multiple objects, then each object inserted will be handled independently as a tranaction. If a dataset has an auto-generated primary key field, an insert statement should not include a value for that field in it. (The system will automatically extend the provided record with this additional field and a corresponding value.)</p>
+<p>The following example illustrates a query-based insertion.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>insert into dataset UsersCopy (for $user in dataset FacebookUsers return $user)
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Delete"></a>Delete</h4>
+
+<div class="source">
+<div class="source">
+<pre>DeleteStatement ::= &quot;delete&quot; Variable &quot;from&quot; &quot;dataset&quot; QualifiedName ( &quot;where&quot; Expression )?
+</pre></div></div>
+<p>The AQL delete statement is used to delete data from a target dataset. The data to be deleted is identified by a boolean expression involving the variable bound to the target dataset in the delete statement. Deletes in AsterixDB are processed transactionally, with the scope of each delete transaction being the deletion of a single object plus its affiliated secondary index entries (if any). If the boolean expression for a delete identifies a single object, then the delete statement itself will be a single, atomic transaction. If the expression identifies multiple objects, then each object deleted will be handled independently as a transaction.</p>
+<p>The following example illustrates a single-object deletion.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>delete $user from dataset FacebookUsers where $user.id = 8;
+</pre></div></div>
+<p>We close this guide to AQL with one final example of a query expression.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $praise in {{ &quot;great&quot;, &quot;brilliant&quot;, &quot;awesome&quot; }}
+return
+   string-concat([&quot;AsterixDB is &quot;, $praise])
+</pre></div></div></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[03/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/install.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/install.html b/docs/0.8.8-incubating/install.html
new file mode 100644
index 0000000..68a5390
--- /dev/null
+++ b/docs/0.8.8-incubating/install.html
@@ -0,0 +1,1297 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Introduction</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Installing and Managing AsterixDB using Managix</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Introduction</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PrerequisitesForInstallingAsterixDB">Prerequisites for Installing AsterixDB</a></li>
+  
+<li><a href="#Section1SingleMachineAsterixDBInstallation">Section 1: Single-Machine AsterixDB installation</a></li>
+  
+<li><a href="#Section2SingleMachineAsterixDBInstallationAdvanced">Section 2: Single-Machine AsterixDB installation (Advanced)</a></li>
+  
+<li><a href="#Section3InstallingAsterixDBOnAClusterOfMultipleMachines">Section 3: Installing AsterixDB on a Cluster of Multiple Machines</a></li>
+  
+<li><a href="#Section4ManagingTheLifecycleOfAnAsterixDBInstance">Section 4: Managing the Lifecycle of an AsterixDB Instance</a></li>
+  
+<li><a href="#Section5FAQ">Section 5: Frequently Asked Questions</a></li>
+</ul>
+<p>This is a quickstart guide for getting AsterixDB running in a distributed environment. This guide also introduces the AsterixDB installer (nicknamed <i><i>Managix</i></i>) and describes how it can be used to create and manage an AsterixDB instance. By following the simple steps described in this guide, you will get a running instance of AsterixDB. You shall be able to use AsterixDB from its Web interface and manage its lifecycle using Managix. This document assumes that you are running some version of <i><i>Linux</i></i> or <i><i>MacOS X</i></i>.</p></div>
+<div class="section">
+<h2><a name="Prerequisites_for_Installing_AsterixDB_Back_to_TOC"></a><a name="PrerequisitesForInstallingAsterixDB" id="PrerequisitesForInstallingAsterixDB">Prerequisites for Installing AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Prerequisite:</p>
+
+<ul>
+  
+<li><a class="externalLink" href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK&gt;=7</a> (Otherwise known as JDK&gt;=1.7).</li>
+</ul>
+<p>To know the version of Java installed on your system, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ java -version
+</pre></div></div>
+<p>If your version is at least 1.7.0_x, similar to the output shown below, you are good to proceed.</p>
+
+<div class="source">
+<div class="source">
+<pre>    java version &quot;1.7.0_13&quot;
+    Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
+    Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
+</pre></div></div>
+<p>If you need to upgrade or install java, please follow the instructions below.</p>
+
+<ul>
+  
+<li>
+<p>For Linux: <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html">JDK 7 Linux Install</a> JDK would be installed at a path under /usr/lib/jvm/jdk-version .</p></li>
+  
+<li>
+<p>For Mac: <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html">JDK 7 Mac Install</a> JDK would be installed at /Library/Java/JavaVirtualMachines/jdk-version/Contents/Home .</p></li>
+</ul>
+<p>The java installation directory is referred as JAVA_HOME. Since we upgraded/installed Java, we need to ensure JAVA_HOME points to the installation directory of JDK. Modify your ~/.bash_profile (or ~/.bashrc) and define JAVA_HOME accordingly. After the modification, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ java -version
+</pre></div></div>
+<p>If the version information you obtain does not show 1.7, you need to update the PATH variable. To do so, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ echo &quot;PATH=$JAVA_HOME/bin:$PATH&quot; &gt;&gt; ~/.bash_profile (or ~/.bashrc)
+    $ source ~/.bash_profile (or ~/.bashrc)
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Section_1:_Single-Machine_AsterixDB_installation_Back_to_TOC"></a><a name="Section1SingleMachineAsterixDBInstallation" id="Section1SingleMachineAsterixDBInstallation">Section 1: Single-Machine AsterixDB installation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We assume a user called &#x201c;Joe&#x201d; with a home directory as /home/joe. On a Mac, the home directory for user Joe would be /Users/joe.</p>
+<div class="section">
+<h3><a name="Configuring_Environment"></a>Configuring Environment</h3>
+<p>Ensure that JAVA_HOME variable is defined and points to the the java installation directory on your machine. To verify, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ echo $JAVA_HOME
+</pre></div></div>
+<p>If you do not see any output, JAVA_HOME is not defined. We need to add the following line to your profile located at /home/joe/.bash_profile or /home/joe/.bashrc, whichever you are using. If you do not have any of these files, create a ~/.bash_profile file.</p>
+
+<div class="source">
+<div class="source">
+<pre>    export JAVA_HOME=&lt;Path to Java installation directory&gt;
+</pre></div></div>
+<p>After you have edited ~/.bash_profile (or ~/.bashrc), execute the following to make the changes effective in current shell:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ source /home/joe/.bash_profile (or /home/joe/.bashrc)
+</pre></div></div>
+<p>Before proceeding, verify that JAVA_HOME is defined by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ echo $JAVA_HOME
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Configuring_SSH"></a>Configuring SSH</h3>
+<p>If SSH is not enabled on your system, please follow the instruction below to enable/install it or else skip to the section <a href="#Configuring_Password-less_SSH">Configuring Password-less SSH</a>.</p>
+<div class="section">
+<h4><a name="Enabling_SSH_on_Mac"></a>Enabling SSH on Mac</h4>
+<p>The Apple Mac OS X operating system has SSH installed by default but the SSH daemon is not enabled. This means you can&#x2019;t login remotely or do remote copies until you enable it. To enable it, go to &#x2018;System Preferences&#x2019;. Under &#x2018;Internet &amp; Networking&#x2019; there is a &#x2018;Sharing&#x2019; icon. Run that. In the list that appears, check the &#x2018;Remote Login&#x2019; option. Also check the &#x201c;All users&#x201d; radio button for &#x201c;Allow access for&#x201d;. This starts the SSH daemon immediately and you can remotely login using your username. The &#x2018;Sharing&#x2019; window shows at the bottom the name and IP address to use. You can also find this out using &#x2018;whoami&#x2019; and &#x2018;ifconfig&#x2019; from the Terminal application.</p></div>
+<div class="section">
+<h4><a name="Enabling_SSH_on_Linux"></a>Enabling SSH on Linux</h4>
+
+<div class="source">
+<div class="source">
+<pre>    sudo apt-get install openssh-server
+</pre></div></div>
+<p>Assumming that you have enabled SSH on your system, let us proceed.</p></div>
+<div class="section">
+<h4><a name="Configuring_Password-less_SSH"></a>Configuring Password-less SSH</h4>
+<p>For our single-machine setup of AsterixDB, we need to configure password-less SSH access to localhost. We assume that you are on the machine where you want to install AsterixDB. To verify if you already have password-less SSH configured, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ ssh 127.0.0.1
+</pre></div></div>
+<p>If you get an output similar to one shown below, type &#x201c;yes&#x201d; and press enter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
+    RSA key fingerprint is aa:7b:51:90:74:39:c4:f6:28:a2:9d:47:c2:8d:33:31.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>If you are not prompted for a password, that is if you get an output similar to one shown below, it signifies that you already have password-less SSH configured. </p>
+
+<div class="source">
+<div class="source">
+<pre>    $ ssh 127.0.0.1
+    Last login: Sat Mar 23 22:52:49 2013
+</pre></div></div>
+<p>[Important: Password-less SSH requires the use of a (public,private) key-pair. The key-pair is located as a pair of files under  $HOME/.ssh directory. It is required that the (public,private) key-pair files have default names (id_rsa.pub, id_rsa) respectively.  If you are using different names, please rename the files to use the default names]</p>
+<p>Skip to the next section <a href="#Configuring_Managix">Configuring Managix</a>.</p>
+<p>You are here because you were prompted for a password. You need to configure password-less SSH.<br />We shall generate a (public,private) key-pair as id_rsa.pub and id_rsa respectively. If $HOME/.ssh already contains a (public,private) key-pair, please ensure the files are renamed before proceeding. Follow the instructions below.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ ssh-keygen -t rsa -P &quot;&quot;
+    Generating public/private rsa key pair.
+    Enter file in which to save the key (/home/joe/.ssh/id_rsa):   
+    [Important: Please ensure that we use the default value, so simply press enter]
+</pre></div></div>
+<p>If a key already exists, you should get an output similar to what is shown below. Press &#x2018;y&#x2019; to overwrite the existing key. It is required to use the default name. If you wish to not overwrite a pre-existing key, ensure that the pre-existing key is saved with a different name.</p>
+
+<div class="source">
+<div class="source">
+<pre>    /home/joe/.ssh/id_rsa already exists.
+    Overwrite (y/n)?
+</pre></div></div>
+<p>You should see an output similar to one shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    The key fingerprint is:
+    4d:b0:30:14:45:cc:99:86:15:48:17:0b:39:a0:05:ca joe@joe-machine
+    The key's randomart image is:
+    +--[ RSA 2048]----+
+    |  ..o+B@O=       |
+    |.. o  ==*+       |
+    |.E.    oo .      |
+    |         o       |
+    |        S .      |
+    |                 |
+    |                 |
+    |                 |
+    |                 |
+    +-----------------+
+</pre></div></div>
+<p>Note: for Linux users, you may not get an image representation of the key, but this is not an error. Next, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ cat $HOME/.ssh/id_rsa.pub &gt;&gt; $HOME/.ssh/authorized_keys
+      $ chmod 700  $HOME/.ssh/authorized_keys
+</pre></div></div>
+<p>We shall now retry SSH without password.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ ssh 127.0.0.1
+</pre></div></div>
+<p>You may see an output similar to one shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
+    RSA key fingerprint is aa:7b:51:90:74:39:c4:f6:28:a2:9d:47:c2:8d:33:31.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>Type &#x2018;yes&#x2019; and press the enter key. You should see an output similar to one shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.
+    Last login: Thu Mar 28 12:27:10 2013
+</pre></div></div>
+<p>You should now be able to log in without being prompted for a password or a response.</p>
+
+<div class="source">
+<div class="source">
+<pre>    ssh 127.0.0.1
+    Last login: Sat Mar 23 22:54:40 2013
+</pre></div></div>
+<p>Execute &#x2018;exit&#x2019; to close the session.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ exit
+    logout
+    Connection to 127.0.0.1 closed.
+</pre></div></div></div></div>
+<div class="section">
+<h3><a name="Configuring_Managix"></a>Configuring Managix</h3>
+<p>You will need the AsterixDB installer (a.k.a. Managix). Download Managix from <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">here</a>; this includes the bits for Managix as well as AsterixDB.</p>
+<p>To be able to create an AsterixDB instance and manage its lifecycle, the Managix requires you to configure a set of configuration files namely:</p>
+
+<ul>
+  
+<li><tt>conf/managix-conf.xml</tt>: A configuration XML file that contains configuration settings for Managix.</li>
+  
+<li>A configuration XML file that describes the nodes in the cluster, e.g., <tt>clusters/local/local.xml</tt>.</li>
+</ul>
+<p>Since we intend to run AsterixDB on a single node, Managix can auto-configure itself and populate the above configuration files. To auto-configure Managix, execute the following in the MANAGIX_HOME directory:</p>
+
+<div class="source">
+<div class="source">
+<pre>     /home/joe/asterix-mgmt&gt; $ managix configure
+</pre></div></div>
+<p>Let us do a sample run to validate the set of configuration files auto-generated by Managix.</p>
+
+<div class="source">
+<div class="source">
+<pre>    /home/joe/asterix-mgmt&gt; $ managix validate
+      INFO: Environment [OK]
+      INFO: Managix Configuration [OK]
+
+
+    /home/joe/asterix-mgmt&gt; $ managix validate -c clusters/local/local.xml
+      INFO: Environment [OK]
+      INFO: Cluster configuration [OK]
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Creating_an_AsterixDB_instance"></a>Creating an AsterixDB instance</h3>
+<p>Now that we have configured Managix, we shall next create an AsterixDB instance. An AsterixDB instance is identified by a unique name and is created using the <tt>create</tt> command. The usage description for the <tt>create</tt> command can be obtained by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd create
+     Creates an AsterixDB instance with a specified name. Post creation, the instance is in ACTIVE state,
+     indicating its availability for executing statements/queries.
+     Usage arguments/options:
+     -n Name of the AsterixDB instance.
+     -c Path to the cluster configuration file
+</pre></div></div>
+<p>We shall now use the <tt>create</tt> command to create an AsterixDB instance by the name &#x201c;my_asterix&#x201d;. In doing so, we shall use the cluster configuration file that was auto-generated by Managix.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix create -n my_asterix -c clusters/local/local.xml
+</pre></div></div>
+<p>A sample output of the above command is shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    INFO: Name:my_asterix
+    Created:Thu Mar 07 11:14:13 PST 2013
+    Web-Url:http://127.0.0.1:19001
+    State:ACTIVE
+</pre></div></div>
+<p>The third line above shows the web-url <a class="externalLink" href="http://127.0.0.1:19001">http://127.0.0.1:19001</a> for an AsterixDB&#x2019;s web interface. The AsterixDB instance is in the &#x2018;ACTIVE&#x2019; state, indicating that you may access the web interface by navigating to the web url.</p>
+<p>Type in the following &#x201c;Hello World&#x201d; query in the box:</p>
+
+<div class="source">
+<div class="source">
+<pre>    let $message := 'Hello World!'
+    return $message
+</pre></div></div>
+<p>Press the &#x201c;Run&#x201d; button. If the query result shows on the output box, then Congratulations! You have successfully created an AsterixDB instance!</p></div></div>
+<div class="section">
+<h2><a name="Section_2:_Single-Machine_AsterixDB_installation_Advanced_Back_to_TOC"></a><a name="Section2SingleMachineAsterixDBInstallationAdvanced" id="Section2SingleMachineAsterixDBInstallationAdvanced">Section 2: Single-Machine AsterixDB installation (Advanced)</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We assume that you have successfully completed the single-machine AsterixDB installation by following the instructions above in section <a href="#Section_1:_Single-Machine_AsterixDB_installation">AsterixDB installation</a>. In this section, we shall cover advanced topics related to AsterixDB configuration. Before we proceed, it is imperative to go through some preliminary concepts related to AsterixDB runtime.</p>
+<div class="section">
+<h3><a name="AsterixDB_Runtime"></a>AsterixDB Runtime</h3>
+<p>An AsterixDB runtime comprises of a &#x2018;&#x2018;master node&#x2019;&#x2019; and a set of &#x2018;&#x2018;worker nodes&#x2019;&#x2019;, each identified by a unique id. The master node runs a &#x2018;&#x2018;Cluster Controller&#x2019;&#x2019; service (a.k.a. &#x2018;&#x2018;CC&#x2019;&#x2019;), while each worker node runs a &#x2018;&#x2018;Node Controller&#x2019;&#x2019; service (a.k.a. &#x2018;&#x2018;NC&#x2019;&#x2019;). Please note that a node in an AsterixDB cluster is a logical concept in the sense that multiple nodes may map to a single physical machine, which is the case for a single-machine AsterixDB installation. This association or mapping between an AsterixDB node and a physical machine is captured in a cluster configuration XML file. In addition, the XML file contains properties and parameters associated with each node.</p>
+<div class="section">
+<h4><a name="AsterixDB_Runtime_Configuration"></a>AsterixDB Runtime Configuration</h4>
+<p>As observed earlier, Managix can auto-configure itself for a single-machine setup. As part of auto-configuration, Managix generated the cluster XML file. Let us understand the components of the generated cluster XML file. If you have configured Managix (via the <tt>configure</tt> command), you can find a similar cluster XML file as $MANAGIX_HOME/clusters/local/local.xml. The following is a sample XML file generated on a Ubuntu (Linux) setup:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
+    &lt;cluster xmlns=&quot;cluster&quot;&gt;
+        &lt;name&gt;local&lt;/name&gt;
+        &lt;java_home&gt;/usr/lib/jvm/jdk1.7.0&lt;/java_home&gt;
+        &lt;log_dir&gt;/home/joe/asterix-mgmt/clusters/local/working_dir/logs&lt;/log_dir&gt;
+        &lt;txn_log_dir&gt;/home/joe/asterix-mgmt/clusters/local/working_dir/logs&lt;/txn_log_dir&gt;
+        &lt;iodevices&gt;/home/joe/asterix-mgmt/clusters/local/working_dir&lt;/iodevices&gt;
+        &lt;store&gt;storage&lt;/store&gt;
+        &lt;working_dir&gt;
+            &lt;dir&gt;/home/joe/asterix-mgmt/clusters/local/working_dir&lt;/dir&gt;
+            &lt;NFS&gt;true&lt;/NFS&gt;
+        &lt;/working_dir&gt;
+        &lt;master_node&gt;
+            &lt;id&gt;master&lt;/id&gt;
+            &lt;client_ip&gt;127.0.0.1&lt;/client_ip&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+            &lt;client_port&gt;1098&lt;/client_port&gt;
+            &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+            &lt;http_port&gt;8888&lt;/http_port&gt;
+        &lt;/master_node&gt;
+        &lt;node&gt;
+            &lt;id&gt;node1&lt;/id&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+    &lt;/cluster&gt;
+</pre></div></div>
+<p>We shall next explain the components of the cluster configuration XML file.</p></div>
+<div class="section">
+<h4><a name="a1_Defining_nodes_in_AsterixDB_runtime"></a>(1) Defining nodes in AsterixDB runtime</h4>
+<p>The single-machine AsterixDB instance configuration that is auto-generated by Managix (using the <tt>configure</tt> command) involves a master node (CC) and a worker node (NC). Each node is assigned a unique id and provided with an ip address (called &#x2018;&#x2018;cluster_ip&#x2019;&#x2019;) that maps a node to a physical machine. The following snippet from the above XML file captures the master/worker nodes in our AsterixDB installation.</p>
+
+<div class="source">
+<div class="source">
+<pre>        &lt;master_node&gt;
+            &lt;id&gt;master&lt;/id&gt;
+            &lt;client_ip&gt;127.0.0.1&lt;/client_ip&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+            &lt;client_port&gt;1098&lt;/client_port&gt;
+            &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+            &lt;http_port&gt;8888&lt;/http_port&gt;
+        &lt;/master_node&gt;
+        &lt;node&gt;
+            &lt;id&gt;node1&lt;/id&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+</pre></div></div>
+<p>The following is a description of the different elements in the cluster configuration xml file.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Property</td>
+  
+<td>Description</td>
+</tr>
+
+<tr class="b">
+  
+<td>id</td>
+  
+<td>A unique id for a node.</td>
+</tr>
+
+<tr class="a">
+  
+<td>cluster_ip</td>
+  
+<td>IP address of the machine to which a node maps to. This address is used for all internal communication between the nodes.</td>
+</tr>
+
+<tr class="b">
+  
+<td>client_ip</td>
+  
+<td>Provided for the master node. This IP should be reachable from clients that want to connect with AsterixDB via its web interface.</td>
+</tr>
+
+<tr class="a">
+  
+<td>client_port</td>
+  
+<td>Provided for the master node. This is the port at which the Cluster Controller (CC) service listens for connections from clients.</td>
+</tr>
+
+<tr class="b">
+  
+<td>cluster_port</td>
+  
+<td>Provided for the master node. This is the port used by the Cluster Controller (CC) service to listen for connections from Node Controllers (NCs). </td>
+</tr>
+
+<tr class="a">
+  
+<td>http-port</td>
+  
+<td>Provided for the master node. This is the http port used by the Cluster Controller (CC) service. </td>
+</tr>
+
+</table></div>
+<div class="section">
+<h4><a name="a2_Properties_associated_with_a_worker_node_NC_in_AsterixDB"></a>(2) Properties associated with a worker node (NC) in AsterixDB</h4>
+<p>The following is a list of properties associated with each worker node in an AsterixDB configuration.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Property</td>
+  
+<td>Description</td>
+</tr>
+
+<tr class="b">
+  
+<td>java_home</td>
+  
+<td>Java installation directory at each node.</td>
+</tr>
+
+<tr class="a">
+  
+<td>log_dir</td>
+  
+<td>A directory where the worker node JVM may write logs.</td>
+</tr>
+
+<tr class="b">
+  
+<td>txn_log_dir</td>
+  
+<td>A directory where the worker node writes transaction logs.</td>
+</tr>
+
+<tr class="a">
+  
+<td>iodevices</td>
+  
+<td>Comma separated list of IO Device mount points.</td>
+</tr>
+
+<tr class="b">
+  
+<td>store</td>
+  
+<td>A data directory (under each iodevice) that AsterixDB uses to store data belonging to dataset(s).</td>
+</tr>
+</table>
+<p>All the above properties can be defined at the global level or a local level. In the former case, these properties apply to all the nodes in an AsterixDB configuration. In the latter case, these properties apply only to the node(s) under which they are defined. A property defined at the local level overrides the definition at the global level.</p></div>
+<div class="section">
+<h4><a name="a3_Working_directory_of_an_AsterixDB_instance"></a>(3) Working directory of an AsterixDB instance</h4>
+<p>Next we explain the following setting in the file $MANAGIX_HOME/clusters/local/local.xml.</p>
+
+<div class="source">
+<div class="source">
+<pre>        &lt;working_dir&gt;
+            &lt;dir&gt;/Users/joe/asterix-mgmt/clusters/local/working_dir&lt;/dir&gt;
+            &lt;NFS&gt;true&lt;/NFS&gt;
+        &lt;/working_dir&gt;
+</pre></div></div>
+<p>Managix associates a working directory with an AsterixDB instance and uses this directory for transferring binaries to each node. If there is a directory that is readable by each node, Managix can use it to place binaries that can be accessed and used by all the nodes in the AsterixDB set up. A network file system (NFS) provides such a functionality for a cluster of physical machines so that a path on NFS is accessible from each machine in the cluster. In the single-machine set up described above, all nodes correspond to a single physical machine. Each path on the local file system is accessible to all the nodes in the AsterixDB setup and the boolean value for NFS above is thus set to <tt>true</tt>.</p></div></div>
+<div class="section">
+<h3><a name="Managix_Configuration"></a>Managix Configuration</h3>
+<p>Managix allows creation and management of multiple AsterixDB instances and uses Zookeeper as its back-end database to keep track of information related to each instance. We need to provide a set of one or more hosts that Managix can use to run a Zookeeper instance. Zookeeper runs as a daemon process on each of the specified hosts. At each host, Zookeeper stores data under the Zookeeper home directory specified as part of the configuration. The following is an example configuration <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt> that has Zookeeper running on the localhost (127.0.0.1) :</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
+    &lt;configuration xmlns=&quot;installer&quot;&gt;
+        &lt;zookeeper&gt;
+            &lt;homeDir&gt;/home/joe/asterix/.installer/zookeeper&lt;/homeDir&gt;
+            &lt;clientPort&gt;2900&lt;/clientPort&gt;
+            &lt;servers&gt;
+                &lt;server&gt;127.0.0.1&lt;/server&gt;
+            &lt;/servers&gt;
+        &lt;/zookeeper&gt;
+    &lt;/configuration&gt;
+</pre></div></div>
+<p>It is possible to have a single host for Zookeeper. A larger number of hosts would use Zookeeper&#x2019;s replication and fault-tolerance feature such that a failure of a host running Zookeeper would not result in loss of information about existing AsterixDB instances.</p></div></div>
+<div class="section">
+<h2><a name="Section_3:_Installing_AsterixDB_on_a_Cluster_of_Multiple_MachinesBack_to_TOC"></a><a name="Section3InstallingAsterixDBOnAClusterOfMultipleMachines" id="Section3InstallingAsterixDBOnAClusterOfMultipleMachines">Section 3: Installing AsterixDB on a Cluster of Multiple Machines</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We assume that you have read the two sections above on single-machine AsterixDB setup. Next we explain how to install AsterixDB in a cluster of multiple machines. As an example, we assume we want to setup AsterixDB on a cluster of three machines, in which we use one machine (called machine A) as the master node and two other machines (called machine B and machine C) as the worker nodes, as shown in the following diagram:</p>
+<p><img src="images/AsterixCluster.png" alt="AsterixCluster" /></p>
+<p>Notice that each machine has a &#x2018;&#x2018;cluster_ip&#x2019;&#x2019; address, which is used by these machines for their intra-cluster communication. Meanwhile, the master machine also has a &#x2018;&#x2018;client_ip&#x2019;&#x2019; address, using which an end-user outside the cluster can communicate with this machine. The reason we differentiate between these two types of IP addresses is that we can have a cluster of machines using a private network. In this case they have internal ip addresses that cannot be used outside the network. In the case all the machines are on a public network, the &#x201c;client_ip&#x201d; and &#x201c;cluster_ip&#x201d; of the master machine can share the same address.</p>
+<p>Next we describe how to set up AsterixDB in this cluster, assuming no Managix has been installed on these machines.</p>
+<div class="section">
+<h3><a name="Step_1:_Configure_SSH"></a>Step (1): Configure SSH</h3>
+<p>The steps of setting up SSH are similar to those in the single-machine setup case. We assume we have a common user account called &#x201c;joe&#x201d; on each machine in the cluster.</p>
+<p>On the master machine, do the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; ssh 127.0.0.1
+</pre></div></div>
+<p>If you get an output similar to one shown below, type &#x201c;yes&#x201d; and press enter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
+    RSA key fingerprint is aa:7b:51:90:74:39:c4:f6:28:a2:9d:47:c2:8d:33:31.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>If you are not prompted for a password, that is if you get an output similar to one shown below, it signifies that you already have password-less SSH configured. </p>
+
+<div class="source">
+<div class="source">
+<pre>    $ ssh 127.0.0.1
+    Last login: Sat Mar 23 22:52:49 2013
+</pre></div></div>
+<p>[Important: Password-less SSH requires the use of a (public,private) key-pair. The key-pair is located as a pair of files under  $HOME/.ssh directory. It is required that the (public,private) key-pair files have default names (id_rsa.pub, id_rsa) respectively.  If you are using different names, please rename the files to use the default names]</p>
+<p>If you are prompted for a password, execute the following</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; ssh-keygen -t rsa -P &quot;&quot;
+    machineA&gt; cat $HOME/.ssh/id_rsa.pub &gt;&gt; $HOME/.ssh/authorized_keys
+    machineA&gt; chmod 700  $HOME/.ssh/authorized_keys
+</pre></div></div>
+<p>If $HOME is not on the NFS, copy the id_rsa.pub to the directory ~/.ssh (login with the same account) on each machine, and then do the following on each machine. (Notice that this step is not needed if the folder &#x201c;.ssh&#x201d; is on the NFS and can be accessed by all the nodes.)</p>
+
+<div class="source">
+<div class="source">
+<pre>    cd ~/.ssh
+    cat id_rsa.pub &gt;&gt; authorized_keys
+    chmod 700  $HOME/.ssh/authorized_keys
+</pre></div></div>
+<p>Then run the following step again and type &#x201c;yes&#x201d; if prompted:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; ssh 127.0.0.1
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Step_2:_Define_the_AsterixDB_cluster"></a>Step (2): Define the AsterixDB cluster</h3>
+<p>We first log into the master machine as the user &#x201c;joe&#x201d;. On this machine, download Managix from <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">here</a> (save as above), then do the following steps similar to the single-machine case described above:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; cd ~
+    machineA&gt; mkdir asterix-mgmt
+    machineA&gt; cd asterix-mgmt
+    machineA&gt; unzip  &lt;path to the Managix zip bundle&gt;
+</pre></div></div>
+<p>Note that it is recommended that MANAGIX_HOME is not located on a network file system (NFS). Managix creates artifacts/logs that are not required to be shared. Any overhead associated with creating artifacts/logs on the NFS should be avoided.</p>
+<p>We also need an AsterixDB configuration XML file for the cluster. We give the name to the cluster, say, &#x201c;rainbow&#x201d;. We create a folder for the configuration of this cluster:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; mkdir asterix-mgmt/rainbow_cluster
+</pre></div></div>
+<p>For this cluster we create a configuration file <tt>$MANAGIX_HOME/rainbow_cluster/rainbow.xml</tt>. The following is a sample file with explanation of the properties:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;cluster xmlns=&quot;cluster&quot;&gt;
+
+      &lt;!-- Name of the cluster --&gt;
+      &lt;name&gt;rainbow&lt;/name&gt;
+
+      &lt;!-- username, which should be valid for all the three machines --&gt;
+      &lt;username&gt;joe&lt;/username&gt;
+
+      &lt;!-- The working directory of Managix. It is recommended for the working
+           directory to be on a network file system (NFS) that can accessed by
+           all machines.
+           Managix creates the directory if it it doesn't exist. --&gt;
+      &lt;working_dir&gt;
+        &lt;dir&gt;/home/joe/managix-workingDir&lt;/dir&gt;
+        &lt;NFS&gt;true&lt;/NFS&gt;
+      &lt;/working_dir&gt;
+
+      &lt;!-- Directory for Asterix to store worker logs information for each machine.
+           Needs to be on the local file system of each machine.
+           Managix creates the directory if it doesn't exist.
+           This property can be overriden for a node by redefining at the node level. --&gt;
+      &lt;log_dir&gt;/mnt/joe/logs&lt;/log_dir&gt;
+
+      &lt;!-- Directory for Asterix to store transaction log information for each machine.
+           Needs to be on the local file system of each machine.
+           Managix creates the directory if it doesn't exist.
+           This property can be overriden for a node by redefining at the node level. --&gt;
+      &lt;txn_log_dir&gt;/mnt/joe/txn_logs&lt;/txn_log_dir&gt;
+
+      &lt;!-- Mount point of an iodevice. Use a comma separated list for a machine that
+           has multiple iodevices (disks).
+           This property can be overriden for a node by redefining at the node level. --&gt;
+      &lt;iodevices&gt;/mnt/joe&lt;/iodevices&gt;
+
+      &lt;!-- Path on each iodevice where Asterix will store its data --&gt;
+      &lt;store&gt;storage&lt;/store&gt;
+
+      &lt;!-- Java home for each machine --&gt;
+      &lt;java_home&gt;/usr/lib/jvm/jdk1.7.0&lt;/java_home&gt;
+
+      &lt;!-- IP addresses of the master machine A --&gt;
+      &lt;master_node&gt;
+        &lt;id&gt;master&lt;/id&gt;
+        &lt;client_ip&gt;128.195.52.177&lt;/client_ip&gt;
+        &lt;cluster_ip&gt;192.168.100.0&lt;/cluster_ip&gt;
+        &lt;client_port&gt;1098&lt;/client_port&gt;
+        &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+        &lt;http_port&gt;8888&lt;/http_port&gt;
+      &lt;/master_node&gt;
+
+      &lt;!-- IP address(es) of machine B --&gt;
+      &lt;node&gt;
+        &lt;id&gt;nodeB&lt;/id&gt;
+        &lt;cluster_ip&gt;192.168.100.1&lt;/cluster_ip&gt;
+      &lt;/node&gt;
+
+       &lt;!-- IP address(es) of machine C --&gt;
+      &lt;node&gt;
+        &lt;id&gt;nodeC&lt;/id&gt;
+        &lt;cluster_ip&gt;192.168.100.2&lt;/cluster_ip&gt;
+      &lt;/node&gt;
+    &lt;/cluster&gt;
+</pre></div></div>
+<p>As stated before, each of the above properties can be defined at the cluster level, in which case it applies to all the nodes in the system. Each property can also be defined at a node level.</p>
+<p>Once we have formed the cluster XML file, we can validate the configuration by doing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    managix validate -c rainbow_cluster/rainbow.xml
+</pre></div></div>
+<p>This will verify the contents of the file, and also attempt to ssh to each node in the cluster to ensure that password-less SSH is configured correctly. You may see output like</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '192.168.100.1 (192.168.100.1)' can't be established.
+    RSA key fingerprint is 89:80:31:1f:be:51:16:d7:2b:f5:e0:b3:2c:bd:83:94.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>and this output may be repeated for each node in the cluster. Answer &#x201c;yes&#x201d; each time.</p>
+<p>If the final output contains the following lines (possibly separated by the RSA prompts mentione above):</p>
+
+<div class="source">
+<div class="source">
+<pre>    INFO: Environment [OK]
+    INFO: Cluster configuration [OK]
+</pre></div></div>
+<p>it means that the XML configuration file is correct!</p></div>
+<div class="section">
+<h3><a name="Step_3:_Configuring_Managix"></a>Step (3): Configuring Managix</h3>
+<p>Managix uses a configuration XML file at <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt> to configure its own properties, such as its Zookeeper service. We can use the <tt>configure</tt> command to auto-generate this configuration file:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix configure
+</pre></div></div>
+<p>We use the <tt>validate</tt> command to validate the Managix configuration. To do so, execute the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix validate
+    INFO: Environment [OK]
+    INFO: Managix Configuration [OK]
+</pre></div></div>
+<p>Note that the <tt>configure</tt> command also generates a cluster configuration XML file at $MANAGIX_HOME/clusters/local/local.xml. This file is not needed in the case of a cluster of machines.</p></div>
+<div class="section">
+<h3><a name="Step_4:_Creating_an_AsterixDB_instance"></a>Step (4): Creating an AsterixDB instance</h3>
+<p>Now that we have configured Managix, we shall next create an AsterixDB instance, which is identified by a unique name and is created using the <tt>create</tt> command. The usage description for the <tt>create</tt> command can be obtained by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix help -cmd create
+
+     Creates an AsterixDB instance with a specified name. Post creation, the instance is in ACTIVE state,
+     indicating its availability for executing statements/queries.
+     Usage arguments/options:
+     -n Name of the AsterixDB instance.
+     -c Path to the cluster configuration file
+</pre></div></div>
+<p>We shall now use the <tt>create</tt> command to create an AsterixDB instance called &#x201c;rainbow_asterix&#x201d;. In doing so, we shall use the cluster configuration file that was auto-generated by Managix.</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix create -n rainbow_asterix -c clusters/rainbow.xml
+</pre></div></div>
+<p>If the response message does not have warning, then Congratulations! You have successfully installed AsterixDB on this cluster of machines!</p>
+<p>Please refer to the section <a href="#Section_4:_Managing_the_Lifecycle_of_an_AsterixDB_Instance">Managing the Lifecycle of an AsterixDB Instance</a> for a detailed description on the set of available commands/operations that let you manage the lifecycle of an AsterixDB instance. Note that the output of the commands varies with the cluster definition and may not apply to the cluster specification you built above.</p></div></div>
+<div class="section">
+<h2><a name="Section_4:_Managing_the_Lifecycle_of_an_AsterixDB_Instance_Back_to_TOC"></a><a name="Section4ManagingTheLifecycleOfAnAsterixDBInstance" id="Section4ManagingTheLifecycleOfAnAsterixDBInstance">Section 4: Managing the Lifecycle of an AsterixDB Instance</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Now that we have an AsterixDB instance running, let us use Managix to manage the instance&#x2019;s lifecycle. Managix provides the following set of commands/operations:</p>
+<div class="section">
+<div class="section">
+<h4><a name="Managix_Commands"></a>Managix Commands</h4>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+<td>Command</td>  
+<td>Description</td></tr>
+
+<tr class="b">
+<td><a href="#Creating_an_AsterixDB_instance">create</a></td>   
+<td>Creates a new asterix instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Describe_Command">describe</a></td> 
+<td>Describes an existing asterix instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Stop_Command">stop</a></td>     
+<td>Stops an asterix instance that is in the ACTIVE state.</td></tr>
+
+<tr class="a">
+<td><a href="#Start_Command">start</a></td>    
+<td>Starts an AsterixDB instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Backup_Command">backup</a></td>   
+<td>Creates a backup for an existing AsterixDB instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Restore_Command">restore</a></td>  
+<td>Restores an AsterixDB instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Delete_Command">delete</a></td>   
+<td>Deletes an AsterixDB instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Configuring_Managix">validate</a></td> 
+<td>Validates the installer/cluster configuration.</td></tr>
+
+<tr class="b">
+<td><a href="#Configuring_Managix">configure</a></td>
+<td>Auto generates a configuration for an AsterixDB instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Log_Command">log</a></td>
+<td>Produces a zip archive containing log files from each node in an AsterixDB instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Shutdown_Command">shutdown</a></td> 
+<td>Shuts down the installer service.</td></tr>
+</table>
+<p>You may obtain the above listing by simply executing &#x2018;managix&#x2019; :</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix
+</pre></div></div>
+<p>We already talked about <tt>create</tt> and <tt>validate</tt> commands. We shall next explain the rest of the commands listed above. We also provide sample output messages of these commands assuming we are running an AsterixDB instance on a single machine.</p>
+<div class="section">
+<h5><a name="Describe_Command"></a>Describe Command</h5>
+<p>The <tt>describe</tt> command provides information about an AsterixDB instance. The usage can be looked up by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd describe
+
+        Provides information about an AsterixDB instance.
+        The following options are available:
+        [-n]      Name of the AsterixDB instance.
+        [-admin]  Provides a detailed description
+</pre></div></div>
+<p>The brackets indicate optional flags.</p>
+<p>The output of the <tt>describe</tt> command when used without the <tt>admin</tt> flag contains minimal information and is similar to the output of the <tt>create</tt> command. Let us try running the describe command in &#x201c;admin&#x201d; mode.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix describe -n my_asterix -admin
+     INFO: Name:my_asterix
+     Created:Thu Mar 07 19:07:00 PST 2013
+     Web-Url:http://127.0.0.1:19001
+     State:ACTIVE
+     Master node:master:127.0.0.1
+     node1:127.0.0.1
+
+     Asterix version:0.0.5
+     Asterix Configuration
+     output_dir = /tmp/asterix_output/
+     Metadata Node:node1
+     Processes
+     NC at 127.0.0.1 [ 22195 ]
+     CC at 127.0.0.1 [ 22161 ]
+
+     Asterix Configuration
+       nc.java.opts                             :-Xmx1024m
+       cc.java.opts                             :-Xmx1024m
+       storage.buffercache.pagesize             :32768
+       storage.buffercache.size                 :33554432
+       storage.buffercache.maxopenfiles         :214748364
+       storage.memorycomponent.pagesize         :32768
+       storage.memorycomponent.numpages         :1024
+       storage.memorycomponent.globalbudget     :536870192
+       storage.lsm.mergethreshold               :3
+       storage.lsm.bloomfilter.falsepositiverate:0.01
+       txn.log.buffer.numpages                  :8
+       txn.log.buffer.pagesize                  :131072
+       txn.log.partitionsize                    :2147483648
+       txn.log.disksectorsize                   :4096
+       txn.log.groupcommitinterval              :1
+       txn.log.checkpoint.lsnthreshold          :67108864
+       txn.log.checkpoint.pollfrequency         :120
+       txn.log.checkpoint.history               :0
+       txn.lock.escalationthreshold             :1000
+       txn.lock.shrinktimer                     :5000
+       txn.lock.timeout.waitthreshold           :60000
+       txn.lock.timeout.sweepthreshold          :10000
+       compiler.sortmemory                      :33554432
+       compiler.joinmemory                      :33554432
+       compiler.framesize                       :32768
+       web.port                                 :19001
+       api.port                                 :19002
+       log.level                                :INFO
+</pre></div></div>
+<p>As seen above, the instance &#x2018;my_asterix&#x2019; is configured such that all processes running at the localhost (127.0.0.1). The process id for each process (JVM) is shown next to it.</p></div>
+<div class="section">
+<h5><a name="Stop_Command"></a>Stop Command</h5>
+<p>The <tt>stop</tt> command can be used for shutting down an AsterixDB instance. After that, the instance is unavailable for executing queries. The usage can be looked up by executing the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd stop
+
+     Shuts an AsterixDB instance that is in ACTIVE state. After executing the stop command, the AsterixDB instance transits
+     to the INACTIVE state, indicating that it is no longer available for executing queries.
+
+     Available arguments/options
+     -n name of the AsterixDB instance.
+</pre></div></div>
+<p>To stop the AsterixDB instance.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix stop -n my_asterix
+       INFO: Stopped AsterixDB instance: my_asterix
+
+
+     $ managix describe -n my_asterix
+       INFO: Name: my_asterix
+       Created:Thu Mar 07 19:07:00 PST 2013
+       Web-Url:http://127.0.0.1:19001
+       State:INACTIVE (Fri Mar 08 09:49:00 PST 2013)
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Start_Command"></a>Start Command</h5>
+<p>The <tt>start</tt> command starts an AsterixDB instance that is in the INACTIVE state. The usage can be looked up by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd start
+
+     Starts an AsterixDB instance that is in INACTIVE state. After executing the start command, the AsterixDB instance transits to the ACTIVE state,  indicating that it is now available for executing statements/queries.
+
+     Available arguments/options
+     -n name of the AsterixDB instance.
+</pre></div></div>
+<p>Let us now start the AsterixDB instance.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix start -n my_asterix
+       INFO: Name:my_asterix
+       Created:Thu Mar 07 19:07:00 PST 2013
+       Web-Url:http://127.0.0.1:19001
+       State:ACTIVE (Fri Mar 08 09:49:00 PST 2013)
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Backup_Command"></a>Backup Command</h5>
+<p>The backup command allows you to take a backup of the data stored with an AsterixDB instance. The backup can be taken on the local file system or on an HDFS instance. In either case, the snapshots are stored under a backup directory. You need to make sure the backup directory has appropriate read/write permissions. Configuring settings for backup can be found inside the Managix&#x2019;s configuration file located at <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt>.</p>
+<p><i>Configuring backup on the local file system</i></p>
+<p>We need to provide a path to a backup directory on the local file system. The backup directory can be configured be editing the Managix configuration XML, found at <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt>.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;backup&gt;
+      &lt;backupDir&gt;Provide path to the backup directory here&lt;/backupDir&gt;
+    &lt;/backup&gt;
+</pre></div></div>
+<p>Prior to taking a backup of an AsterixDB instance, it is required for the instance to be in the INACTIVE state. We do so by using the <tt>stop</tt> command, as shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix stop -n my_asterix
+      INFO: Stopped AsterixDB instance: my_asterix
+</pre></div></div>
+<p>We can now take the backup by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix backup -n my_asterix
+      INFO: my_asterix backed up 0_Fri Mar 08 16:16:34 PST 2013 (LOCAL)
+</pre></div></div>
+<p><i>Configuring backup on an HDFS instance</i></p>
+<p>To configure a backup to be taken on an HDFS instance, we need to provide required information about the running HDFS instance. This information includes the HDFS version and the HDFS url. Simply edit the Managix configuration file and provide the required information.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;backup&gt;
+       &lt;backupDir&gt;Provide path to the backup directory here&lt;/backupDir&gt;
+       &lt;hdfs&gt;
+           &lt;version&gt;0.20.2&lt;/version&gt;
+           &lt;url&gt;&lt;/url&gt;
+       &lt;/hdfs&gt;
+    &lt;/backup&gt;
+</pre></div></div>
+<p>A sample output when a backup is taken on an HDFS is shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix backup -n my_asterix
+      INFO: my_asterix backed up 1_Fri Mar 08 17:10:38 PST 2013 (HDFS)
+</pre></div></div>
+<p>Each time we take a backup, we are provided with a unique id (a monotonically increasing value starting with 0). This id is required when we need to restore from a previously taken backup. Information about all available backup snapshots can be obtained by using the <tt>describe</tt> command in the admin mode, as shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix describe -n my_asterix -admin
+     INFO: Name:my_asterix
+     Created:Fri Mar 08 15:11:12 PST 2013
+     Web-Url:http://127.0.0.1:19001
+     State:INACTIVE (Fri Mar 08 16:14:20 PST 2013)
+     Master node:master:127.0.0.1
+     node1:127.0.0.1
+
+     Backup:0 created at Fri Mar 08 16:16:34 PST 2013 (LOCAL)
+     Backup:1 created at Fri Mar 08 17:10:38 PST 2013 (HDFS)
+
+     Asterix version:0.0.5
+     Asterix Configuration
+     Metadata Node:node1
+     Processes
+</pre></div></div>
+<p>The above output shows the available backup identified by it&#x2019;s id (0). We shall next describe the method for restoring an AsterixDB instance from a backup snapshot.</p></div>
+<div class="section">
+<h5><a name="Restore_Command"></a>Restore Command</h5>
+<p>The <tt>restore</tt> command allows you to restore an AsterixDB instance&#x2019;s data from a previously taken backup. The usage description can be obtained as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix help -cmd restore
+
+      Restores an AsterixDB instance's data from a previously taken backup.
+      Available arguments/options
+
+      -n name of the AsterixDB instance
+      -b id of the backup snapshot
+</pre></div></div>
+<p>The following command restores our AsterixDB instance from the backup snapshot identified by the id (0). Prior to restoring an instance from a backup, it is required that the instance is in the INACTIVE state.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix restore -n my_asterix -b 0
+     INFO: AsterixDB instance: my_asterix has been restored from backup
+</pre></div></div>
+<p>You can start the AsterixDB instance by using the start command.</p></div>
+<div class="section">
+<h5><a name="Log_Command"></a>Log Command</h5>
+<p>The <tt>log</tt> command allows you to collect the log files coresponding to each node of an AsterixDB instance into a zip archive. The zip archive is produced on the local file system of the machine running managix. </p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix help -cmd log
+
+      Creates a zip archive containing log files corresponding to each worker node (NC) and the master (CC)  for an AsterixDB instance
+
+      Available arguments/options
+      -n name of the AsterixDB instance. 
+      -d destination directory for producing the zip archive. Defaults to $MANAGIX_HOME/logdump.
+</pre></div></div>
+<p>The following is an example showing the use of the log command. </p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix log -n my_asterix -d  /Users/joe/logdump
+     INFO: Log zip archive created at /Users/joe/logdump/log_Thu_Jun_06_00:53:51_PDT_2013.zip
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Delete_Command"></a>Delete Command</h5>
+<p>As the name suggests, the <tt>delete</tt> command permanently removes an AsterixDB instance by cleaning up all associated data/artifacts. The usage can be looked up by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix help -cmd delete
+      Permanently deletes an AsterixDB instance. The instance must be in the INACTIVE state.
+
+      Available arguments/options
+      -n name of the AsterixDB instance.
+
+
+      $ managix delete -n my_asterix
+       INFO: AsterixDB instance my_asterix deleted.
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Shutdown_Command"></a>Shutdown Command</h5>
+<p>Managix uses Zookeeper service for storing all information about created AsterixDB instances. The Zookeeper service runs in the background and can be shut down using the <tt>shutdown</tt> command.</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix shutdown
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Help_Command"></a>Help Command</h5>
+<p>The <tt>help</tt> command provides a usage description of a Managix command.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix help -cmd &lt;command name&gt;
+</pre></div></div>
+<p>As an example, for looking up the help for the <tt>configure</tt> command, execute the following</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix help -cmd configure
+
+    Auto-generates the AsterixDB installer configruation settings and AsterixDB cluster
+    configuration settings for a single node setup.
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h2><a name="Section_5:_Frequently_Asked_Questions_Back_to_TOC"></a><a name="Section5FAQ" id="Section5FAQ">Section 5: Frequently Asked Questions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>What happens if a machine acting as a node in the Asterix cluster becomes unreachable for some reason (network partition/machine failure) ?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>When a node leaves the Asterix cluster, the AsterixDB instance transits to an &#x2018;UNUSABLE&#x2019; state, indicating that it is no longer available for serving queries. To know which set of node(s) left the cluster, run the describe command with -admin flag. </p>
+
+<div class="source">
+<div class="source">
+<pre>    $ $MANAGIX_HOME/bin/managix describe -n &lt;name of the AsterixDB instance&gt;-admin
+</pre></div></div>
+<p>Above command will show the state of AsterixDB instance and list the set of nodes that have left the cluster. </p>
+<p>The failed node must be brought back to re-join the cluster. Once done, you may bring back the instance to an &#x2018;ACTIVE&#x2019; state by executing the following sequence. </p>
+<p>1) Get rid of the Asterix processes running on the nodes in the cluster:-</p>
+
+<div class="source">
+<div class="source">
+<pre>    managix stop -n my_asterix
+</pre></div></div>
+<p>The processes associated with the instance are terminated and the instance moves to the INACTIVE state.</p>
+<p>2) Start the AsterixDB instance using the start command.</p>
+
+<div class="source">
+<div class="source">
+<pre>    managix start -n &lt;name of your AsterixDB instance&gt;
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>Do I need to create all the directories/paths I put into the cluster configuration XML ?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>Managix will create a path if it is not existing. It does so using the user account mentioned in the cluster configuration xml. Please ensure that the user account has appropriate permissions for creating the missing paths. </p></div>
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>Should MANAGIX_HOME be on the network file system (NFS) ?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>It is recommended that MANAGIX_HOME is not on the NFS. Managix produces artifacts/logs on disk which are not required to be shared. As such an overhead in creating the artifacts/logs on the NFS should be avoided.</p></div>
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>How do we change the underlying code (apply a code patch) for an &#x2018;active&#x2019; asterix instance?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>At times, end-user (particularly asterix developer) may run into the need to altering the underlying code that is being run by an asterix instance. In the current version of managix, this can be achieved as follows:-</p>
+<p>Assume that you have an &#x2018;active&#x2019; instance by the name a1 that is running version v1 of asterix. You have a revised version of asterix - v2 that fixes some bug(s).</p>
+<p>To upgrade asterix from v1 to v2:-</p>
+<p>step 1) managix stop -n a1</p>
+<p>step 2) managix shutdown</p>
+<p>step 3) copy asterix-server zip (version v2) to asterix/</p>
+<p>step 4) managix start -n a1</p>
+<p>a1 now is running on version v2.</p>
+<p>Limitations:-</p>
+<p>a) Obviously this wont work in a situation where v2 has made a change that is incompatible with earlier version, such altering schema.</p>
+<p>b) A change in asterix zip applies to all existing instances (after a restart) and subsequent instances that user creates.</p></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[15/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/allens.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/allens.html b/docs/0.8.8-incubating/aql/allens.html
new file mode 100644
index 0000000..b4dbbb3
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/allens.html
@@ -0,0 +1,660 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Temporal Functions: Allens Relations</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Allen's Relations Functions</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB Temporal Functions: Allen&#x2019;s Relations</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#AboutAllensRelations">About Allen&#x2019;s Relations</a></li>
+  
+<li><a href="#AllensRelatonsFunctions">Allen&#x2019;s Relations Functions</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="About_Allens_Relations_Back_to_TOC"></a><a name="AboutAllensRelations" id="AboutAllensRelations">About Allen&#x2019;s Relations</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports Allen&#x2019;s relations over interval types. Allen&#x2019;s relations are also called Allen&#x2019;s interval algebra. There are totally 13 base relations described by this algebra, and all of them are supported in AsterixDB (note that <tt>interval-equals</tt> is supported by the <tt>=</tt> comparison symbol so there is no extra function for it). </p>
+<p>A detailed description of Allen&#x2019;s relations can be found from its <a class="externalLink" href="http://en.wikipedia.org/wiki/Allen&apos;s_interval_algebra">wikipedia entry</a>. </p></div>
+<div class="section">
+<h2><a name="Allens_Relations_Functions_Back_to_TOC"></a><a name="AllensRelatonsFunctions" id="AllensRelatonsFunctions">Allen&#x2019;s Relations Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="interval-before_interval-after"></a>interval-before, interval-after</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-before(interval1, interval2)
+interval-after(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether an interval happens before/after another interval. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-before(interval1, interval2)</tt> is true if and only if <tt>interval1.end &lt; interval2.start</tt>, and <tt>interval-after(interval1, interval2)</tt> is true if and only if <tt>interval1.start &gt; interval2.end</tt>. If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2005-05-01&quot;, &quot;2012-09-09&quot;)
+return {&quot;interval-before&quot;: interval-before($itv1, $itv2), &quot;interval-after&quot;: interval-after($itv2, $itv1)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-before&quot;: true, &quot;interval-after&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-covers_interval-covered-by"></a>interval-covers, interval-covered-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-covers(interval1, interval2)
+interval-covered-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval covers the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-covers(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start &lt;= interval2.start
+AND interval1.end &gt;= interval2.end
+</pre></div></div>
+<p><tt>interval-covered-by(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.start &lt;= interval1.start
+AND interval2.end &gt;= interval1.end
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2000-03-01&quot;, &quot;2004-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2012-08-01&quot;)
+return {&quot;interval-covers&quot;: interval-covers($itv1, $itv2), &quot;interval-covered-by&quot;: interval-covered-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-covers&quot;: true, &quot;interval-covered-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-overlaps_interval-overlapped-by"></a>interval-overlaps, interval-overlapped-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-overlaps(interval1, interval2)
+interval-overlapped-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These functions check whether two intervals overlap with each other.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-overlaps(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start &lt; interval2.start
+AND interval2.end &gt; interval1.end
+AND interval1.end &gt; interval2.start
+</pre></div></div>
+<p><tt>interval-overlapped-by(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.start &lt; interval1.start
+AND interval1.end &gt; interval2.end
+AND interval2.end &gt; interval1.start
+</pre></div></div>
+<p>For all these functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p>
+<p>Note that <tt>interval-overlaps</tt> and <tt>interval-overlapped-by</tt> are following the Allen&#x2019;s relations on the definition of overlap.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2004-05-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-12-31&quot;)
+return {&quot;overlaps&quot;: interval-overlaps($itv1, $itv2), 
+        &quot;overlapped-by&quot;: interval-overlapped-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;overlaps&quot;: true, &quot;overlapped-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-overlapping"></a>interval-overlapping</h3>
+<p>Note that <tt>interval-overlapping</tt> is not an Allen&#x2019;s Relation, but syntactic sugar we added for the case that the intersect of two intervals is not empty. Basically this function returns true if any of these functions return true: <tt>interval-overlaps</tt>, <tt>interval-overlapped-by</tt>, <tt>interval-covers</tt>, or <tt>interval-covered-by</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-overlapping(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>This functions check whether two intervals share any points with each other. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-overlapping(interval1, interval2)</tt> is true if</p>
+  
+<div class="source">
+<div class="source">
+<pre>(interval2.start &gt;= interval1.start
+AND interval2.start &lt; interval1.end)
+OR
+(interval2.end &gt; interval1.start
+AND interval2.end &lt;= interval1.end)
+</pre></div></div>
+<p>If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2004-05-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-12-31&quot;)
+return {&quot;overlapping1&quot;: interval-overlapping($itv1, $itv2), 
+        &quot;overlapping2&quot;: interval-overlapping($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;overlapping1&quot;: true, &quot;overlapping2&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-meets_interval-met-by"></a>interval-meets, interval-met-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-meets(interval1, interval2)
+interval-met-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether an interval meets with another interval. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-meets(interval1, interval2)</tt> is true if and only if <tt>interval1.end = interval2.start</tt>, and <tt>interval-met-by(interval1, interval2)</tt> is true if and only if <tt>interval1.start = interval2.end</tt>. If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2005-01-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-08-01&quot;)
+return {&quot;meets&quot;: interval-meets($itv1, $itv2), &quot;metby&quot;: interval-met-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;meets&quot;: true, &quot;metby&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-starts_interval-started-by"></a>interval-starts, interval-started-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-starts(interval1, interval2)
+interval-started-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval starts with the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-starts(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start = interval2.start
+AND interval1.end &lt;= interval2.end
+</pre></div></div>
+<p><tt>interval-started-by(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start = interval2.start
+AND interval2.end &lt;= interval1.end
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2000-01-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2006-08-01&quot;, &quot;2006-08-01&quot;)
+return {&quot;interval-starts&quot;: interval-starts($itv1, $itv2), &quot;interval-started-by&quot;: interval-started-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-starts&quot;: true, &quot;interval-started-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-ends_interval-ended-by"></a>interval-ends, interval-ended-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-ends(interval1, interval2)
+interval-ended-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval ends with the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-ends(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.end = interval2.end
+AND interval1.start &gt;= interval2.start
+</pre></div></div>
+<p><tt>interval-ended-by(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.end = interval1.end
+AND interval2.start &gt;= interval1.start
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;1998-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2006-09-10&quot;, &quot;2007-03-01&quot;)
+return {&quot;interval-ends&quot;: interval-ends($itv1, $itv2), &quot;interval-ended-by&quot;: interval-ended-by($itv3, $itv4) }
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-ends&quot;: true, &quot;interval-ended-by&quot;: true }
+</pre></div></div></li>
+</ul></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/datamodel.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/datamodel.html b/docs/0.8.8-incubating/aql/datamodel.html
new file mode 100644
index 0000000..b72617f
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/datamodel.html
@@ -0,0 +1,783 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Asterix Data Model (ADM)</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Asterix Data Model (ADM)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Asterix Data Model (ADM)</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PrimitiveTypes">Primitive Types</a>
+  
+<ul>
+    
+<li><a href="#PrimitiveTypesBoolean">Boolean</a></li>
+    
+<li><a href="#PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a></li>
+    
+<li><a href="#PrimitiveTypesFloat">Float</a></li>
+    
+<li><a href="#PrimitiveTypesDouble">Double</a></li>
+    
+<li><a href="#PrimitiveTypesString">String</a></li>
+    
+<li><a href="#PrimitiveTypesPoint">Point</a></li>
+    
+<li><a href="#PrimitiveTypesLine">Line</a></li>
+    
+<li><a href="#PrimitiveTypesRectangle">Rectangle</a></li>
+    
+<li><a href="#PrimitiveTypesCircle">Circle</a></li>
+    
+<li><a href="#PrimitiveTypesPolygon">Polygon</a></li>
+    
+<li><a href="#PrimitiveTypesDate">Date</a></li>
+    
+<li><a href="#PrimitiveTypesTime">Time</a></li>
+    
+<li><a href="#PrimitiveTypesDateTime">Datetime</a></li>
+    
+<li><a href="#PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a></li>
+    
+<li><a href="#PrimitiveTypesInterval">Interval</a></li>
+    
+<li><a href="#PrimitiveTypesUUID">UUID</a></li>
+  </ul></li>
+  
+<li><a href="#DerivedTypes">Derived Types</a>
+  
+<ul>
+    
+<li><a href="#DerivedTypesRecord">Record</a></li>
+    
+<li><a href="#DerivedTypesOrderedList">OrderedList</a></li>
+    
+<li><a href="#DerivedTypesUnorderedList">UnorderedList</a></li>
+  </ul></li>
+</ul>
+<p>An instance of Asterix data model (ADM) can be a <i><i>primitive type</i></i> (<tt>int32</tt>, <tt>int64</tt>, <tt>string</tt>, <tt>float</tt>, <tt>double</tt>, <tt>date</tt>, <tt>time</tt>, <tt>datetime</tt>, etc. or <tt>null</tt>) or a <i><i>derived type</i></i>.</p></div>
+<div class="section">
+<h2><a name="Primitive_Types_Back_to_TOC"></a><a name="PrimitiveTypes" id="PrimitiveTypes">Primitive Types</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="BooleanBack_to_TOC"></a><a name="PrimitiveTypesBoolean" id="PrimitiveTypesBoolean">Boolean</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>boolean</tt> data type can have one of the two values: <i><i>true</i></i> or <i><i>false</i></i>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $t := true
+let $f := false
+return { &quot;true&quot;: $t, &quot;false&quot;: $f }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;true&quot;: true, &quot;false&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Int8__Int16__Int32__Int64_Back_to_TOC"></a><a name="PrimitiveTypesInt" id="PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>Integer types using 8, 16, 32, or 64 bits. The ranges of these types are:</p>
+
+<ul>
+  
+<li><tt>int8</tt>: -127 to 127</li>
+  
+<li><tt>int16</tt>: -32767 to 32767</li>
+  
+<li><tt>int32</tt>: -2147483647 to 2147483647</li>
+  
+<li><tt>int64</tt>: -9223372036854775808 to 9223372036854775807</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v8 := int8(&quot;125&quot;)
+let $v16 := int16(&quot;32765&quot;)
+let $v32 := 294967295
+let $v64 := int64(&quot;1700000000000000000&quot;)
+return { &quot;int8&quot;: $v8, &quot;int16&quot;: $v16, &quot;int32&quot;: $v32, &quot;int64&quot;: $v64}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;int8&quot;: 125i8, &quot;int16&quot;: 32765i16, &quot;int32&quot;: 294967295, &quot;int64&quot;: 1700000000000000000i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Float_Back_to_TOC"></a><a name="PrimitiveTypesFloat" id="PrimitiveTypesFloat">Float</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>float</tt> represents approximate numeric data values using 4 bytes. The range of a float value can be from 2^(-149) to (2-2^(-23)&#xb7;2^(127) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := float(&quot;NaN&quot;)
+let $v2 := float(&quot;INF&quot;)
+let $v3 := float(&quot;-INF&quot;)
+let $v4 := float(&quot;-2013.5&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: NaNf, &quot;v2&quot;: Infinityf, &quot;v3&quot;: -Infinityf, &quot;v4&quot;: -2013.5f }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Double_Back_to_TOC"></a><a name="PrimitiveTypesDouble" id="PrimitiveTypesDouble">Double</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>double</tt> represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))&#xb7;2^(1023) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := double(&quot;NaN&quot;)
+let $v2 := double(&quot;INF&quot;)
+let $v3 := double(&quot;-INF&quot;)
+let $v4 := double(&quot;-2013.593823748327284&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: NaNd, &quot;v2&quot;: Infinityd, &quot;v3&quot;: -Infinityd, &quot;v4&quot;: -2013.5938237483274d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="String_Back_to_TOC"></a><a name="PrimitiveTypesString" id="PrimitiveTypesString">String</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>string</tt> represents a sequence of characters.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := string(&quot;This is a string.&quot;)
+let $v2 := string(&quot;\&quot;This is a quoted string\&quot;&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: &quot;This is a string.&quot;, &quot;v2&quot;: &quot;\&quot;This is a quoted string\&quot;&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Point_Back_to_TOC"></a><a name="PrimitiveTypesPoint" id="PrimitiveTypesPoint">Point</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>point</tt> is the fundamental two-dimensional building block for spatial types. It consists of two <tt>double</tt> coordinates x and y.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := point(&quot;80.10d, -10E5&quot;)
+let $v2 := point(&quot;5.10E-10d, -10E5&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: point(&quot;80.1,-1000000.0&quot;), &quot;v2&quot;: point(&quot;5.1E-10,-1000000.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Line_Back_to_TOC"></a><a name="PrimitiveTypesLine" id="PrimitiveTypesLine">Line</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>line</tt> consists of two points that represent the start and the end points of a line segment.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := line(&quot;10.1234,11.1e-1 +10.2E-2,-11.22&quot;)
+let $v2 := line(&quot;0.1234,-1.00e-10 +10.5E-2,-01.02&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: line(&quot;10.1234,1.11 0.102,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.0E-10 0.105,-1.02&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="RectangleBack_to_TOC"></a><a name="PrimitiveTypesRectangle" id="PrimitiveTypesRectangle">Rectangle</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>rectangle</tt> consists of two points that represent the <i><i>bottom left</i></i> and <i><i>upper right</i></i> corners of a rectangle.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := rectangle(&quot;5.1,11.8 87.6,15.6548&quot;)
+let $v2 := rectangle(&quot;0.1234,-1.00e-10 5.5487,0.48765&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.0E-10 5.5487,0.48765&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="CircleBack_to_TOC"></a><a name="PrimitiveTypesCircle" id="PrimitiveTypesCircle">Circle</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>circle</tt> consists of one point that represents the center of the circle and a radius of type <tt>double</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := circle(&quot;10.1234,11.1e-1 +10.2E-2&quot;)
+let $v2 := circle(&quot;0.1234,-1.00e-10 +10.5E-2&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: circle(&quot;10.1234,1.11 0.102&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.0E-10 0.105&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="PolygonBack_to_TOC"></a><a name="PrimitiveTypesPolygon" id="PrimitiveTypesPolygon">Polygon</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>polygon</tt> consists of <i><i>n</i></i> points that represent the vertices of a <i><i>simple closed</i></i> polygon.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := polygon(&quot;-1.2,+1.3e2 -2.14E+5,2.15 -3.5e+2,03.6 -4.6E-3,+4.81&quot;)
+let $v2 := polygon(&quot;-1.0,+10.5e2 -02.15E+50,2.5 -1.0,+3.3e3 -2.50E+05,20.15 +3.5e+2,03.6 -4.60E-3,+4.75 -2,+1.0e2 -2.00E+5,20.10 30.5,03.25 -4.33E-3,+4.75&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: polygon(&quot;-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81&quot;), &quot;v2&quot;: polygon(&quot;-1.0,1050.0 -2.15E50,2.5 -1.0,3300.0 -250000.0,20.15 350.0,3.6 -0.0046,4.75 -2.0,100.0 -200000.0,20.1 30.5,3.25 -0.00433,4.75&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DateBack_to_TOC"></a><a name="PrimitiveTypesDate" id="PrimitiveTypesDate">Date</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>date</tt> represents a time point along the Gregorian calendar system specified by the year, month and day. ASTERIX supports the date from <tt>-9999-01-01</tt> to <tt>9999-12-31</tt>.</p>
+<p>A date value can be represented in two formats, extended format and basic format.</p>
+
+<ul>
+  
+<li>Extended format is represented as <tt>[-]yyyy-mm-dd</tt> for <tt>year-month-day</tt>. Each field should be padded if there are less digits than the format specified.</li>
+  
+<li>Basic format is in the format of <tt>[-]yyyymmdd</tt>.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := date(&quot;2013-01-01&quot;)
+let $v2 := date(&quot;-19700101&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-1970-01-01&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="TimeBack_to_TOC"></a><a name="PrimitiveTypesTime" id="PrimitiveTypesTime">Time</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>time</tt> type describes the time within the range of a day. It is represented by three fields: hour, minute and second. Millisecond field is optional as the fraction of the second field. Its extended format is as <tt>hh:mm:ss[.mmm]</tt> and the basic format is <tt>hhmmss[mmm]</tt>. The value domain is from <tt>00:00:00.000</tt> to <tt>23:59:59.999</tt>.</p>
+<p>Timezone field is optional for a time value. Timezone is represented as <tt>[+|-]hh:mm</tt> for extended format or <tt>[+|-]hhmm</tt> for basic format. Note that the sign designators cannot be omitted. <tt>Z</tt> can also be used to represent the UTC local time. If no timezone information is given, it is UTC by default.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := time(&quot;12:12:12.039Z&quot;)
+let $v2 := time(&quot;000000000-0800&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;08:00:00.000Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DatetimeBack_to_TOC"></a><a name="PrimitiveTypesDateTime" id="PrimitiveTypesDateTime">Datetime</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>A <tt>datetime</tt> value is a combination of an <tt>date</tt> and <tt>time</tt>, representing a fixed time point along the Gregorian calendar system. The value is among <tt>-9999-01-01 00:00:00.000</tt> and <tt>9999-12-31 23:59:59.999</tt>.</p>
+<p>A <tt>datetime</tt> value is represented as a combination of the representation of its <tt>date</tt> part and <tt>time</tt> part, separated by a separator <tt>T</tt>. Either extended or basic format can be used, and the two parts should be the same format.</p>
+<p>Millisecond field and timezone field are optional, as specified in the <tt>time</tt> type.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := datetime(&quot;2013-01-01T12:12:12.039Z&quot;)
+let $v2 := datetime(&quot;-19700101T000000000-0800&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-1970-01-01T08:00:00.000Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DurationYear-month-durationDay-time-durationBack_to_TOC"></a><a name="PrimitiveTypesDuration" id="PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>duration</tt> represents a duration of time. A duration value is specified by integers on at least one of the following fields: year, month, day, hour, minute, second, and millisecond.</p>
+<p>A duration value is in the format of <tt>[-]PnYnMnDTnHnMn.mmmS</tt>. The millisecond part (as the fraction of the second field) is optional, and when no millisecond field is used, the decimal point should also be absent.</p>
+<p>Negative durations are also supported for the arithmetic operations between time instance types (<tt>date</tt>, <tt>time</tt> and <tt>datetime</tt>), and is used to roll the time back for the given duration. For example <tt>date(&quot;2012-01-01&quot;) + duration(&quot;-P3D&quot;)</tt> will return <tt>date(&quot;2011-12-29&quot;)</tt>.</p>
+<p>There are also two sub-duration types, namely <tt>year-month-duration</tt> and <tt>day-time-duration</tt>. <tt>year-month-duration</tt> represents only the years and months of a duration, while <tt>day-time-duration</tt> represents only the day to millisecond fields. Different from the <tt>duration</tt> type, both these two subtypes are totally ordered, so they can be used for comparison and index construction.</p>
+<p>Note that a canonical representation of the duration is always returned, regardless whether the duration is in the canonical representation or not from the user&#x2019;s input. More information about canonical representation can be found from <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-dayTimeDuration">XPath dayTimeDuration Canonical Representation</a> and <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-yearMonthDuration">yearMonthDuration Canonical Representation</a>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := duration(&quot;P100Y12MT12M&quot;)
+let $v2 := duration(&quot;-PT20.943S&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: duration(&quot;P101YT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="IntervalBack_to_TOC"></a><a name="PrimitiveTypesInterval" id="PrimitiveTypesInterval">Interval</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>interval</tt> represents inclusive-exclusive ranges of time. It is defined by two time point values with the same temporal type(<tt>date</tt>, <tt>time</tt> or <tt>datetime</tt>).</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := interval-from-date(date(&quot;2013-01-01&quot;), date(&quot;20130505&quot;))
+let $v2 := interval-from-time(time(&quot;00:01:01&quot;), time(&quot;213901049+0800&quot;))
+let $v3 := interval-from-datetime(datetime(&quot;2013-01-01T00:01:01&quot;), datetime(&quot;20130505T213901049+0800&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: interval-date(&quot;2013-01-01, 2013-05-05&quot;), &quot;v2&quot;: interval-time(&quot;00:01:01.000Z, 13:39:01.049Z&quot;), &quot;v3&quot;: interval-datetime(&quot;2013-01-01T00:01:01.000Z, 2013-05-05T13:39:01.049Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="UUIDBack_to_TOC"></a><a name="PrimitiveTypesUUID" id="PrimitiveTypesUUID">UUID</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>uuid</tt> represents a UUID value, which stands for Universally unique identifier. It is defined by a canonical format using hexadecimal text with inserted hyphen characters. (E.g.: 5a28ce1e-6a74-4201-9e8f-683256e5706f). This type is generally used to store auto-generated primary key values.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;)
+return { &quot;v1&quot;:$v1 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;) }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Derived_TypesBack_to_TOC"></a><a name="DerivedTypes" id="DerivedTypes">Derived Types</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="RecordBack_to_TOC"></a><a name="DerivedTypesRecord" id="DerivedTypesRecord">Record</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>A <tt>record</tt> contains a set of &#xfb01;elds, where each &#xfb01;eld is described by its name and type. A record type is either open or closed. Open records can contain &#xfb01;elds that are not part of the type de&#xfb01;nition, while closed records cannot. Syntactically, record constructors are surrounded by curly braces &#x201c;{&#x2026;}&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 213508, &quot;name&quot;: &quot;Alice Bob&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="OrderedListBack_to_TOC"></a><a name="DerivedTypesOrderedList" id="DerivedTypesOrderedList">OrderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>An <tt>orderedList</tt> is a sequence of values for which the order is determined by creation or insertion. OrderedList constructors are denoted by brackets: &#x201c;[&#x2026;]&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    [&quot;alice&quot;, 123, &quot;bob&quot;, null]
+</pre></div></div></div>
+<div class="section">
+<h3><a name="UnorderedListBack_to_TOC"></a><a name="DerivedTypesUnorderedList" id="DerivedTypesUnorderedList">UnorderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>An <tt>unorderedList</tt> is an unordered sequence of values, similar to bags in SQL. UnorderedList constructors are denoted by two opening flower braces followed by data and two closing flower braces, like &#x201c;{{&#x2026;}}&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    {{&quot;hello&quot;, 9328, &quot;world&quot;, [1, 2, null]}}
+</pre></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/externaldata.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/externaldata.html b/docs/0.8.8-incubating/aql/externaldata.html
new file mode 100644
index 0000000..1266cb8
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/externaldata.html
@@ -0,0 +1,633 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Accessing External Data in AsterixDB</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Accessing External Data</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Accessing External Data in AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Introduction">Introduction</a></li>
+  
+<li><a href="#IntroductionAdapterForAnExternalDataset">Adapter for an External Dataset</a></li>
+  
+<li><a href="#IntroductionCreatingAnExternalDataset">Creating an External Dataset</a></li>
+  
+<li><a href="#WritingQueriesAgainstAnExternalDataset">Writing Queries against an External Dataset</a></li>
+  
+<li><a href="#BuildingIndexesOverExternalDatasets">Building Indexes over External Datasets</a></li>
+  
+<li><a href="#ExternalDataSnapshot">External Data Snapshots</a></li>
+  
+<li><a href="#FAQ">Frequently Asked Questions</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction_Back_to_TOC"></a><a name="Introduction" id="Introduction">Introduction</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Data that needs to be processed by AsterixDB could be residing outside AsterixDB storage. Examples include data files on a distributed file system such as HDFS or on the local file system of a machine that is part of an AsterixDB cluster. For AsterixDB to process such data, an end-user may create a regular dataset in AsterixDB (a.k.a. an internal dataset) and load the dataset with the data. AsterixDB also supports &#x2018;&#x2018;external datasets&#x2019;&#x2019; so that it is not necessary to &#x201c;load&#x201d; all data prior to using it. This also avoids creating multiple copies of data and the need to keep the copies in sync.</p>
+<div class="section">
+<h3><a name="Adapter_for_an_External_Dataset_Back_to_TOC"></a><a name="IntroductionAdapterForAnExternalDataset" id="IntroductionAdapterForAnExternalDataset">Adapter for an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>External data is accessed using wrappers (adapters in AsterixDB) that abstract away the mechanism of connecting with an external service, receiving its data and transforming the data into ADM records that are understood by AsterixDB. AsterixDB comes with built-in adapters for common storage systems such as HDFS or the local file system.</p></div>
+<div class="section">
+<h3><a name="Creating_an_External_Dataset_Back_to_TOC"></a><a name="IntroductionCreatingAnExternalDataset" id="IntroductionCreatingAnExternalDataset">Creating an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>As an example we consider the Lineitem dataset from the <a class="externalLink" href="http://www.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSTPCHLinkedData/tpch.sql">TPCH schema</a>. We assume that you have successfully created an AsterixDB instance following the instructions at <a href="../install.html">Installing AsterixDB Using Managix</a>. <i>For constructing an example, we assume a single machine setup..</i></p>
+<p>Similar to a regular dataset, an external dataset has an associated datatype. We shall first create the datatype associated with each record in Lineitem data. Paste the following in the query textbox on the webpage at <a class="externalLink" href="http://127.0.0.1:19001">http://127.0.0.1:19001</a> and hit &#x2018;Execute&#x2019;.</p>
+
+<div class="source">
+<div class="source">
+<pre>    create dataverse ExternalFileDemo;
+    use dataverse ExternalFileDemo;
+
+    create type LineitemType as closed {
+      l_orderkey:int32,
+      l_partkey: int32,
+      l_suppkey: int32,
+      l_linenumber: int32,
+      l_quantity: double,
+      l_extendedprice: double,
+      l_discount: double,
+      l_tax: double,
+      l_returnflag: string,
+      l_linestatus: string,
+      l_shipdate: string,
+      l_commitdate: string,
+      l_receiptdate: string,
+      l_shipinstruct: string,
+      l_shipmode: string,
+      l_comment: string}
+</pre></div></div>
+<p>Here, we describe two scenarios.</p>
+<div class="section">
+<h4><a name="a1_Data_file_resides_on_the_local_file_system_of_a_host"></a>1) Data file resides on the local file system of a host</h4>
+<p>Prerequisite: The host is a part of the ASTERIX cluster.</p>
+<p>Earlier, we assumed a single machine ASTERIX setup. To satisfy the prerequisite, log-in to the machine running ASTERIX.</p>
+
+<ul>
+  
+<li>Download the <a href="../data/lineitem.tbl">data file</a> to an appropriate location. We denote this location by SOURCE_PATH.</li>
+</ul>
+<p>ASTERIX provides a built-in adapter for data residing on the local file system. The adapter is referred by its alias- &#x2018;localfs&#x2019;. We create an external dataset named Lineitem and use the &#x2018;localfs&#x2019; adapter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem(LineitemType)
+    using localfs
+</pre></div></div>
+<p>Above, the definition is not complete as we need to provide a set of parameters that are specific to the source file.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td> Parameter </td>
+  
+<td> Description </td>
+</tr>
+
+<tr class="b">
+  
+<td> path </td>
+  
+<td> A fully qualified path of the form <tt>host://&lt;absolute path&gt;</tt>. 
+  Use a comma separated list if there are multiple files. 
+  E.g. <tt>host1://&lt;absolute path&gt;</tt>, <tt>host2://&lt;absolute path&gt;</tt> and so forth. </td>
+</tr>
+
+<tr class="a">
+  
+<td> format </td>
+  
+<td> The format for the content. Use 'adm' for data in ADM (ASTERIX Data Model) or <a class="externalLink" href="http://www.json.org/">JSON</a> format. Use 'delimited-text' if fields are separated by a delimiting character (eg., CSV). </td></tr>
+
+<tr class="b">
+  
+<td>delimiter</td>
+  
+<td>The delimiting character in the source file if format is 'delimited text'</td>
+</tr>
+</table>
+<p>As we are using a single single machine ASTERIX instance, we use 127.0.0.1 as host in the path parameter. We <i>complete the create dataset statement</i> as follows.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse ExternalFileDemo;
+
+    create external dataset Lineitem(LineitemType)
+    using localfs
+    ((&quot;path&quot;=&quot;127.0.0.1://SOURCE_PATH&quot;),
+    (&quot;format&quot;=&quot;delimited-text&quot;),
+    (&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div>
+<p>Please substitute SOURCE_PATH with the absolute path to the source file on the local file system.</p></div>
+<div class="section">
+<h4><a name="Common_source_of_error"></a>Common source of error</h4>
+<p>An incorrect value for the path parameter will give the following exception message when the dataset is used in a query.</p>
+
+<div class="source">
+<div class="source">
+<pre>    org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: Job failed.
+</pre></div></div>
+<p>Verify the correctness of the path parameter provided to the localfs adapter. Note that the path parameter must be an absolute path to the data file. For e.g. if you saved your file in your home directory (assume it to be /home/joe), then the path value should be</p>
+
+<div class="source">
+<div class="source">
+<pre>    127.0.0.1:///home/joe/lineitem.tbl.
+</pre></div></div>
+<p>In your web-browser, navigate to 127.0.0.1:19001 and paste the above to the query text box. Finally hit &#x2018;Execute&#x2019;.</p>
+<p>Next we move over to the the section <a href="#Writing_Queries_against_an_External_Dataset">Writing Queries against an External Dataset</a> and try a sample query against the external dataset.</p></div>
+<div class="section">
+<h4><a name="a2_Data_file_resides_on_an_HDFS_instance"></a>2) Data file resides on an HDFS instance</h4>
+<p>rerequisite: It is required that the Namenode and HDFS Datanodes are reachable from the hosts that form the AsterixDB cluster. AsterixDB provides a built-in adapter for data residing on HDFS. The HDFS adapter can be referred (in AQL) by its alias - &#x2018;hdfs&#x2019;. We can create an external dataset named Lineitem and associate the HDFS adapter with it as follows;</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem(LineitemType) 
+    using hdfs((&#x201c;hdfs&#x201d;:&#x201d;hdfs://localhost:54310&#x201d;),(&#x201c;path&#x201d;:&#x201d;/asterix/Lineitem.tbl&#x201d;),...,(&#x201c;input- format&#x201d;:&#x201d;rc-format&#x201d;));
+</pre></div></div>
+<p>The expected parameters are described below:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td> Parameter </td>
+  
+<td> Description </td>
+</tr>
+
+<tr class="b">
+  
+<td> hdfs </td>
+  
+<td> The HDFS URL </td>
+</tr>
+
+<tr class="a">
+  
+<td> path </td>
+  
+<td> The absolute path to the source HDFS file or directory. Use a comma separated list if there are multiple files or directories. </td></tr>
+
+<tr class="b">
+  
+<td> input-format </td>
+  
+<td> The associated input format. Use 'text-input-format' for text files , 'sequence-input-format' for hadoop sequence files, 'rc-input-format' for Hadoop Record Columnar files, or a fully qualified name of an implementation of org.apache.hadoop.mapred.InputFormat. </td>
+</tr>
+
+<tr class="a">
+  
+<td> format </td>
+  
+<td> The format of the input content. Use 'adm' for text data in ADM (ASTERIX Data Model) or <a class="externalLink" href="http://www.json.org/">JSON</a> format, 'delimited-text' for text delimited data that has fields separated by a delimiting character, 'binary' for other data.</td>
+</tr>
+
+<tr class="b">
+  
+<td> delimiter </td>
+  
+<td> The delimiting character in the source file if format is 'delimited text' </td>
+</tr>
+
+<tr class="a">
+  
+<td> parser </td>
+  
+<td> The parser used to parse HDFS records if the format is 'binary'. Use 'hive- parser' for data deserialized by a Hive Serde (AsterixDB can understand deserialized Hive objects) or a fully qualified class name of user- implemented parser that implements the interface org.apache.asterix.external.input.InputParser. </td>
+</tr>
+
+<tr class="b">
+  
+<td> hive-serde </td>
+  
+<td> The Hive serde is used to deserialize HDFS records if format is binary and the parser is hive-parser. Use a fully qualified name of a class implementation of org.apache.hadoop.hive.serde2.SerDe. </td>
+</tr>
+
+<tr class="a">
+  
+<td> local-socket-path </td>
+  
+<td> The UNIX domain socket path if local short-circuit reads are enabled in the HDFS instance</td>
+</tr>
+</table>
+<p><i>Difference between &#x2018;input-format&#x2019; and &#x2018;format&#x2019;</i></p>
+<p><i>input-format</i>: Files stored under HDFS have an associated storage format. For example, TextInputFormat represents plain text files. SequenceFileInputFormat indicates binary compressed files. RCFileInputFormat corresponds to records stored in a record columnar fashion. The parameter &#x2018;input-format&#x2019; is used to distinguish between these and other HDFS input formats.</p>
+<p><i>format</i>: The parameter &#x2018;format&#x2019; refers to the type of the data contained in the file. For example, data contained in a file could be in json or ADM format, could be in delimited-text with fields separated by a delimiting character or could be in binary format.</p>
+<p>As an example. consider the <a href="../data/lineitem.tbl">data file</a>. The file is a text file with each line representing a record. The fields in each record are separated by the &#x2018;|&#x2019; character.</p>
+<p>We assume the HDFS URL to be <a class="externalLink" href="hdfs://localhost:54310">hdfs://localhost:54310</a>. We further assume that the example data file is copied to HDFS at a path denoted by &#x201c;/asterix/Lineitem.tbl&#x201d;.</p>
+<p>The complete set of parameters for our example file are as follows. ((&#x201c;hdfs&#x201d;=&#x201c;hdfs://localhost:54310&#x201d;,(&#x201c;path&#x201d;=&#x201c;/asterix/Lineitem.tbl&#x201d;),(&#x201c;input-format&#x201d;=&#x201c;text- input-format&#x201d;),(&#x201c;format&#x201d;=&#x201c;delimited-text&#x201d;),(&#x201c;delimiter&#x201d;=&#x201c;|&#x201d;))</p></div>
+<div class="section">
+<h4><a name="Using_the_Hive_Parser"></a>Using the Hive Parser</h4>
+<p>if a user wants to create an external dataset that uses hive-parser to parse HDFS records, it is important that the datatype associated with the dataset matches the actual data in the Hive table for the correct initialization of the Hive SerDe. Here is the conversion from the supported Hive data types to AsterixDB data types:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td> Hive </td>
+  
+<td> AsterixDB </td>
+</tr>
+
+<tr class="b">
+  
+<td>BOOLEAN</td>
+  
+<td>Boolean</td>
+</tr>
+
+<tr class="a">
+  
+<td>BYTE(TINY INT)</td>
+  
+<td>Int8</td>
+</tr>
+
+<tr class="b">
+  
+<td>DOUBLE</td>
+  
+<td>Double</td>
+</tr>
+
+<tr class="a">
+  
+<td>FLOAT</td>
+  
+<td>Float</td>
+</tr>
+
+<tr class="b">
+  
+<td>INT</td>
+  
+<td>Int32</td>
+</tr>
+
+<tr class="a">
+  
+<td>LONG(BIG INT)</td>
+  
+<td>Int64</td>
+</tr>
+
+<tr class="b">
+  
+<td>SHORT(SMALL INT)</td>
+  
+<td>Int16</td>
+</tr>
+
+<tr class="a">
+  
+<td>STRING</td>
+  
+<td>String</td>
+</tr>
+
+<tr class="b">
+  
+<td>TIMESTAMP</td>
+  
+<td>Datetime</td>
+</tr>
+
+<tr class="a">
+  
+<td>DATE</td>
+  
+<td>Date</td>
+</tr>
+
+<tr class="b">
+  
+<td>STRUCT</td>
+  
+<td>Nested Record</td>
+</tr>
+
+<tr class="a">
+  
+<td>LIST</td>
+  
+<td>OrderedList or UnorderedList</td>
+</tr>
+</table></div>
+<div class="section">
+<h4><a name="Examples_of_dataset_definitions_for_external_datasets"></a>Examples of dataset definitions for external datasets</h4>
+<p><i>Example 1</i>: We can modify the create external dataset statement as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem('LineitemType)
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/Lineitem.tbl&quot;),(&quot;input-format&quot;=&quot;text- input-format&quot;),(&quot;format&quot;=&quot;delimited-text&quot;),(&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div>
+<p><i>Example 2</i>: Here, we create an external dataset of lineitem records stored in sequence files that has content in ADM format:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem('LineitemType) 
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/SequenceLineitem.tbl&quot;),(&quot;input- format&quot;=&quot;sequence-input-format&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div>
+<p><i>Example 3</i>: Here, we create an external dataset of lineitem records stored in record-columnar files that has content in binary format parsed using hive-parser with hive ColumnarSerde:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem('LineitemType)
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/RCLineitem.tbl&quot;),(&quot;input-format&quot;=&quot;rc-input-format&quot;),(&quot;format&quot;=&quot;binary&quot;),(&quot;parser&quot;=&quot;hive-parser&quot;),(&quot;hive- serde&quot;=&quot;org.apache.hadoop.hive.serde2.columnar.ColumnarSerde&quot;));
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Writing_Queries_against_an_External_Dataset_Back_to_TOC"></a><a name="WritingQueriesAgainstAnExternalDataset" id="WritingQueriesAgainstAnExternalDataset">Writing Queries against an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>You may write AQL queries against an external dataset in exactly the same way that queries are written against internal datasets. The following is an example of an AQL query that applies a filter and returns an ordered result.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse ExternalFileDemo;
+
+    for $c in dataset('Lineitem')
+    where $c.l_orderkey &lt;= 3
+    order by $c.l_orderkey, $c.l_linenumber
+    return $c
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Building_Indexes_over_External_Datasets_Back_to_TOC"></a><a name="BuildingIndexesOverExternalDatasets" id="BuildingIndexesOverExternalDatasets">Building Indexes over External Datasets</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports building B-Tree and R-Tree indexes over static data stored in the Hadoop Distributed File System. To create an index, first create an external dataset over the data as follows</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem(LineitemType) 
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/Lineitem.tbl&quot;),(&quot;input-format&quot;=&quot;text-input- format&quot;),(&quot;format&quot;=&quot;delimited-text&quot;),(&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div>
+<p>You can then create a B-Tree index on this dataset instance as if the dataset was internally stored as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create index PartkeyIdx on Lineitem(l_partkey);
+</pre></div></div>
+<p>You could also create an R-Tree index as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#xfffc;create index IndexName on DatasetName(attribute-name) type rtree;
+</pre></div></div>
+<p>After building the indexes, the AsterixDB query compiler can use them to access the dataset and answer queries in a more cost effective manner. AsterixDB can read all HDFS input formats, but indexes over external datasets can currently be built only for HDFS datasets with &#x2018;text-input-format&#x2019;, &#x2018;sequence-input-format&#x2019; or &#x2018;rc-input-format&#x2019;.</p></div>
+<div class="section">
+<h2><a name="External_Data_Snapshots_Back_to_TOC"></a><a name="ExternalDataSnapshots" id="ExternalDataSnapshots">External Data Snapshots</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>An external data snapshot represents the status of a dataset&#x2019;s files in HDFS at a point in time. Upon creating the first index over an external dataset, AsterixDB captures and stores a snapshot of the dataset in HDFS. Only records present at the snapshot capture time are indexed, and any additional indexes created afterwards will only contain data that was present at the snapshot capture time thus preserving consistency across all indexes of a dataset. To update all indexes of an external dataset and advance the snapshot time to be the present time, a user can use the refresh external dataset command as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    refresh external dataset DatasetName;
+</pre></div></div>
+<p>After a refresh operation commits, all of the dataset&#x2019;s indexes will reflect the status of the data as of the new snapshot capture time.</p></div>
+<div class="section">
+<h2><a name="Frequently_Asked_Questions_Back_to_TOC"></a><a name="FAQ" id="FAQ">Frequently Asked Questions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Q. I added data to my dataset in HDFS, Will the dataset indexes in AsterixDB be updated automatically?</p>
+<p>A. No, you must use the refresh external dataset statement to make the indexes aware of any changes in the dataset files in HDFS.</p>
+<p>Q. Why doesn&#x2019;t AsterixDB update external indexes automatically?</p>
+<p>A. Since external data is managed by other users/systems with mechanisms that are system dependent, AsterixDB has no way of knowing exactly when data is added or deleted in HDFS, so the responsibility of refreshing indexes are left to the user. A user can use internal datasets for which AsterixDB manages the data and its indexes.</p>
+<p>Q. I created an index over an external dataset and then added some data to my HDFS dataset. Will a query that uses the index return different results from a query that doesn&#x2019;t use the index?</p>
+<p>A. No, queries&#x2019; results are access path independent and the stored snapshot is used to determines which data are going to be included when processing queries.</p>
+<p>Q. I created an index over an external dataset and then deleted some of my dataset&#x2019;s files in HDFS, Will indexed data access still return the records in deleted files?</p>
+<p>A. No. When AsterixDB accesses external data, with or without the use of indexes, it only access files present in the file system at runtime.</p>
+<p>Q. I submitted a refresh command on a an external dataset and a failure occurred, What has happened to my indexes?</p>
+<p>A. External Indexes Refreshes are treated as a single transaction. In case of a failure, a rollback occurs and indexes are restored to their previous state. An error message with the cause of failure is returned to the user.</p>
+<p>Q. I was trying to refresh an external dataset while some queries were accessing the data using index access method. Will the queries be affected by the refresh operation?</p>
+<p>A. Queries have access to external dataset indexes state at the time where the queries are submitted. A query that was submitted before a refresh commits will only access data under the snapshot taken before the refresh; queries that are submitted after the refresh commits will access data under the snapshot taken after the refresh.</p>
+<p>Q. What happens when I try to create an additional index while a refresh operation is in progress or vice versa?</p>
+<p>A. The create index operation will wait until the refresh commits or aborts and then the index will be built according to the external data snapshot at the end of the refresh operation. Creating indexes and refreshing datasets are mutually exclusive operations and will not be run in parallel. Multiple indexes can be created in parallel, but not multiple refresh operations.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[08/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/similarity.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/similarity.html b/docs/0.8.8-incubating/aql/similarity.html
new file mode 100644
index 0000000..70396f7
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/similarity.html
@@ -0,0 +1,431 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Support of Similarity Queries</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Support of Similarity Queries</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB Support of Similarity Queries</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Motivation">Motivation</a></li>
+  
+<li><a href="#DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a></li>
+  
+<li><a href="#SimilaritySelectionQueries">Similarity Selection Queries</a></li>
+  
+<li><a href="#SimilarityJoinQueries">Similarity Join Queries</a></li>
+  
+<li><a href="#UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_Back_to_TOC"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Similarity queries are widely used in applications where users need to find records that satisfy a similarity predicate, while exact matching is not sufficient. These queries are especially important for social and Web applications, where errors, abbreviations, and inconsistencies are common. As an example, we may want to find all the movies starring Schwarzenegger, while we don&#x2019;t know the exact spelling of his last name (despite his popularity in both the movie industry and politics :-)). As another example, we want to find all the Facebook users who have similar friends. To meet this type of needs, AsterixDB supports similarity queries using efficient indexes and algorithms.</p></div>
+<div class="section">
+<h2><a name="Data_Types_and_Similarity_Functions_Back_to_TOC"></a><a name="DataTypesAndSimilarityFunctions" id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> (on strings) and <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a> (on sets). For instance, in our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, the <tt>friend-ids</tt> of a Facebook user forms a set of friends, and we can define a similarity between the sets of friends of two users. We can also convert a string to a set of grams of a length &#x201c;n&#x201d; (called &#x201c;n-grams&#x201d;) and define the Jaccard similarity between the two gram sets of the two strings. Formally, the &#x201c;n-grams&#x201d; of a string are its substrings of length &#x201c;n&#x201d;. For instance, the 3-grams of the string <tt>schwarzenegger</tt> are <tt>sch</tt>, <tt>chw</tt>, <tt>hwa</tt>, &#x2026;, <tt>ger</tt>.</p>
+<p>AsterixDB provides <a href="functions.html#Tokenizing_Functions">tokenization functions</a> to convert strings to sets, and the <a href="functions.html#Similarity_Functions">similarity functions</a>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Selection_Queries_Back_to_TOC"></a><a name="SimilaritySelectionQueries" id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The following query asks for all the Facebook users whose name is similar to <tt>Suzanna Tilson</tt>, i.e., their edit distance is at most 2.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div>
+<p>The following query asks for all the Facebook users whose set of friend ids is similar to <tt>[1,5,9,10]</tt>, i.e., their Jaccard similarity is at least 0.6.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div>
+<p>AsterixDB allows a user to use a similarity operator <tt>~=</tt> to express a condition by defining the similarity function and threshold using &#x201c;set&#x201d; statements earlier. For instance, the above query can be equivalently written as:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.6f&quot;;
+
+    for $user in dataset('FacebookUsers')
+    where $user.friend-ids ~= [1,5,9,10]
+    return $user
+</pre></div></div>
+<p>In this query, we first declare Jaccard as the similarity function using <tt>simfunction</tt> and then specify the threshold <tt>0.6f</tt> using <tt>simthreshold</tt>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Join_Queries_Back_to_TOC"></a><a name="SimilarityJoinQueries" id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports fuzzy joins between two sets. The following <a href="primer.html#Query_5_-_Fuzzy_Join">query</a> finds, for each Facebook user, all Twitter users with names similar to their name based on the edit distance.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+
+    for $fbu in dataset FacebookUsers
+    return {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: for $t in dataset TweetMessages
+                            let $tu := $t.user
+                            where $tu.name ~= $fbu.name
+                            return {
+                            &quot;twitter-screenname&quot;: $tu.screen-name,
+                            &quot;twitter-name&quot;: $tu.name
+                            }
+    };
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Using_Indexes_to_Support_Similarity_Queries_Back_to_TOC"></a><a name="UsingIndexesToSupportSimilarityQueries" id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB uses two types of indexes to support similarity queries, namely &#x201c;ngram index&#x201d; and &#x201c;keyword index&#x201d;.</p>
+<div class="section">
+<h3><a name="NGram_Index"></a>NGram Index</h3>
+<p>An &#x201c;ngram index&#x201d; is constructed on a set of strings. We generate n-grams for each string, and build an inverted list for each n-gram that includes the ids of the strings with this gram. A similarity query can be answered efficiently by accessing the inverted lists of the grams in the query and counting the number of occurrences of the string ids on these inverted lists. The similar idea can be used to answer queries with Jaccard similarity. A detailed description of these techniques is available at this <a class="externalLink" href="http://www.ics.uci.edu/~chenli/pub/icde2009-memreducer.pdf">paper</a>.</p>
+<p>For instance, the following DDL statements create an ngram index on the <tt>FacebookUsers.name</tt> attribute using an inverted index of 3-grams.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create index fbUserIdx on FacebookUsers(name) type ngram(3);
+</pre></div></div>
+<p>The number &#x201c;3&#x201d; in &#x201c;ngram(3)&#x201d; is the length &#x201c;n&#x201d; in the grams. This index can be used to optimize similarity queries on this attribute using <a href="functions.html#edit-distance">edit-distance</a>, <a href="functions.html#edit-distance-check">edit-distance-check</a>, <a href="functions.html#similarity-jaccard">similarity-jaccard</a>, or <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a> queries on this attribute where the similarity is defined on sets of 3-grams. This index can also be used to optimize queries with the &#x201c;<a href="functions.html#contains">contains()</a>&#x201d; predicate (i.e., substring matching) since it can be also be solved by counting on the inverted lists of the grams in the query string.</p>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance"></a>NGram Index usage case - <a href="functions.html#edit-distance">edit-distance</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance-check"></a>NGram Index usage case - <a href="functions.html#edit-distance-check">edit-distance-check</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
+    where $ed[0]
+    return $ed[1]
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard">similarity-jaccard</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard-check"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
+    where $sim[0]
+    return $user
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_contains"></a>NGram Index usage case - <a href="functions.html#contains">contains()</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $i in dataset('FacebookMessages')
+    where contains($i.message, &quot;phone&quot;)
+    return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
+</pre></div></div></div></div>
+<div class="section">
+<h3><a name="Keyword_Index"></a>Keyword Index</h3>
+<p>A &#x201c;keyword index&#x201d; is constructed on a set of strings or sets (e.g., OrderedList, UnorderedList). Instead of generating grams as in an ngram index, we generate tokens (e.g., words) and for each token, construct an inverted list that includes the ids of the records with this token. The following two examples show how to create keyword index on two different types:</p>
+<div class="section">
+<h4><a name="Keyword_Index_on_String_Type"></a>Keyword Index on String Type</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    drop index FacebookMessages.fbMessageIdx if exists;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    for $o in dataset('FacebookMessages')
+    let $jacc := similarity-jaccard-check(word-tokens($o.message), word-tokens(&quot;love like verizon&quot;), 0.2f)
+    where $jacc[0]
+    return $o
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Keyword_Index_on_UnorderedList_Type"></a>Keyword Index on UnorderedList Type</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create index fbUserIdx_fids on FacebookUsers(friend-ids) type keyword;
+
+    for $c in dataset('FacebookUsers')
+    let $jacc := similarity-jaccard-check($c.friend-ids, {{3,10}}, 0.5f)
+    where $jacc[0]
+    return $c
+</pre></div></div>
+<p>As shown above, keyword index can be used to optimize queries with token-based similarity predicates, including <a href="functions.html#similarity-jaccard">similarity-jaccard</a> and <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a>.</p></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[29/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/externaldata.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/externaldata.html b/content/docs/0.8.8-incubating/aql/externaldata.html
new file mode 100644
index 0000000..1266cb8
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/externaldata.html
@@ -0,0 +1,633 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Accessing External Data in AsterixDB</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Accessing External Data</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Accessing External Data in AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Introduction">Introduction</a></li>
+  
+<li><a href="#IntroductionAdapterForAnExternalDataset">Adapter for an External Dataset</a></li>
+  
+<li><a href="#IntroductionCreatingAnExternalDataset">Creating an External Dataset</a></li>
+  
+<li><a href="#WritingQueriesAgainstAnExternalDataset">Writing Queries against an External Dataset</a></li>
+  
+<li><a href="#BuildingIndexesOverExternalDatasets">Building Indexes over External Datasets</a></li>
+  
+<li><a href="#ExternalDataSnapshot">External Data Snapshots</a></li>
+  
+<li><a href="#FAQ">Frequently Asked Questions</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction_Back_to_TOC"></a><a name="Introduction" id="Introduction">Introduction</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Data that needs to be processed by AsterixDB could be residing outside AsterixDB storage. Examples include data files on a distributed file system such as HDFS or on the local file system of a machine that is part of an AsterixDB cluster. For AsterixDB to process such data, an end-user may create a regular dataset in AsterixDB (a.k.a. an internal dataset) and load the dataset with the data. AsterixDB also supports &#x2018;&#x2018;external datasets&#x2019;&#x2019; so that it is not necessary to &#x201c;load&#x201d; all data prior to using it. This also avoids creating multiple copies of data and the need to keep the copies in sync.</p>
+<div class="section">
+<h3><a name="Adapter_for_an_External_Dataset_Back_to_TOC"></a><a name="IntroductionAdapterForAnExternalDataset" id="IntroductionAdapterForAnExternalDataset">Adapter for an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>External data is accessed using wrappers (adapters in AsterixDB) that abstract away the mechanism of connecting with an external service, receiving its data and transforming the data into ADM records that are understood by AsterixDB. AsterixDB comes with built-in adapters for common storage systems such as HDFS or the local file system.</p></div>
+<div class="section">
+<h3><a name="Creating_an_External_Dataset_Back_to_TOC"></a><a name="IntroductionCreatingAnExternalDataset" id="IntroductionCreatingAnExternalDataset">Creating an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>As an example we consider the Lineitem dataset from the <a class="externalLink" href="http://www.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSTPCHLinkedData/tpch.sql">TPCH schema</a>. We assume that you have successfully created an AsterixDB instance following the instructions at <a href="../install.html">Installing AsterixDB Using Managix</a>. <i>For constructing an example, we assume a single machine setup..</i></p>
+<p>Similar to a regular dataset, an external dataset has an associated datatype. We shall first create the datatype associated with each record in Lineitem data. Paste the following in the query textbox on the webpage at <a class="externalLink" href="http://127.0.0.1:19001">http://127.0.0.1:19001</a> and hit &#x2018;Execute&#x2019;.</p>
+
+<div class="source">
+<div class="source">
+<pre>    create dataverse ExternalFileDemo;
+    use dataverse ExternalFileDemo;
+
+    create type LineitemType as closed {
+      l_orderkey:int32,
+      l_partkey: int32,
+      l_suppkey: int32,
+      l_linenumber: int32,
+      l_quantity: double,
+      l_extendedprice: double,
+      l_discount: double,
+      l_tax: double,
+      l_returnflag: string,
+      l_linestatus: string,
+      l_shipdate: string,
+      l_commitdate: string,
+      l_receiptdate: string,
+      l_shipinstruct: string,
+      l_shipmode: string,
+      l_comment: string}
+</pre></div></div>
+<p>Here, we describe two scenarios.</p>
+<div class="section">
+<h4><a name="a1_Data_file_resides_on_the_local_file_system_of_a_host"></a>1) Data file resides on the local file system of a host</h4>
+<p>Prerequisite: The host is a part of the ASTERIX cluster.</p>
+<p>Earlier, we assumed a single machine ASTERIX setup. To satisfy the prerequisite, log-in to the machine running ASTERIX.</p>
+
+<ul>
+  
+<li>Download the <a href="../data/lineitem.tbl">data file</a> to an appropriate location. We denote this location by SOURCE_PATH.</li>
+</ul>
+<p>ASTERIX provides a built-in adapter for data residing on the local file system. The adapter is referred by its alias- &#x2018;localfs&#x2019;. We create an external dataset named Lineitem and use the &#x2018;localfs&#x2019; adapter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem(LineitemType)
+    using localfs
+</pre></div></div>
+<p>Above, the definition is not complete as we need to provide a set of parameters that are specific to the source file.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td> Parameter </td>
+  
+<td> Description </td>
+</tr>
+
+<tr class="b">
+  
+<td> path </td>
+  
+<td> A fully qualified path of the form <tt>host://&lt;absolute path&gt;</tt>. 
+  Use a comma separated list if there are multiple files. 
+  E.g. <tt>host1://&lt;absolute path&gt;</tt>, <tt>host2://&lt;absolute path&gt;</tt> and so forth. </td>
+</tr>
+
+<tr class="a">
+  
+<td> format </td>
+  
+<td> The format for the content. Use 'adm' for data in ADM (ASTERIX Data Model) or <a class="externalLink" href="http://www.json.org/">JSON</a> format. Use 'delimited-text' if fields are separated by a delimiting character (eg., CSV). </td></tr>
+
+<tr class="b">
+  
+<td>delimiter</td>
+  
+<td>The delimiting character in the source file if format is 'delimited text'</td>
+</tr>
+</table>
+<p>As we are using a single single machine ASTERIX instance, we use 127.0.0.1 as host in the path parameter. We <i>complete the create dataset statement</i> as follows.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse ExternalFileDemo;
+
+    create external dataset Lineitem(LineitemType)
+    using localfs
+    ((&quot;path&quot;=&quot;127.0.0.1://SOURCE_PATH&quot;),
+    (&quot;format&quot;=&quot;delimited-text&quot;),
+    (&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div>
+<p>Please substitute SOURCE_PATH with the absolute path to the source file on the local file system.</p></div>
+<div class="section">
+<h4><a name="Common_source_of_error"></a>Common source of error</h4>
+<p>An incorrect value for the path parameter will give the following exception message when the dataset is used in a query.</p>
+
+<div class="source">
+<div class="source">
+<pre>    org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.api.exceptions.HyracksDataException: Job failed.
+</pre></div></div>
+<p>Verify the correctness of the path parameter provided to the localfs adapter. Note that the path parameter must be an absolute path to the data file. For e.g. if you saved your file in your home directory (assume it to be /home/joe), then the path value should be</p>
+
+<div class="source">
+<div class="source">
+<pre>    127.0.0.1:///home/joe/lineitem.tbl.
+</pre></div></div>
+<p>In your web-browser, navigate to 127.0.0.1:19001 and paste the above to the query text box. Finally hit &#x2018;Execute&#x2019;.</p>
+<p>Next we move over to the the section <a href="#Writing_Queries_against_an_External_Dataset">Writing Queries against an External Dataset</a> and try a sample query against the external dataset.</p></div>
+<div class="section">
+<h4><a name="a2_Data_file_resides_on_an_HDFS_instance"></a>2) Data file resides on an HDFS instance</h4>
+<p>rerequisite: It is required that the Namenode and HDFS Datanodes are reachable from the hosts that form the AsterixDB cluster. AsterixDB provides a built-in adapter for data residing on HDFS. The HDFS adapter can be referred (in AQL) by its alias - &#x2018;hdfs&#x2019;. We can create an external dataset named Lineitem and associate the HDFS adapter with it as follows;</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem(LineitemType) 
+    using hdfs((&#x201c;hdfs&#x201d;:&#x201d;hdfs://localhost:54310&#x201d;),(&#x201c;path&#x201d;:&#x201d;/asterix/Lineitem.tbl&#x201d;),...,(&#x201c;input- format&#x201d;:&#x201d;rc-format&#x201d;));
+</pre></div></div>
+<p>The expected parameters are described below:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td> Parameter </td>
+  
+<td> Description </td>
+</tr>
+
+<tr class="b">
+  
+<td> hdfs </td>
+  
+<td> The HDFS URL </td>
+</tr>
+
+<tr class="a">
+  
+<td> path </td>
+  
+<td> The absolute path to the source HDFS file or directory. Use a comma separated list if there are multiple files or directories. </td></tr>
+
+<tr class="b">
+  
+<td> input-format </td>
+  
+<td> The associated input format. Use 'text-input-format' for text files , 'sequence-input-format' for hadoop sequence files, 'rc-input-format' for Hadoop Record Columnar files, or a fully qualified name of an implementation of org.apache.hadoop.mapred.InputFormat. </td>
+</tr>
+
+<tr class="a">
+  
+<td> format </td>
+  
+<td> The format of the input content. Use 'adm' for text data in ADM (ASTERIX Data Model) or <a class="externalLink" href="http://www.json.org/">JSON</a> format, 'delimited-text' for text delimited data that has fields separated by a delimiting character, 'binary' for other data.</td>
+</tr>
+
+<tr class="b">
+  
+<td> delimiter </td>
+  
+<td> The delimiting character in the source file if format is 'delimited text' </td>
+</tr>
+
+<tr class="a">
+  
+<td> parser </td>
+  
+<td> The parser used to parse HDFS records if the format is 'binary'. Use 'hive- parser' for data deserialized by a Hive Serde (AsterixDB can understand deserialized Hive objects) or a fully qualified class name of user- implemented parser that implements the interface org.apache.asterix.external.input.InputParser. </td>
+</tr>
+
+<tr class="b">
+  
+<td> hive-serde </td>
+  
+<td> The Hive serde is used to deserialize HDFS records if format is binary and the parser is hive-parser. Use a fully qualified name of a class implementation of org.apache.hadoop.hive.serde2.SerDe. </td>
+</tr>
+
+<tr class="a">
+  
+<td> local-socket-path </td>
+  
+<td> The UNIX domain socket path if local short-circuit reads are enabled in the HDFS instance</td>
+</tr>
+</table>
+<p><i>Difference between &#x2018;input-format&#x2019; and &#x2018;format&#x2019;</i></p>
+<p><i>input-format</i>: Files stored under HDFS have an associated storage format. For example, TextInputFormat represents plain text files. SequenceFileInputFormat indicates binary compressed files. RCFileInputFormat corresponds to records stored in a record columnar fashion. The parameter &#x2018;input-format&#x2019; is used to distinguish between these and other HDFS input formats.</p>
+<p><i>format</i>: The parameter &#x2018;format&#x2019; refers to the type of the data contained in the file. For example, data contained in a file could be in json or ADM format, could be in delimited-text with fields separated by a delimiting character or could be in binary format.</p>
+<p>As an example. consider the <a href="../data/lineitem.tbl">data file</a>. The file is a text file with each line representing a record. The fields in each record are separated by the &#x2018;|&#x2019; character.</p>
+<p>We assume the HDFS URL to be <a class="externalLink" href="hdfs://localhost:54310">hdfs://localhost:54310</a>. We further assume that the example data file is copied to HDFS at a path denoted by &#x201c;/asterix/Lineitem.tbl&#x201d;.</p>
+<p>The complete set of parameters for our example file are as follows. ((&#x201c;hdfs&#x201d;=&#x201c;hdfs://localhost:54310&#x201d;,(&#x201c;path&#x201d;=&#x201c;/asterix/Lineitem.tbl&#x201d;),(&#x201c;input-format&#x201d;=&#x201c;text- input-format&#x201d;),(&#x201c;format&#x201d;=&#x201c;delimited-text&#x201d;),(&#x201c;delimiter&#x201d;=&#x201c;|&#x201d;))</p></div>
+<div class="section">
+<h4><a name="Using_the_Hive_Parser"></a>Using the Hive Parser</h4>
+<p>if a user wants to create an external dataset that uses hive-parser to parse HDFS records, it is important that the datatype associated with the dataset matches the actual data in the Hive table for the correct initialization of the Hive SerDe. Here is the conversion from the supported Hive data types to AsterixDB data types:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td> Hive </td>
+  
+<td> AsterixDB </td>
+</tr>
+
+<tr class="b">
+  
+<td>BOOLEAN</td>
+  
+<td>Boolean</td>
+</tr>
+
+<tr class="a">
+  
+<td>BYTE(TINY INT)</td>
+  
+<td>Int8</td>
+</tr>
+
+<tr class="b">
+  
+<td>DOUBLE</td>
+  
+<td>Double</td>
+</tr>
+
+<tr class="a">
+  
+<td>FLOAT</td>
+  
+<td>Float</td>
+</tr>
+
+<tr class="b">
+  
+<td>INT</td>
+  
+<td>Int32</td>
+</tr>
+
+<tr class="a">
+  
+<td>LONG(BIG INT)</td>
+  
+<td>Int64</td>
+</tr>
+
+<tr class="b">
+  
+<td>SHORT(SMALL INT)</td>
+  
+<td>Int16</td>
+</tr>
+
+<tr class="a">
+  
+<td>STRING</td>
+  
+<td>String</td>
+</tr>
+
+<tr class="b">
+  
+<td>TIMESTAMP</td>
+  
+<td>Datetime</td>
+</tr>
+
+<tr class="a">
+  
+<td>DATE</td>
+  
+<td>Date</td>
+</tr>
+
+<tr class="b">
+  
+<td>STRUCT</td>
+  
+<td>Nested Record</td>
+</tr>
+
+<tr class="a">
+  
+<td>LIST</td>
+  
+<td>OrderedList or UnorderedList</td>
+</tr>
+</table></div>
+<div class="section">
+<h4><a name="Examples_of_dataset_definitions_for_external_datasets"></a>Examples of dataset definitions for external datasets</h4>
+<p><i>Example 1</i>: We can modify the create external dataset statement as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem('LineitemType)
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/Lineitem.tbl&quot;),(&quot;input-format&quot;=&quot;text- input-format&quot;),(&quot;format&quot;=&quot;delimited-text&quot;),(&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div>
+<p><i>Example 2</i>: Here, we create an external dataset of lineitem records stored in sequence files that has content in ADM format:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem('LineitemType) 
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/SequenceLineitem.tbl&quot;),(&quot;input- format&quot;=&quot;sequence-input-format&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div>
+<p><i>Example 3</i>: Here, we create an external dataset of lineitem records stored in record-columnar files that has content in binary format parsed using hive-parser with hive ColumnarSerde:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem('LineitemType)
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/RCLineitem.tbl&quot;),(&quot;input-format&quot;=&quot;rc-input-format&quot;),(&quot;format&quot;=&quot;binary&quot;),(&quot;parser&quot;=&quot;hive-parser&quot;),(&quot;hive- serde&quot;=&quot;org.apache.hadoop.hive.serde2.columnar.ColumnarSerde&quot;));
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Writing_Queries_against_an_External_Dataset_Back_to_TOC"></a><a name="WritingQueriesAgainstAnExternalDataset" id="WritingQueriesAgainstAnExternalDataset">Writing Queries against an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>You may write AQL queries against an external dataset in exactly the same way that queries are written against internal datasets. The following is an example of an AQL query that applies a filter and returns an ordered result.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse ExternalFileDemo;
+
+    for $c in dataset('Lineitem')
+    where $c.l_orderkey &lt;= 3
+    order by $c.l_orderkey, $c.l_linenumber
+    return $c
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Building_Indexes_over_External_Datasets_Back_to_TOC"></a><a name="BuildingIndexesOverExternalDatasets" id="BuildingIndexesOverExternalDatasets">Building Indexes over External Datasets</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports building B-Tree and R-Tree indexes over static data stored in the Hadoop Distributed File System. To create an index, first create an external dataset over the data as follows</p>
+
+<div class="source">
+<div class="source">
+<pre>    create external dataset Lineitem(LineitemType) 
+    using hdfs((&quot;hdfs&quot;=&quot;hdfs://localhost:54310&quot;),(&quot;path&quot;=&quot;/asterix/Lineitem.tbl&quot;),(&quot;input-format&quot;=&quot;text-input- format&quot;),(&quot;format&quot;=&quot;delimited-text&quot;),(&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div>
+<p>You can then create a B-Tree index on this dataset instance as if the dataset was internally stored as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    create index PartkeyIdx on Lineitem(l_partkey);
+</pre></div></div>
+<p>You could also create an R-Tree index as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#xfffc;create index IndexName on DatasetName(attribute-name) type rtree;
+</pre></div></div>
+<p>After building the indexes, the AsterixDB query compiler can use them to access the dataset and answer queries in a more cost effective manner. AsterixDB can read all HDFS input formats, but indexes over external datasets can currently be built only for HDFS datasets with &#x2018;text-input-format&#x2019;, &#x2018;sequence-input-format&#x2019; or &#x2018;rc-input-format&#x2019;.</p></div>
+<div class="section">
+<h2><a name="External_Data_Snapshots_Back_to_TOC"></a><a name="ExternalDataSnapshots" id="ExternalDataSnapshots">External Data Snapshots</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>An external data snapshot represents the status of a dataset&#x2019;s files in HDFS at a point in time. Upon creating the first index over an external dataset, AsterixDB captures and stores a snapshot of the dataset in HDFS. Only records present at the snapshot capture time are indexed, and any additional indexes created afterwards will only contain data that was present at the snapshot capture time thus preserving consistency across all indexes of a dataset. To update all indexes of an external dataset and advance the snapshot time to be the present time, a user can use the refresh external dataset command as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    refresh external dataset DatasetName;
+</pre></div></div>
+<p>After a refresh operation commits, all of the dataset&#x2019;s indexes will reflect the status of the data as of the new snapshot capture time.</p></div>
+<div class="section">
+<h2><a name="Frequently_Asked_Questions_Back_to_TOC"></a><a name="FAQ" id="FAQ">Frequently Asked Questions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Q. I added data to my dataset in HDFS, Will the dataset indexes in AsterixDB be updated automatically?</p>
+<p>A. No, you must use the refresh external dataset statement to make the indexes aware of any changes in the dataset files in HDFS.</p>
+<p>Q. Why doesn&#x2019;t AsterixDB update external indexes automatically?</p>
+<p>A. Since external data is managed by other users/systems with mechanisms that are system dependent, AsterixDB has no way of knowing exactly when data is added or deleted in HDFS, so the responsibility of refreshing indexes are left to the user. A user can use internal datasets for which AsterixDB manages the data and its indexes.</p>
+<p>Q. I created an index over an external dataset and then added some data to my HDFS dataset. Will a query that uses the index return different results from a query that doesn&#x2019;t use the index?</p>
+<p>A. No, queries&#x2019; results are access path independent and the stored snapshot is used to determines which data are going to be included when processing queries.</p>
+<p>Q. I created an index over an external dataset and then deleted some of my dataset&#x2019;s files in HDFS, Will indexed data access still return the records in deleted files?</p>
+<p>A. No. When AsterixDB accesses external data, with or without the use of indexes, it only access files present in the file system at runtime.</p>
+<p>Q. I submitted a refresh command on a an external dataset and a failure occurred, What has happened to my indexes?</p>
+<p>A. External Indexes Refreshes are treated as a single transaction. In case of a failure, a rollback occurs and indexes are restored to their previous state. An error message with the cause of failure is returned to the user.</p>
+<p>Q. I was trying to refresh an external dataset while some queries were accessing the data using index access method. Will the queries be affected by the refresh operation?</p>
+<p>A. Queries have access to external dataset indexes state at the time where the queries are submitted. A query that was submitted before a refresh commits will only access data under the snapshot taken before the refresh; queries that are submitted after the refresh commits will access data under the snapshot taken after the refresh.</p>
+<p>Q. What happens when I try to create an additional index while a refresh operation is in progress or vice versa?</p>
+<p>A. The create index operation will wait until the refresh commits or aborts and then the index will be built according to the external data snapshot at the end of the refresh operation. Creating indexes and refreshing datasets are mutually exclusive operations and will not be run in parallel. Multiple indexes can be created in parallel, but not multiple refresh operations.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/filters.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/filters.html b/content/docs/0.8.8-incubating/aql/filters.html
new file mode 100644
index 0000000..5f3185b
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/filters.html
@@ -0,0 +1,272 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Filter-Based LSM Index Acceleration</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Filter-Based LSM Index Acceleration</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Filter-Based LSM Index Acceleration</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Motivation">Motivation</a></li>
+  
+<li><a href="#FiltersInAsterixDB">Filters in AsterixDB</a></li>
+  
+<li><a href="#FiltersAndMergePolicies">Filters and Merge Policies</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_Back_to_TOC"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Traditional relational databases usually employ conventional index structures such as B+ trees due to their low read latency. However, such traditional index structures use in-place writes to perform updates, resulting in costly random writes to disk. Today&#x2019;s emerging applications often involve insert-intensive workloads for which the cost of random writes prohibits efficient ingestion of data. Consequently, popular NoSQL systems such as Cassandra, HBase, LevelDB, BigTable, etc. have adopted Log-Structured Merge (LSM) Trees as their storage structure. LSM-trees avoids the cost of random writes by batching updates into a component of the index that resides in main memory &#x2013; an <i>in-memory component</i>. When the space occupancy of the in-memory component exceeds a specified threshold, its entries are <i>flushed</i> to disk forming a new component &#x2013; a <i>disk component</i>. As disk components accumulate on disk, they are periodically merged together subject to 
 a <i>merge policy</i> that decides when and what to merge. The benefit of the LSM-trees comes at the cost of possibly sacrificing read efficiency, but, it has been shown in previous studies that these inefficiencies can be mostly mitigated.</p>
+<p>AsterixDB has also embraced LSM-trees, not just by using them as primary indexes, but also by using the same LSM-ification technique for all of its secondary index structures. In particular, AsterixDB adopted a generic framework for converting a class of indexes (that includes conventional B+ trees, R trees, and inverted indexes) into LSM-based secondary indexes, allowing higher data ingestion rates. In fact, for certain index structures, our results have shown that using an LSM-based version of an index can be made to significantly outperform its conventional counterpart for <i>both</i> ingestion and query speed (an example of such an index being the R-tree for spatial data).</p>
+<p>Since an LSM-based index naturally partitions data into multiple disk components, it is possible, when answering certain queries, to exploit partitioning to only access some components and safely filter out the remaining components, thus reducing query times. For instance, referring to our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, suppose a user always retrieves tweets from the <tt>TweetMessages</tt> dataset based on the <tt>send-time</tt> field (e.g., tweets posted in the last 24 hours). Since there is not a secondary index on the <tt>send-time</tt> field, the only available option for AsterixDB would be to scan the whole <tt>TweetMessages</tt> dataset and then apply the predicate as a post-processing step. However, if disk components of the primary index were tagged with the minimum and maximum timestamp values of the records they contain, we could utilize the tagged information to directly access the primary index and prune comp
 onents that do not match the query predicate. Thus, we could save substantial cost by avoiding scanning the whole dataset and only access the relevant components. We simply call such tagging information that are associated with components, filters. (Note that even if there were a secondary index on <tt>send-time</tt> field, using filters could save substantial cost by avoiding accessing the secondary index, followed by probing the primary index for every fetched entry.) Moreover, the same filtering technique can also be used with any secondary LSM index (e.g., an LSM R-tree), in case the query contains multiple predicates (e.g., spatial and temporal predicates), to obtain similar pruning power.</p></div>
+<div class="section">
+<h2><a name="Filters_in_AsterixDB_Back_to_TOC"></a><a name="FiltersInAsterixDB" id="FiltersInAsterixDB">Filters in AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We have added support for LSM-based filters to all of AsterixDB&#x2019;s index types. To enable the use of filters, the user must specify the filter&#x2019;s key when creating a dataset, as shown below:</p>
+<div class="section">
+<div class="section">
+<h4><a name="Creating_a_Dataset_with_a_Filter"></a>Creating a Dataset with a Filter</h4>
+
+<div class="source">
+<div class="source">
+<pre>    create dataset Tweets(TweetType) primary key tweetid with filter on send-time;
+</pre></div></div>
+<p>Filters can be created on any totally ordered datatype (i.e., any field that can be indexed using a B+ -tree), such as integers, doubles, floats, UUIDs, datetimes, etc.</p>
+<p>When a dataset with a filter is created, the name of the filter&#x2019;s key field is persisted in the <tt>Metadata.Dataset</tt> dataset (which is the metadata dataset that stores the details of each dataset in an AsterixDB instance) so that DML operations against the dataset can recognize the existence of filters and can update them or utilize them accordingly. Creating a dataset with a filter in AsterixDB implies that the primary and all secondary indexes of that dataset will maintain filters on their disk components. Once a filtered dataset is created, the user can use the dataset normally (just like any other dataset). AsterixDB will automatically maintain the filters and will leverage them to efficiently answer queries whenever possible (i.e., when a query has predicates on the filter&#x2019;s key).</p></div></div></div>
+<div class="section">
+<h2><a name="Filters_and_Merge_Policies_Back_to_TOC"></a><a name="FiltersAndMergePolicies" id="FiltersAndMergePolicies">Filters and Merge Policies</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The AsterixDB default merge policy, the prefix merge policy, relies on component sizes and the number of components to decide which components to merge. This merge policy has proven to provide excellent performance for both ingestion and queries. However, when evaluating our filtering solution with the prefix policy, we observed a behavior that can reduce filter effectiveness. In particular, we noticed that under the prefix merge policy, the disk components of a secondary index tend to be constantly merged into a single component. This is because the prefix policy relies on a single size parameter for all of the indexes of a dataset. This parameter is typically chosen based on the sizes of the disk components of the primary index, which tend to be much larger than the sizes of the secondary indexes&#x2019; disk components. This difference caused the prefix merge policy to behave similarly to the constant merge policy (i.e., relatively poorly) when applied to secondary indexes in 
 the sense that the secondary indexes are constantly merged into a single disk component. Consequently, the effectiveness of filters on secondary indexes was greatly reduced under the prefix-merge policy, but they were still effective when probing the primary index. Based on this behavior, we developed a new merge policy, an improved version of the prefix policy, called the correlated-prefix policy. The basic idea of this policy is that it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests to the I/O scheduler on behalf of all other indexes associated with the same dataset. The end result is that secondary indexes will always have the same number of disk components as their primary index under the correlated-prefix merge policy. This has improved query perfor
 mance, since disk components of secondary indexes now have a much better chance of being pruned.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>



[22/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css b/content/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css
new file mode 100644
index 0000000..7db4133
--- /dev/null
+++ b/content/docs/0.8.8-incubating/css/apache-maven-fluido-1.3.0.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap v2.1.0
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:con
 tent-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0
  1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offs
 et1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.9
 14893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{mar
 gin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25
 .53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:20px;font-weight:200;line-height:30px}small{font-size:8
 5%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal dt{float:left;width:120px;overflow:hidden;
 clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:130px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px
 ;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-we
 ight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea{width:210px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"]
 ,.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-
 box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #bbb}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)
 ;box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*
 ="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.unedit
 able-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .h
 elp-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning .checkbox:focus,.control-group.warning .radio:focus,.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error 
 .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error .checkbox:focus,.control-group.error .radio:focus,.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control
 -group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success .checkbox:focus,.control-group.success .radio:focus,.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}input:focus:required:invalid,textarea:focus:required:invalid,selec
 t:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:1
 4px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{margin-left:-1px;vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 
 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;pad
 ding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.for
 m-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inli
 ne .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:160px}.form-horizontal .help-block{margin-top:10px;margin-bottom:0}.form-horizontal .form-actions{padding-left:160px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-alig
 n:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child
  td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-b
 ordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-right-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-s
 triped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}table .span1{float:none;width:44px;margin-left:0}table .span2{float:none;width:124px;margin-left:0}table .span3{float:none;width:204px;margin-left:0}table .span4{float:none;width:284px;margin-left:0}table .span5{float:none;width:364px;margin-left:0}table .span6{float:none;width:444px;margin-left:0}table .span7{float:none;width:524px;margin-left:0}table .span8{float:none;width:604px;margin-left:0}table .span9{float:none;width:684px;margin-left:0}table .span10{float:none;width:764px;margin-left:0}table .span11{float:none;width:844px;margin-left:0}table .span12{float:none;width:924px;margin-left:0}table .span13{float:none;width:1004px;margin-left:0}table .span14{float:none;width:1084px;margin-left:0}table .span15{float:none;width:1164px;margin-left:
 0}table .span16{float:none;width:1244px;margin-left:0}table .span17{float:none;width:1324px;margin-left:0}table .span18{float:none;width:1404px;margin-left:0}table .span19{float:none;width:1484px;margin-left:0}table .span20{float:none;width:1564px;margin-left:0}table .span21{float:none;width:1644px;margin-left:0}table .span22{float:none;width:1724px;margin-left:0}table .span23{float:none;width:1804px;margin-left:0}table .span24{float:none;width:1884px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.info td{background-color:#d9edf7}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav>.active>a>[class^="icon-"],.nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[clas
 s^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{back
 ground-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.ic
 on-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72p
 x}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px
 }.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{backgrou
 nd-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-
 certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.car
 et{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:blo
 ck;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100
 %,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:"\2191"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.d
 ropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-rad
 ius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;overflow:visible \9;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 14px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);
 vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-
 shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2p
 x rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:2px}.btn-small{padding:3px 9px;font-size:12px;line-height:18px}.btn-small [class^="icon-"]{margin-top:0}.btn-mini{padding:2px 6px;font-size:11px;line-height:16px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1p
 x 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-image:-moz-linear-gradient(top,#08c,#04c);background-repeat:repeat-x;border-color:#04c #0044cc #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89
 406;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-webki
 t-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-webkit-gradient(linear,0 0,0 100%,from
 (#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));backgr
 ound-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);backgr
 ound-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-image:-moz-linear-gradient(top,#444,#222);background-repeat:repeat-x;border-color:#222 #222222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{
 *padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-group{position:relative;*margin-left:.3em;font-size:0;white-space:nowrap}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group
 >.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;b
 order-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn
 -large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5p
 x;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-bo
 rder-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;t
 ext-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-
 bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eeeeee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radi
 us:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#f
 ff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a
 {-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #dddddd #eee #eeeeee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-
 border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eeeeee #eee #dddddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#555}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radiu
 s:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#555;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#555}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:6px}.navbar .btn-group .btn{margin:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .rad
 io,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;width:100%;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fix
 ed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner,.navbar-static-top .navbar-inner{border:0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;displ
 ay:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#555;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);back
 ground-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-co
 lor:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6
 px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:
 auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .act
 ive>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shado
 w:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-
 webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-image:-moz-linear-gradient(top,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;borde
 r-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{height:40px;margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination li{display:inline}.pagination a,.pagination span{float:left;padding:0 14px;line-height:38px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination a:hover,.pagination .active a,.pagination .active span{background-color:#f5f5f5}.pagination .active a,.pagination .active span{color:#999;cursor:default}.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999;cursor:default;background-color:transparent}.paginatio
 n li:first-child a,.pagination li:first-child span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination li:last-child a,.pagination li:last-child span{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover{color:#999;cursor:default;background-color:#fff}.modal-open .dropdown-menu{z-index:2050}.modal-open .dropdow
 n.open{*z-index:2050}.modal-open .popover{z-index:2060}.modal-open .tooltip{z-index:2080}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3
 s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{m
 argin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);
 -webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-bottom:10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-le
 ft:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:bo
 th}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.label,.badge{font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.lab
 el{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from
 {background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff
 f5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border
 -box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparen
 t 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5
 f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-l
 inear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(star
 t

<TRUNCATED>


[27/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/js-sdk.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/js-sdk.html b/content/docs/0.8.8-incubating/aql/js-sdk.html
new file mode 100644
index 0000000..61c58e3
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/js-sdk.html
@@ -0,0 +1,958 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Javascript SDK</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AsterixDB Javascript SDK</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB Javascript SDK</h1>
+<div class="section">
+<h2><a name="Obtaining_and_Including"></a>Obtaining and Including</h2>
+<p><a class="externalLink" href="http://asterixdb.ics.uci.edu/download/bindings/asterix-sdk-stable.js">Download</a> the javascript SDK and include it like any other javascript library by adding the following line in the appropriate HTML file:</p>
+
+<div class="source">
+<div class="source">
+<pre>&lt;script src=&quot;path/to/asterix-sdk-stable.js&quot;&gt;&lt;/script&gt;
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Interactive_Demos"></a>Interactive Demos</h2>
+<p>There are two interactive demos that are available for download. Both of the demos illustrate how the javascript API would be used in an application:</p>
+
+<ul>
+  
+<li><a class="externalLink" href="http://asterixdb.ics.uci.edu/download/demos/tweetbook-demo.zip">Tweetbook Demo</a>: a contrived geo-spatial  application dealing with artificial Tweets allowing spatial, temporal, and  keyword-based filtering.</li>
+  
+<li><a class="externalLink" href="http://asterixdb.ics.uci.edu/download/demos/admaql101-demo.zip">ADM/AQL 101 Demo</a>: an interactive version of  all of the examples that are provided in the following section.</li>
+</ul></div>
+<div class="section">
+<h2><a name="The_javascript_SDK:_by_example"></a>The javascript SDK: by example</h2>
+<p>In this section, we explore how to form AQL queries using the javascript SDK. The queries from <a href="primer.html">AsterixDB 101: An ADM and AQL Primer</a> are used as examples here. For each AQL statement, the equivalent javascript expression is shown below it, followed by the results of executing the query.</p>
+<div class="section">
+<h3><a name="Query_0-A_-_Exact-Match_Lookup"></a>Query 0-A - Exact-Match Lookup</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.id = 8
+return $user;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression0a = new FLWOGRExpression()
+    .ForClause(&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause(new AExpression(&quot;$user.id = 8&quot;))
+    .ReturnClause(&quot;$user&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 8 } , &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: { datetime: 1199182200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: { date: 1267315200000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_0-B_-_Range_Scan"></a>Query 0-B - Range Scan</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.id &gt;= 2 and $user.id &lt;= 4
+return $user;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression0b = new FLWOGRExpression()
+    .ForClause(&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause().and(new AExpression(&quot;$user.id &gt;= 2&quot;), new AExpression(&quot;$user.id &lt;= 4&quot;))
+    .ReturnClause(&quot;$user&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 2 } , &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: { datetime: 1295691000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 4 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: { date: 1272326400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: { datetime: 1341915000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 8 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: { date: 1276732800000}, &quot;end-date&quot;: { date: 1264464000000} } ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: { datetime: 1293444600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: { date: 1275955200000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_1_-_Other_Query_Filters"></a>Query 1 - Other Query Filters</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.user-since &gt;= datetime('2010-07-22T00:00:00')
+and $user.user-since &lt;= datetime('2012-07-29T23:59:59')
+return $user;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression1 = new FLWOGRExpression()
+    .ForClause(&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause().and(
+       new AExpression(&quot;$user.user-since &gt;= datetime('2010-07-22T00:00:00')&quot;),
+       new AExpression(&quot;$user.user-since &lt;= datetime('2012-07-29T23:59:59')&quot;)
+    ).ReturnClause(&quot;$user&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 2 } , &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: { datetime: 1295691000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 4 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: { date: 1272326400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 10 } , &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: { datetime: 1287223800000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: { date: 1181001600000}, &quot;end-date&quot;: { date: 1320451200000} } ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: { datetime: 1341915000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 8 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: { date: 1276732800000}, &quot;end-date&quot;: { date: 1264464000000} } ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: { datetime: 1293444600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: { date: 1275955200000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_2-A_-_Equijoin"></a>Query 2-A - Equijoin</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+for $message in dataset FacebookMessages
+where $message.author-id = $user.id
+return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression2a = new FLWOGRExpression()
+    .ForClause (&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ForClause (&quot;$message&quot;, new AExpression(&quot;dataset FacebookMessages&quot;))
+    .WhereClause(new AExpression(&quot;$message.author-id = $user.id&quot;))
+    .ReturnClause({
+       &quot;uname&quot; : &quot;$user.name&quot;,
+       &quot;message&quot; : &quot;$message.message&quot;
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+{ &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+{ &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_2-B_-_Index_join"></a>Query 2-B - Index join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+for $message in dataset FacebookMessages
+where $message.author-id /*+ indexnl */  = $user.id
+return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression2b = new FLWOGRExpression()
+    .ForClause (&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ForClause (&quot;$message&quot;, new AExpression(&quot;dataset FacebookMessages&quot;))
+    .WhereClause(new AExpression(&quot;$message.author-id /*+ indexnl */  = $user.id&quot;))
+    .ReturnClause({
+       &quot;uname&quot; : &quot;$user.name&quot;,
+       &quot;message&quot; : &quot;$message.message&quot;
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+{ &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+{ &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_3_-_Nested_Outer_Join"></a>Query 3 - Nested Outer Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+return {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: for $message in dataset FacebookMessages
+                where $message.author-id = $user.id
+                return $message.message
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression3messages = new FLWOGRExpression()
+    .ForClause(&quot;$message&quot;, new AExpression(&quot;dataset FacebookMessages&quot;))
+    .WhereClause(new AExpression(&quot;$message.author-id = $user.id&quot;))
+    .ReturnClause(&quot;$message.message&quot;);
+
+var expression3 = new FLWOGRExpression()
+    .ForClause (&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ReturnClause({
+        &quot;uname&quot;: &quot;$user.name&quot;,
+        &quot;messages&quot; : expression3messages
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;messages&quot;: { orderedlist: [&quot; dislike iphone its touch-screen is horrible&quot;, &quot; like verizon the 3G is awesome:)&quot;, &quot; can't stand motorola the touch-screen is terrible&quot;, &quot; can't stand at&amp;t the network is horrible:(&quot;, &quot; can't stand at&amp;t its plan is terrible&quot; ]} }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;messages&quot;: { orderedlist: [&quot; like samsung the plan is amazing&quot;, &quot; like t-mobile its platform is mind-blowing&quot; ]} }
+{ &quot;uname&quot;: &quot;NilaMilliron&quot;, &quot;messages&quot;: { orderedlist: [ ]} }
+{ &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;messages&quot;: { orderedlist: [&quot; love at&amp;t its 3G is good:)&quot; ]} }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;messages&quot;: { orderedlist: [&quot; dislike iphone the voice-command is bad:(&quot;, &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; ]} }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;messages&quot;: { orderedlist: [&quot; love sprint its shortcut-menu is awesome:)&quot;, &quot; love verizon its wireless is good&quot; ]} }
+{ &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;messages&quot;: { orderedlist: [&quot; love sprint the customization is mind-blowing&quot; ]} }
+{ &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;messages&quot;: { orderedlist: [&quot; like iphone the voicemail-service is awesome&quot; ]} }
+{ &quot;uname&quot;: &quot;NicholasStroh&quot;, &quot;messages&quot;: { orderedlist: [ ]} }
+{ &quot;uname&quot;: &quot;VonKemble&quot;, &quot;messages&quot;: { orderedlist: [&quot; dislike sprint the speed is horrible&quot; ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_4_-_Theta_Join"></a>Query 4 - Theta Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+return {
+    &quot;message&quot;: $t.message-text,
+    &quot;nearby-messages&quot;: for $t2 in dataset TweetMessages
+                       where spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1
+                       return { &quot;msgtxt&quot;:$t2.message-text}
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression4messages = new FLWOGRExpression()
+    .ForClause( &quot;$t2&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .WhereClause( new AExpression(&quot;spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1&quot;))
+    .ReturnClause({ &quot;msgtxt&quot; : &quot;$t2.message-text&quot; });
+
+var expression4 = new FLWOGRExpression()
+    .ForClause( &quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .ReturnClause({
+        &quot;message&quot; : &quot;$t.message-text&quot;,
+        &quot;nearby-messages&quot; : expression4messages
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;message&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like iphone the voice-clarity is good:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like iphone the voice-clarity is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like samsung the platform is good&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like samsung the platform is good&quot; } ]} }
+{ &quot;message&quot;: &quot; love t-mobile its customization is good:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; love t-mobile its customization is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like samsung the voice-command is amazing:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like samsung the voice-command is amazing:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like motorola the speed is good:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; love verizon its voicemail-service is awesome&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; love verizon its voicemail-service is awesome&quot; } ]} }
+{ &quot;message&quot;: &quot; can't stand motorola its speed is terrible:(&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; can't stand motorola its speed is terrible:(&quot; } ]} }
+{ &quot;message&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; } ]} }
+{ &quot;message&quot;: &quot; can't stand iphone its platform is terrible&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; can't stand iphone its platform is terrible&quot; } ]} }
+{ &quot;message&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_5_-_Fuzzy_Join"></a>Query 5 - Fuzzy Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+<p>use dataverse TinySocial;</p>
+
+<div class="source">
+<div class="source">
+<pre>set simfunction &quot;edit-distance&quot;;
+set simthreshold &quot;3&quot;;
+
+for $fbu in dataset FacebookUsers
+return {
+    &quot;id&quot;: $fbu.id,
+    &quot;name&quot;: $fbu.name,
+    &quot;similar-users&quot;: for $t in dataset TweetMessages
+                     let $tu := $t.user
+                     where $tu.name ~= $fbu.name
+                    return {
+                        &quot;twitter-screenname&quot;: $tu.screen-name,
+                        &quot;twitter-name&quot;: $tu.name
+                    }
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var similarUsersExpression = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .LetClause (&quot;$tu&quot;, new AExpression(&quot;$t.user&quot;))
+    .WhereClause(new AExpression(&quot;$tu.name ~= $fbu.name&quot;))
+    .ReturnClause({
+        &quot;twitter-screenname&quot;: &quot;$tu.screen-name&quot;,
+        &quot;twitter-name&quot;: &quot;$tu.name&quot;
+    });
+
+var expression5 = new FLWOGRExpression()
+    .ForClause (&quot;$fbu&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ReturnClause(
+        {
+            &quot;id&quot; : &quot;$fbu.id&quot;,
+            &quot;name&quot; : &quot;$fbu.name&quot;,
+            &quot;similar-users&quot; : similarUsersExpression
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 1 } , &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 2 } , &quot;name&quot;: &quot;IsbelDull&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 8 } , &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;similar-users&quot;: { orderedlist: [{ &quot;twitter-screenname&quot;: &quot;NilaMilliron_tw&quot;, &quot;twitter-name&quot;: &quot;Nila Milliron&quot; } ]} }
+{ &quot;id&quot;: { int32: 9 } , &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 10 } , &quot;name&quot;: &quot;BramHatch&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 6 } , &quot;name&quot;: &quot;WillisWynne&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 7 } , &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 5 } , &quot;name&quot;: &quot;VonKemble&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_6_-_Existential_Quantification"></a>Query 6 - Existential Quantification</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $fbu in dataset FacebookUsers
+where (some $e in $fbu.employment satisfies is-null($e.end-date))
+return $fbu;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression6 = new FLWOGRExpression()
+    .ForClause (&quot;$fbu&quot;, new AQLClause().set(&quot;dataset FacebookUsers&quot;))
+    .WhereClause(
+        new QuantifiedExpression (
+            &quot;some&quot; ,
+            {&quot;$e&quot; : new AExpression(&quot;$fbu.employment&quot;) },
+            new FunctionExpression(&quot;is-null&quot;, new AExpression(&quot;$e.end-date&quot;))
+        )
+    )
+    .ReturnClause(&quot;$fbu&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 1 } , &quot;alias&quot;: &quot;Margarita&quot;, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;user-since&quot;: { datetime: 1345457400000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } , { int32: 3 } , { int32: 6 } , { int32: 10 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Codetechno&quot;, &quot;start-date&quot;: { date: 1154822400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 2 } , &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: { datetime: 1295691000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 4 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: { date: 1272326400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 8 } , &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: { datetime: 1199182200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: { date: 1267315200000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 6 } , &quot;alias&quot;: &quot;Willis&quot;, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;user-since&quot;: { datetime: 1105956600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 3 } , { int32: 7 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;jaydax&quot;, &quot;start-date&quot;: { date: 1242345600000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 7 } , &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: { datetime: 1344334200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 6 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: { date: 1303171200000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: { datetime: 1293444600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: { date: 1275955200000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 5 } , &quot;alias&quot;: &quot;Von&quot;, &quot;name&quot;: &quot;VonKemble&quot;, &quot;user-since&quot;: { datetime: 1262686200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } , { int32: 6 } , { int32: 10 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Kongreen&quot;, &quot;start-date&quot;: { date: 1290816000000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_7_-_Universal_Quantification"></a>Query 7 - Universal Quantification</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $fbu in dataset FacebookUsers
+where (every $e in $fbu.employment satisfies not(is-null($e.end-date)))
+return $fbu;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression7 = new FLWOGRExpression()
+    .ForClause(&quot;$fbu&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause(
+        new QuantifiedExpression (
+            &quot;every&quot; ,
+            {&quot;$e&quot; : new AExpression(&quot;$fbu.employment&quot;) },
+            new FunctionExpression(&quot;not&quot;, new FunctionExpression(&quot;is-null&quot;, new AExpression(&quot;$e.end-date&quot;)))
+        )
+    )
+    .ReturnClause(&quot;$fbu&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 9 } , &quot;alias&quot;: &quot;Woodrow&quot;, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;user-since&quot;: { datetime: 1127211000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } , { int32: 10 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zuncan&quot;, &quot;start-date&quot;: { date: 1050969600000}, &quot;end-date&quot;: { date: 1260662400000} } ]} }
+{ &quot;id&quot;: { int32: 10 } , &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: { datetime: 1287223800000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: { date: 1181001600000}, &quot;end-date&quot;: { date: 1320451200000} } ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: { datetime: 1341915000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 8 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: { date: 1276732800000}, &quot;end-date&quot;: { date: 1264464000000} } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_8_-_Simple_Aggregation"></a>Query 8 - Simple Aggregation</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+count(for $fbu in dataset FacebookUsers return $fbu);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression8 = new FunctionExpression(
+    &quot;count&quot;,
+    new FLWOGRExpression()
+        .ForClause(&quot;$fbu&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+        .ReturnClause(&quot;$fbu&quot;)
+);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ int64: 10 }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_9-A_-_Grouping_and_Aggregation"></a>Query 9-A - Grouping and Aggregation</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+group by $uid := $t.user.screen-name with $t
+return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression9a = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .GroupClause(&quot;$uid&quot;, new AExpression(&quot;$t.user.screen-name&quot;), &quot;with&quot;, &quot;$t&quot;)
+    .ReturnClause(
+        {
+            &quot;user&quot; : &quot;$uid&quot;,
+            &quot;count&quot; : new FunctionExpression(&quot;count&quot;, new AExpression(&quot;$t&quot;))
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: { int64: 3 } }
+{ &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: { int64: 6 } }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_9-B_-_Hash-Based_Grouping_and_Aggregation"></a>Query 9-B - (Hash-Based) Grouping and Aggregation</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+/*+ hash*/
+group by $uid := $t.user.screen-name with $t
+return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression9b = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .AQLClause(&quot;/*+ hash*/&quot;)
+    .GroupClause(&quot;$uid&quot;, new AExpression(&quot;$t.user.screen-name&quot;), &quot;with&quot;, &quot;$t&quot;)
+    .ReturnClause(
+        {
+            &quot;user&quot; : &quot;$uid&quot;,
+            &quot;count&quot; : new FunctionExpression(&quot;count&quot;, new AExpression(&quot;$t&quot;))
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: { int64: 3 } }
+{ &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: { int64: 6 } }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_10_-_Grouping_and_Limits"></a>Query 10 - Grouping and Limits</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+group by $uid := $t.user.screen-name with $t
+let $c := count($t)
+order by $c desc
+limit 3
+return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: $c
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression10 = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .GroupClause(&quot;$uid&quot;, new AExpression(&quot;$t.user.screen-name&quot;), &quot;with&quot;, &quot;$t&quot;)
+    .LetClause(&quot;$c&quot;, new FunctionExpression(&quot;count&quot;, new AExpression(&quot;$t&quot;)))
+    .OrderbyClause( new AExpression(&quot;$c&quot;), &quot;desc&quot; )
+    .LimitClause(new AExpression(&quot;3&quot;))
+    .ReturnClause(
+        {
+            &quot;user&quot; : &quot;$uid&quot;,
+            &quot;count&quot; : &quot;$c&quot;
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: { int64: 6 } }
+{ &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: { int64: 3 } }
+{ &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: { int64: 1 } }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_11_-_Left_Outer_Fuzzy_Join"></a>Query 11 - Left Outer Fuzzy Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+set simfunction &quot;jaccard&quot;;
+set simthreshold &quot;0.3&quot;;
+
+for $t in dataset TweetMessages
+return {
+    &quot;tweet&quot;: $t,
+    &quot;similar-tweets&quot;: for $t2 in dataset TweetMessages
+    where  $t2.referred-topics ~= $t.referred-topics
+    and $t2.tweetid != $t.tweetid
+    return $t2.referred-topics
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression11 = new FLWOGRExpression()
+    .ForClause( &quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .ReturnClause({
+        &quot;tweet&quot;         : new AExpression(&quot;$t&quot;),
+        &quot;similar-tweets&quot;: new FLWOGRExpression()
+                            .ForClause( &quot;$t2&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+                            .WhereClause().and(
+                                new AExpression(&quot;$t2.referred-topics ~= $t.referred-topics&quot;),
+                                new AExpression(&quot;$t2.tweetid != $t.tweetid&quot;)
+                             )
+                            .ReturnClause(&quot;$t2.referred-topics&quot;)
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;10&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 121 } , &quot;statuses_count&quot;: { int32: 362 } , &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: { int32: 17159 } }, &quot;sender-location&quot;: { point: [29.15, 76.53]}, &quot;send-time&quot;: { datetime: 1201342200000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, &quot;message-text&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;iphone&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;voicemail-service&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;6&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 121 } , &quot;statuses_count&quot;: { int32: 362 } , &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: { int32: 17159 } }, &quot;sender-location&quot;: { point: [47.51, 83.99]}, &quot;send-time&quot;: { datetime: 1273227000000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;iphone&quot;, &quot;voice-clarity&quot; ]}, &quot;message-text&quot;: &quot; like iphone the voice-clarity is good:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;iphone&quot;, &quot;platform&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 182 } , &quot;statuses_count&quot;: { int32: 394 } , &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: { int32: 32136 } }, &quot;sender-location&quot;: { point: [36.21, 72.6]}, &quot;send-time&quot;: { datetime: 1314267000000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;samsung&quot;, &quot;platform&quot; ]}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;iphone&quot;, &quot;platform&quot; ]}, { unorderedlist: [&quot;samsung&quot;, &quot;voice-command&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;1&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [47.44, 80.65]}, &quot;send-time&quot;: { datetime: 1209204600000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;t-mobile&quot;, &quot;customization&quot; ]}, &quot;message-text&quot;: &quot; love t-mobile its customization is good:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;t-mobile&quot;, &quot;shortcut-menu&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;12&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;OliJackson_512&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 445 } , &quot;statuses_count&quot;: { int32: 164 } , &quot;name&quot;: &quot;Oli Jackson&quot;, &quot;followers_count&quot;: { int32: 22649 } }, &quot;sender-location&quot;: { point: [24.82, 94.63]}, &quot;send-time&quot;: { datetime: 1266055800000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;samsung&quot;, &quot;voice-command&quot; ]}, &quot;message-text&quot;: &quot; like samsung the voice-command is amazing:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;samsung&quot;, &quot;platform&quot; ]}, { unorderedlist: [&quot;sprint&quot;, &quot;voice-command&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;3&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [29.72, 75.8]}, &quot;send-time&quot;: { datetime: 1162635000000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]}, &quot;message-text&quot;: &quot; like motorola the speed is good:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [36.86, 74.62]}, &quot;send-time&quot;: { datetime: 1342865400000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;verizon&quot;, &quot;voicemail-service&quot; ]}, &quot;message-text&quot;: &quot; love verizon its voicemail-service is awesome&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;5&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [40.09, 92.69]}, &quot;send-time&quot;: { datetime: 1154686200000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]}, &quot;message-text&quot;: &quot; can't stand motorola its speed is terrible:(&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;8&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [46.05, 93.34]}, &quot;send-time&quot;: { datetime: 1129284600000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;t-mobile&quot;, &quot;shortcut-menu&quot; ]}, &quot;message-text&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]}, { unorderedlist: [&quot;t-mobile&quot;, &quot;customization&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;11&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NilaMilliron_tw&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 445 } , &quot;statuses_count&quot;: { int32: 164 } , &quot;name&quot;: &quot;Nila Milliron&quot;, &quot;followers_count&quot;: { int32: 22649 } }, &quot;sender-location&quot;: { point: [37.59, 68.42]}, &quot;send-time&quot;: { datetime: 1205057400000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;iphone&quot;, &quot;platform&quot; ]}, &quot;message-text&quot;: &quot; can't stand iphone its platform is terrible&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;iphone&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;samsung&quot;, &quot;platform&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;2&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 121 } , &quot;statuses_count&quot;: { int32: 362 } , &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: { int32: 17159 } }, &quot;sender-location&quot;: { point: [32.84, 67.14]}, &quot;send-time&quot;: { datetime: 1273745400000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]}, &quot;message-text&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;t-mobile&quot;, &quot;shortcut-menu&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;voicemail-service&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [39.28, 70.48]}, &quot;send-time&quot;: { datetime: 1324894200000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;sprint&quot;, &quot;voice-command&quot; ]}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;samsung&quot;, &quot;voice-command&quot; ]} ]} }
+</pre></div></div></div></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[05/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/data/lineitem.tbl
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/data/lineitem.tbl b/docs/0.8.8-incubating/data/lineitem.tbl
new file mode 100644
index 0000000..58d47c6
--- /dev/null
+++ b/docs/0.8.8-incubating/data/lineitem.tbl
@@ -0,0 +1,6005 @@
+1|156|4|1|17|17954.55|0.04|0.02|N|O|1996-03-13|1996-02-12|1996-03-22|DELIVER IN PERSON|TRUCK|egular courts above the|
+1|68|9|2|36|34850.16|0.09|0.06|N|O|1996-04-12|1996-02-28|1996-04-20|TAKE BACK RETURN|MAIL|ly final dependencies: slyly bold |
+1|64|5|3|8|7712.48|0.10|0.02|N|O|1996-01-29|1996-03-05|1996-01-31|TAKE BACK RETURN|REG AIR|riously. regular, express dep|
+1|3|6|4|28|25284.00|0.09|0.06|N|O|1996-04-21|1996-03-30|1996-05-16|NONE|AIR|lites. fluffily even de|
+1|25|8|5|24|22200.48|0.10|0.04|N|O|1996-03-30|1996-03-14|1996-04-01|NONE|FOB| pending foxes. slyly re|
+1|16|3|6|32|29312.32|0.07|0.02|N|O|1996-01-30|1996-02-07|1996-02-03|DELIVER IN PERSON|MAIL|arefully slyly ex|
+2|107|2|1|38|38269.80|0.00|0.05|N|O|1997-01-28|1997-01-14|1997-02-02|TAKE BACK RETURN|RAIL|ven requests. deposits breach a|
+3|5|2|1|45|40725.00|0.06|0.00|R|F|1994-02-02|1994-01-04|1994-02-23|NONE|AIR|ongside of the furiously brave acco|
+3|20|10|2|49|45080.98|0.10|0.00|R|F|1993-11-09|1993-12-20|1993-11-24|TAKE BACK RETURN|RAIL| unusual accounts. eve|
+3|129|8|3|27|27786.24|0.06|0.07|A|F|1994-01-16|1993-11-22|1994-01-23|DELIVER IN PERSON|SHIP|nal foxes wake. |
+3|30|5|4|2|1860.06|0.01|0.06|A|F|1993-12-04|1994-01-07|1994-01-01|NONE|TRUCK|y. fluffily pending d|
+3|184|5|5|28|30357.04|0.04|0.00|R|F|1993-12-14|1994-01-10|1994-01-01|TAKE BACK RETURN|FOB|ages nag slyly pending|
+3|63|8|6|26|25039.56|0.10|0.02|A|F|1993-10-29|1993-12-18|1993-11-04|TAKE BACK RETURN|RAIL|ges sleep after the caref|
+4|89|10|1|30|29672.40|0.03|0.08|N|O|1996-01-10|1995-12-14|1996-01-18|DELIVER IN PERSON|REG AIR|- quickly regular packages sleep. idly|
+5|109|10|1|15|15136.50|0.02|0.04|R|F|1994-10-31|1994-08-31|1994-11-20|NONE|AIR|ts wake furiously |
+5|124|5|2|26|26627.12|0.07|0.08|R|F|1994-10-16|1994-09-25|1994-10-19|NONE|FOB|sts use slyly quickly special instruc|
+5|38|4|3|50|46901.50|0.08|0.03|A|F|1994-08-08|1994-10-13|1994-08-26|DELIVER IN PERSON|AIR|eodolites. fluffily unusual|
+6|140|6|1|37|38485.18|0.08|0.03|A|F|1992-04-27|1992-05-15|1992-05-02|TAKE BACK RETURN|TRUCK|p furiously special foxes|
+7|183|4|1|12|12998.16|0.07|0.03|N|O|1996-05-07|1996-03-13|1996-06-03|TAKE BACK RETURN|FOB|ss pinto beans wake against th|
+7|146|3|2|9|9415.26|0.08|0.08|N|O|1996-02-01|1996-03-02|1996-02-19|TAKE BACK RETURN|SHIP|es. instructions|
+7|95|8|3|46|45774.14|0.10|0.07|N|O|1996-01-15|1996-03-27|1996-02-03|COLLECT COD|MAIL| unusual reques|
+7|164|5|4|28|29796.48|0.03|0.04|N|O|1996-03-21|1996-04-08|1996-04-20|NONE|FOB|. slyly special requests haggl|
+7|152|4|5|38|39981.70|0.08|0.01|N|O|1996-02-11|1996-02-24|1996-02-18|DELIVER IN PERSON|TRUCK|ns haggle carefully ironic deposits. bl|
+7|80|10|6|35|34302.80|0.06|0.03|N|O|1996-01-16|1996-02-23|1996-01-22|TAKE BACK RETURN|FOB|jole. excuses wake carefully alongside of |
+7|158|3|7|5|5290.75|0.04|0.02|N|O|1996-02-10|1996-03-26|1996-02-13|NONE|FOB|ithely regula|
+32|83|4|1|28|27526.24|0.05|0.08|N|O|1995-10-23|1995-08-27|1995-10-26|TAKE BACK RETURN|TRUCK|sleep quickly. req|
+32|198|10|2|32|35142.08|0.02|0.00|N|O|1995-08-14|1995-10-07|1995-08-27|COLLECT COD|AIR|lithely regular deposits. fluffily |
+32|45|2|3|2|1890.08|0.09|0.02|N|O|1995-08-07|1995-10-07|1995-08-23|DELIVER IN PERSON|AIR| express accounts wake according to the|
+32|3|8|4|4|3612.00|0.09|0.03|N|O|1995-08-04|1995-10-01|1995-09-03|NONE|REG AIR|e slyly final pac|
+32|86|7|5|44|43387.52|0.05|0.06|N|O|1995-08-28|1995-08-20|1995-09-14|DELIVER IN PERSON|AIR|symptotes nag according to the ironic depo|
+32|12|6|6|6|5472.06|0.04|0.03|N|O|1995-07-21|1995-09-23|1995-07-25|COLLECT COD|RAIL| gifts cajole carefully.|
+33|62|7|1|31|29823.86|0.09|0.04|A|F|1993-10-29|1993-12-19|1993-11-08|COLLECT COD|TRUCK|ng to the furiously ironic package|
+33|61|8|2|32|30753.92|0.02|0.05|A|F|1993-12-09|1994-01-04|1993-12-28|COLLECT COD|MAIL|gular theodolites|
+33|138|4|3|5|5190.65|0.05|0.03|A|F|1993-12-09|1993-12-25|1993-12-23|TAKE BACK RETURN|AIR|. stealthily bold exc|
+33|34|5|4|41|38295.23|0.09|0.00|R|F|1993-11-09|1994-01-24|1993-11-11|TAKE BACK RETURN|MAIL|unusual packages doubt caref|
+34|89|10|1|13|12858.04|0.00|0.07|N|O|1998-10-23|1998-09-14|1998-11-06|NONE|REG AIR|nic accounts. deposits are alon|
+34|90|1|2|22|21781.98|0.08|0.06|N|O|1998-10-09|1998-10-16|1998-10-12|NONE|FOB|thely slyly p|
+34|170|7|3|6|6421.02|0.02|0.06|N|O|1998-10-30|1998-09-20|1998-11-05|NONE|FOB|ar foxes sleep |
+35|1|4|1|24|21624.00|0.02|0.00|N|O|1996-02-21|1996-01-03|1996-03-18|TAKE BACK RETURN|FOB|, regular tithe|
+35|162|1|2|34|36113.44|0.06|0.08|N|O|1996-01-22|1996-01-06|1996-01-27|DELIVER IN PERSON|RAIL|s are carefully against the f|
+35|121|4|3|7|7147.84|0.06|0.04|N|O|1996-01-19|1995-12-22|1996-01-29|NONE|MAIL| the carefully regular |
+35|86|7|4|25|24652.00|0.06|0.05|N|O|1995-11-26|1995-12-25|1995-12-21|DELIVER IN PERSON|SHIP| quickly unti|
+35|120|7|5|34|34684.08|0.08|0.06|N|O|1995-11-08|1996-01-15|1995-11-26|COLLECT COD|MAIL|. silent, unusual deposits boost|
+35|31|7|6|28|26068.84|0.03|0.02|N|O|1996-02-01|1995-12-24|1996-02-28|COLLECT COD|RAIL|ly alongside of |
+36|120|1|1|42|42845.04|0.09|0.00|N|O|1996-02-03|1996-01-21|1996-02-23|COLLECT COD|SHIP| careful courts. special |
+37|23|8|1|40|36920.80|0.09|0.03|A|F|1992-07-21|1992-08-01|1992-08-15|NONE|REG AIR|luffily regular requests. slyly final acco|
+37|127|6|2|39|40057.68|0.05|0.02|A|F|1992-07-02|1992-08-18|1992-07-28|TAKE BACK RETURN|RAIL|the final requests. ca|
+37|13|7|3|43|39259.43|0.05|0.08|A|F|1992-07-10|1992-07-06|1992-08-02|DELIVER IN PERSON|TRUCK|iously ste|
+38|176|5|1|44|47351.48|0.04|0.02|N|O|1996-09-29|1996-11-17|1996-09-30|COLLECT COD|MAIL|s. blithely unusual theodolites am|
+39|3|10|1|44|39732.00|0.09|0.06|N|O|1996-11-14|1996-12-15|1996-12-12|COLLECT COD|RAIL|eodolites. careful|
+39|187|8|2|26|28266.68|0.08|0.04|N|O|1996-11-04|1996-10-20|1996-11-20|NONE|FOB|ckages across the slyly silent|
+39|68|3|3|46|44530.76|0.06|0.08|N|O|1996-09-26|1996-12-19|1996-10-26|DELIVER IN PERSON|AIR|he carefully e|
+39|21|6|4|32|29472.64|0.07|0.05|N|O|1996-10-02|1996-12-19|1996-10-14|COLLECT COD|MAIL|heodolites sleep silently pending foxes. ac|
+39|55|10|5|43|41067.15|0.01|0.01|N|O|1996-10-17|1996-11-14|1996-10-26|COLLECT COD|MAIL|yly regular i|
+39|95|7|6|40|39803.60|0.06|0.05|N|O|1996-12-08|1996-10-22|1997-01-01|COLLECT COD|AIR|quickly ironic fox|
+64|86|7|1|21|20707.68|0.05|0.02|R|F|1994-09-30|1994-09-18|1994-10-26|DELIVER IN PERSON|REG AIR|ch slyly final, thin platelets.|
+65|60|5|1|26|24961.56|0.03|0.03|A|F|1995-04-20|1995-04-25|1995-05-13|NONE|TRUCK|pending deposits nag even packages. ca|
+65|74|3|2|22|21429.54|0.00|0.05|N|O|1995-07-17|1995-06-04|1995-07-19|COLLECT COD|FOB| ideas. special, r|
+65|2|5|3|21|18942.00|0.09|0.07|N|O|1995-07-06|1995-05-14|1995-07-31|DELIVER IN PERSON|RAIL|bove the even packages. accounts nag carefu|
+66|116|10|1|31|31499.41|0.00|0.08|R|F|1994-02-19|1994-03-11|1994-02-20|TAKE BACK RETURN|RAIL|ut the unusual accounts sleep at the bo|
+66|174|5|2|41|44040.97|0.04|0.07|A|F|1994-02-21|1994-03-01|1994-03-18|COLLECT COD|AIR| regular de|
+67|22|5|1|4|3688.08|0.09|0.04|N|O|1997-04-17|1997-01-31|1997-04-20|NONE|SHIP| cajole thinly expres|
+67|21|10|2|12|11052.24|0.09|0.05|N|O|1997-01-27|1997-02-21|1997-02-22|NONE|REG AIR| even packages cajole|
+67|174|4|3|5|5370.85|0.03|0.07|N|O|1997-02-20|1997-02-12|1997-02-21|DELIVER IN PERSON|TRUCK|y unusual packages thrash pinto |
+67|88|9|4|44|43475.52|0.08|0.06|N|O|1997-03-18|1997-01-29|1997-04-13|DELIVER IN PERSON|RAIL|se quickly above the even, express reques|
+67|41|10|5|23|21643.92|0.05|0.07|N|O|1997-04-19|1997-02-14|1997-05-06|DELIVER IN PERSON|REG AIR|ly regular deposit|
+67|179|9|6|29|31295.93|0.02|0.05|N|O|1997-01-25|1997-01-27|1997-01-27|DELIVER IN PERSON|FOB|ultipliers |
+68|8|1|1|3|2724.00|0.05|0.02|N|O|1998-07-04|1998-06-05|1998-07-21|NONE|RAIL|fully special instructions cajole. furious|
+68|176|4|2|46|49503.82|0.02|0.05|N|O|1998-06-26|1998-06-07|1998-07-05|NONE|MAIL| requests are unusual, regular pinto |
+68|35|1|3|46|43011.38|0.04|0.05|N|O|1998-08-13|1998-07-08|1998-08-29|NONE|RAIL|egular dependencies affix ironically along |
+68|95|9|4|20|19901.80|0.07|0.01|N|O|1998-06-27|1998-05-23|1998-07-02|NONE|REG AIR| excuses integrate fluffily |
+68|83|4|5|27|26543.16|0.03|0.06|N|O|1998-06-19|1998-06-25|1998-06-29|DELIVER IN PERSON|SHIP|ccounts. deposits use. furiously|
+68|103|6|6|30|30093.00|0.05|0.06|N|O|1998-08-11|1998-07-11|1998-08-14|NONE|RAIL|oxes are slyly blithely fin|
+68|140|6|7|41|42645.74|0.09|0.08|N|O|1998-06-24|1998-06-27|1998-07-06|NONE|SHIP|eposits nag special ideas. furiousl|
+69|116|10|1|48|48773.28|0.01|0.07|A|F|1994-08-17|1994-08-11|1994-09-08|NONE|TRUCK|regular epitaphs. carefully even ideas hag|
+69|105|10|2|32|32163.20|0.08|0.06|A|F|1994-08-24|1994-08-17|1994-08-31|NONE|REG AIR|s sleep carefully bold, |
+69|138|4|3|17|17648.21|0.09|0.00|A|F|1994-07-02|1994-07-07|1994-07-03|TAKE BACK RETURN|AIR|final, pending instr|
+69|38|9|4|3|2814.09|0.09|0.04|R|F|1994-06-06|1994-07-27|1994-06-15|NONE|MAIL| blithely final d|
+69|93|6|5|42|41709.78|0.07|0.04|R|F|1994-07-31|1994-07-26|1994-08-28|DELIVER IN PERSON|REG AIR|tect regular, speci|
+69|19|3|6|23|21137.23|0.05|0.00|A|F|1994-10-03|1994-08-06|1994-10-24|NONE|SHIP|nding accounts ca|
+70|65|2|1|8|7720.48|0.03|0.08|R|F|1994-01-12|1994-02-27|1994-01-14|TAKE BACK RETURN|FOB|ggle. carefully pending dependenc|
+70|197|10|2|13|14263.47|0.06|0.06|A|F|1994-03-03|1994-02-13|1994-03-26|COLLECT COD|AIR|lyly special packag|
+70|180|8|3|1|1080.18|0.03|0.05|R|F|1994-01-26|1994-03-05|1994-01-28|TAKE BACK RETURN|RAIL|quickly. fluffily unusual theodolites c|
+70|46|9|4|11|10406.44|0.01|0.05|A|F|1994-03-17|1994-03-17|1994-03-27|NONE|MAIL|alongside of the deposits. fur|
+70|38|9|5|37|34707.11|0.09|0.04|R|F|1994-02-13|1994-03-16|1994-02-21|COLLECT COD|MAIL|n accounts are. q|
+70|56|8|6|19|18164.95|0.06|0.03|A|F|1994-01-26|1994-02-17|1994-02-06|TAKE BACK RETURN|SHIP| packages wake pending accounts.|
+71|62|3|1|25|24051.50|0.09|0.07|N|O|1998-04-10|1998-04-22|1998-04-11|COLLECT COD|FOB|ckly. slyly|
+71|66|1|2|3|2898.18|0.09|0.07|N|O|1998-05-23|1998-04-03|1998-06-02|COLLECT COD|SHIP|y. pinto beans haggle after the|
+71|35|1|3|45|42076.35|0.00|0.07|N|O|1998-02-23|1998-03-20|1998-03-24|DELIVER IN PERSON|SHIP| ironic packages believe blithely a|
+71|97|9|4|33|32903.97|0.00|0.01|N|O|1998-04-12|1998-03-20|1998-04-15|NONE|FOB| serve quickly fluffily bold deposi|
+71|104|7|5|39|39159.90|0.08|0.06|N|O|1998-01-29|1998-04-07|1998-02-18|DELIVER IN PERSON|RAIL|l accounts sleep across the pack|
+71|196|9|6|34|37270.46|0.04|0.01|N|O|1998-03-05|1998-04-22|1998-03-30|DELIVER IN PERSON|TRUCK|s cajole. |
+96|124|7|1|23|23554.76|0.10|0.06|A|F|1994-07-19|1994-06-29|1994-07-25|DELIVER IN PERSON|TRUCK|ep-- carefully reg|
+96|136|7|2|30|31083.90|0.01|0.06|R|F|1994-06-03|1994-05-29|1994-06-22|DELIVER IN PERSON|TRUCK|e quickly even ideas. furiou|
+97|120|4|1|13|13261.56|0.00|0.02|R|F|1993-04-01|1993-04-04|1993-04-08|NONE|TRUCK|ayers cajole against the furiously|
+97|50|7|2|37|35151.85|0.02|0.06|A|F|1993-04-13|1993-03-30|1993-04-14|DELIVER IN PERSON|SHIP|ic requests boost carefully quic|
+97|78|6|3|19|18583.33|0.06|0.08|R|F|1993-05-14|1993-03-05|1993-05-25|TAKE BACK RETURN|RAIL|gifts. furiously ironic packages cajole. |
+98|41|2|1|28|26349.12|0.06|0.07|A|F|1994-12-24|1994-10-25|1995-01-16|COLLECT COD|REG AIR| pending, regular accounts s|
+98|110|7|2|1|1010.11|0.00|0.00|A|F|1994-12-01|1994-12-12|1994-12-15|DELIVER IN PERSON|TRUCK|. unusual instructions against|
+98|45|6|3|14|13230.56|0.05|0.02|A|F|1994-12-30|1994-11-22|1995-01-27|COLLECT COD|AIR| cajole furiously. blithely ironic ideas |
+98|168|9|4|10|10681.60|0.03|0.03|A|F|1994-10-23|1994-11-08|1994-11-09|COLLECT COD|RAIL| carefully. quickly ironic ideas|
+99|88|9|1|10|9880.80|0.02|0.01|A|F|1994-05-18|1994-06-03|1994-05-23|COLLECT COD|RAIL|kages. requ|
+99|124|5|2|5|5120.60|0.02|0.07|R|F|1994-05-06|1994-05-28|1994-05-20|TAKE BACK RETURN|RAIL|ests cajole fluffily waters. blithe|
+99|135|1|3|42|43475.46|0.02|0.02|A|F|1994-04-19|1994-05-18|1994-04-20|NONE|RAIL|kages are fluffily furiously ir|
+99|109|2|4|36|36327.60|0.09|0.02|A|F|1994-07-04|1994-04-17|1994-07-30|DELIVER IN PERSON|AIR|slyly. slyly e|
+100|63|4|1|28|26965.68|0.04|0.05|N|O|1998-05-08|1998-05-13|1998-06-07|COLLECT COD|TRUCK|sts haggle. slowl|
+100|116|10|2|22|22354.42|0.00|0.07|N|O|1998-06-24|1998-04-12|1998-06-29|DELIVER IN PERSON|SHIP|nto beans alongside of the fi|
+100|47|4|3|46|43563.84|0.03|0.04|N|O|1998-05-02|1998-04-10|1998-05-22|TAKE BACK RETURN|SHIP|ular accounts. even|
+100|39|10|4|14|13146.42|0.06|0.03|N|O|1998-05-22|1998-05-01|1998-06-03|COLLECT COD|MAIL|y. furiously ironic ideas gr|
+100|54|6|5|37|35299.85|0.05|0.00|N|O|1998-03-06|1998-04-16|1998-03-31|TAKE BACK RETURN|TRUCK|nd the quickly s|
+101|119|9|1|49|49936.39|0.10|0.00|N|O|1996-06-21|1996-05-27|1996-06-29|DELIVER IN PERSON|REG AIR|ts-- final packages sleep furiousl|
+101|164|9|2|36|38309.76|0.00|0.01|N|O|1996-05-19|1996-05-01|1996-06-04|DELIVER IN PERSON|AIR|tes. blithely pending dolphins x-ray f|
+101|139|5|3|12|12469.56|0.06|0.02|N|O|1996-03-29|1996-04-20|1996-04-12|COLLECT COD|MAIL|. quickly regular|
+102|89|10|1|37|36595.96|0.06|0.00|N|O|1997-07-24|1997-08-02|1997-08-07|TAKE BACK RETURN|SHIP|ully across the ideas. final deposit|
+102|170|5|2|34|36385.78|0.03|0.08|N|O|1997-08-09|1997-07-28|1997-08-26|TAKE BACK RETURN|SHIP|eposits cajole across|
+102|183|4|3|25|27079.50|0.01|0.01|N|O|1997-07-31|1997-07-24|1997-08-17|NONE|RAIL|bits. ironic accoun|
+102|62|7|4|15|14430.90|0.07|0.07|N|O|1997-06-02|1997-07-13|1997-06-04|DELIVER IN PERSON|SHIP|final packages. carefully even excu|
+103|195|9|1|6|6571.14|0.03|0.05|N|O|1996-10-11|1996-07-25|1996-10-28|NONE|FOB|cajole. carefully ex|
+103|11|5|2|37|33707.37|0.02|0.07|N|O|1996-09-17|1996-07-27|1996-09-20|TAKE BACK RETURN|MAIL|ies. quickly ironic requests use blithely|
+103|29|10|3|23|21367.46|0.01|0.04|N|O|1996-09-11|1996-09-18|1996-09-26|NONE|FOB|ironic accou|
+103|30|9|4|32|29760.96|0.01|0.07|N|O|1996-07-30|1996-08-06|1996-08-04|NONE|RAIL|kages doze. special, regular deposit|
+128|107|10|1|38|38269.80|0.06|0.01|A|F|1992-09-01|1992-08-27|1992-10-01|TAKE BACK RETURN|FOB| cajole careful|
+129|3|6|1|46|41538.00|0.08|0.02|R|F|1993-02-15|1993-01-24|1993-03-05|COLLECT COD|TRUCK|uietly bold theodolites. fluffil|
+129|186|7|2|36|39102.48|0.01|0.02|A|F|1992-11-25|1992-12-25|1992-12-09|TAKE BACK RETURN|REG AIR|packages are care|
+129|40|6|3|33|31021.32|0.04|0.06|A|F|1993-01-08|1993-02-14|1993-01-29|COLLECT COD|SHIP|sts nag bravely. fluffily|
+129|136|7|4|34|35228.42|0.00|0.01|R|F|1993-01-29|1993-02-14|1993-02-10|COLLECT COD|MAIL|quests. express ideas|
+129|32|8|5|24|22368.72|0.06|0.00|A|F|1992-12-07|1993-01-02|1992-12-11|TAKE BACK RETURN|FOB|uests. foxes cajole slyly after the ca|
+129|78|6|6|22|21517.54|0.06|0.01|R|F|1993-02-15|1993-01-31|1993-02-24|COLLECT COD|SHIP|e. fluffily regular |
+129|169|6|7|1|1069.16|0.05|0.04|R|F|1993-01-26|1993-01-08|1993-02-24|DELIVER IN PERSON|FOB|e carefully blithely bold dolp|
+130|129|10|1|14|14407.68|0.08|0.05|A|F|1992-08-15|1992-07-25|1992-09-13|COLLECT COD|RAIL| requests. final instruction|
+130|2|5|2|48|43296.00|0.03|0.02|R|F|1992-07-01|1992-07-12|1992-07-24|NONE|AIR|lithely alongside of the regu|
+130|12|3|3|18|16416.18|0.04|0.08|A|F|1992-07-04|1992-06-14|1992-07-29|DELIVER IN PERSON|MAIL| slyly ironic decoys abou|
+130|116|6|4|13|13209.43|0.09|0.02|R|F|1992-06-26|1992-07-29|1992-07-05|NONE|FOB| pending dolphins sleep furious|
+130|70|7|5|31|30072.17|0.06|0.05|R|F|1992-09-01|1992-07-18|1992-09-02|TAKE BACK RETURN|RAIL|thily about the ruth|
+131|168|7|1|45|48067.20|0.10|0.02|R|F|1994-09-14|1994-09-02|1994-10-04|NONE|FOB|ironic, bold accounts. careful|
+131|45|8|2|50|47252.00|0.02|0.04|A|F|1994-09-17|1994-08-10|1994-09-21|NONE|SHIP|ending requests. final, ironic pearls slee|
+131|190|1|3|4|4360.76|0.04|0.03|A|F|1994-09-20|1994-08-30|1994-09-23|COLLECT COD|REG AIR| are carefully slyly i|
+132|141|8|1|18|18740.52|0.00|0.08|R|F|1993-07-10|1993-08-05|1993-07-13|NONE|TRUCK|ges. platelets wake furio|
+132|120|1|2|43|43865.16|0.01|0.08|R|F|1993-09-01|1993-08-16|1993-09-22|NONE|TRUCK|y pending theodolites|
+132|115|6|3|32|32483.52|0.04|0.04|A|F|1993-07-12|1993-08-05|1993-08-05|COLLECT COD|TRUCK|d instructions hagg|
+132|29|2|4|23|21367.46|0.10|0.00|A|F|1993-06-16|1993-08-27|1993-06-23|DELIVER IN PERSON|AIR|refully blithely bold acco|
+133|104|7|1|27|27110.70|0.00|0.02|N|O|1997-12-21|1998-02-23|1997-12-27|TAKE BACK RETURN|MAIL|yly even gifts after the sl|
+133|177|5|2|12|12926.04|0.02|0.06|N|O|1997-12-02|1998-01-15|1997-12-29|DELIVER IN PERSON|REG AIR|ts cajole fluffily quickly i|
+133|118|8|3|29|29525.19|0.09|0.08|N|O|1998-02-28|1998-01-30|1998-03-09|DELIVER IN PERSON|RAIL| the carefully regular theodoli|
+133|90|1|4|11|10890.99|0.06|0.01|N|O|1998-03-21|1998-01-15|1998-04-04|DELIVER IN PERSON|REG AIR|e quickly across the dolphins|
+134|1|2|1|21|18921.00|0.00|0.03|A|F|1992-07-17|1992-07-08|1992-07-26|COLLECT COD|SHIP|s. quickly regular|
+134|165|2|2|35|37280.60|0.06|0.07|A|F|1992-08-23|1992-06-01|1992-08-24|NONE|MAIL|ajole furiously. instructio|
+134|189|10|3|26|28318.68|0.09|0.06|A|F|1992-06-20|1992-07-12|1992-07-16|NONE|RAIL| among the pending depos|
+134|145|6|4|47|49121.58|0.05|0.00|A|F|1992-08-16|1992-07-06|1992-08-28|NONE|REG AIR|s! carefully unusual requests boost careful|
+134|36|7|5|12|11232.36|0.05|0.02|A|F|1992-07-03|1992-06-01|1992-07-11|COLLECT COD|TRUCK|nts are quic|
+134|134|10|6|12|12409.56|0.00|0.00|A|F|1992-08-08|1992-07-07|1992-08-20|TAKE BACK RETURN|FOB|lyly regular pac|
+135|109|10|1|47|47427.70|0.06|0.08|N|O|1996-02-18|1996-01-01|1996-02-25|COLLECT COD|RAIL|ctions wake slyly abo|
+135|199|3|2|21|23082.99|0.00|0.07|N|O|1996-02-11|1996-01-12|1996-02-13|DELIVER IN PERSON|SHIP| deposits believe. furiously regular p|
+135|158|10|3|33|34918.95|0.02|0.00|N|O|1996-01-03|1995-11-21|1996-02-01|TAKE BACK RETURN|MAIL|ptotes boost slowly care|
+135|68|7|4|34|32914.04|0.02|0.03|N|O|1996-01-12|1996-01-19|1996-02-05|NONE|TRUCK|counts doze against the blithely ironi|
+135|137|8|5|20|20742.60|0.01|0.04|N|O|1996-01-25|1995-11-20|1996-02-09|NONE|MAIL|theodolites. quickly p|
+135|115|5|6|13|13196.43|0.04|0.02|N|O|1995-11-12|1995-12-22|1995-11-17|NONE|FOB|nal ideas. final instr|
+160|15|2|1|36|32940.36|0.07|0.01|N|O|1997-03-11|1997-03-11|1997-03-20|COLLECT COD|MAIL|old, ironic deposits are quickly abov|
+160|87|8|2|22|21715.76|0.00|0.04|N|O|1997-02-18|1997-03-05|1997-03-05|COLLECT COD|RAIL|ncies about the request|
+160|21|10|3|34|31314.68|0.01|0.05|N|O|1997-01-31|1997-03-13|1997-02-14|NONE|FOB|st sleep even gifts. dependencies along|
+161|103|10|1|19|19058.90|0.01|0.01|A|F|1994-12-13|1994-11-19|1994-12-26|DELIVER IN PERSON|TRUCK|, regular sheaves sleep along|
+162|190|1|1|2|2180.38|0.02|0.01|N|O|1995-09-02|1995-06-17|1995-09-08|COLLECT COD|FOB|es! final somas integrate|
+163|168|3|1|43|45930.88|0.01|0.00|N|O|1997-09-19|1997-11-19|1997-10-03|COLLECT COD|REG AIR|al, bold dependencies wake. iron|
+163|121|2|2|13|13274.56|0.01|0.04|N|O|1997-11-11|1997-10-18|1997-12-07|DELIVER IN PERSON|TRUCK|inal requests. even pinto beans hag|
+163|37|3|3|27|25299.81|0.04|0.08|N|O|1997-12-26|1997-11-28|1998-01-05|COLLECT COD|REG AIR|ously express dependen|
+163|193|5|4|5|5465.95|0.02|0.00|N|O|1997-11-17|1997-10-09|1997-12-05|DELIVER IN PERSON|TRUCK| must belie|
+163|127|2|5|12|12325.44|0.10|0.00|N|O|1997-12-18|1997-10-26|1997-12-22|COLLECT COD|TRUCK|ly blithe accounts cajole |
+163|191|4|6|20|21823.80|0.00|0.07|N|O|1997-09-27|1997-11-15|1997-10-07|TAKE BACK RETURN|FOB|tructions integrate b|
+164|92|4|1|26|25794.34|0.09|0.04|A|F|1993-01-04|1992-11-21|1993-01-07|NONE|RAIL|s. blithely special courts are blithel|
+164|19|6|2|24|22056.24|0.05|0.05|R|F|1992-12-22|1992-11-27|1993-01-06|NONE|AIR|side of the slyly unusual theodolites. f|
+164|126|9|3|38|38992.56|0.03|0.06|R|F|1992-12-04|1992-11-23|1993-01-02|TAKE BACK RETURN|AIR|counts cajole fluffily regular packages. b|
+164|18|2|4|32|29376.32|0.05|0.01|R|F|1992-12-21|1992-12-23|1992-12-28|COLLECT COD|RAIL|ts wake again|
+164|148|1|5|43|45070.02|0.06|0.01|R|F|1992-11-26|1993-01-03|1992-12-08|COLLECT COD|RAIL|y carefully regular dep|
+164|109|10|6|27|27245.70|0.10|0.04|R|F|1992-12-23|1993-01-16|1993-01-10|DELIVER IN PERSON|AIR|ayers wake carefully a|
+164|4|7|7|23|20792.00|0.09|0.04|A|F|1992-11-03|1992-12-02|1992-11-12|NONE|REG AIR|ress packages haggle ideas. blithely spec|
+165|34|5|1|3|2802.09|0.01|0.08|R|F|1993-03-29|1993-03-06|1993-04-12|DELIVER IN PERSON|REG AIR|riously requests. depos|
+165|162|7|2|43|45672.88|0.08|0.05|R|F|1993-02-27|1993-04-19|1993-03-03|DELIVER IN PERSON|TRUCK|jole slyly according |
+165|59|1|3|15|14385.75|0.00|0.05|R|F|1993-04-10|1993-03-29|1993-05-01|COLLECT COD|SHIP| bold packages mainta|
+165|140|1|4|49|50966.86|0.07|0.06|A|F|1993-02-20|1993-04-02|1993-03-10|COLLECT COD|REG AIR|uses sleep slyly ruthlessly regular a|
+165|156|4|5|27|28516.05|0.01|0.04|R|F|1993-04-27|1993-03-04|1993-05-13|NONE|MAIL|around the ironic, even orb|
+166|65|2|1|37|35707.22|0.09|0.03|N|O|1995-11-16|1995-10-17|1995-12-13|NONE|MAIL|lar frays wake blithely a|
+166|167|8|2|13|13873.08|0.09|0.05|N|O|1995-11-09|1995-11-18|1995-11-14|COLLECT COD|SHIP|fully above the blithely fina|
+166|100|2|3|41|41004.10|0.07|0.03|N|O|1995-11-13|1995-11-07|1995-12-08|COLLECT COD|FOB|hily along the blithely pending fo|
+166|46|3|4|8|7568.32|0.05|0.02|N|O|1995-12-30|1995-11-29|1996-01-29|DELIVER IN PERSON|RAIL|e carefully bold |
+167|102|3|1|28|28058.80|0.06|0.01|R|F|1993-02-19|1993-02-16|1993-03-03|DELIVER IN PERSON|TRUCK|sly during the u|
+167|172|2|2|27|28948.59|0.09|0.00|R|F|1993-05-01|1993-03-31|1993-05-31|TAKE BACK RETURN|FOB|eans affix furiously-- packages|
+192|98|1|1|23|22956.07|0.00|0.00|N|O|1998-02-05|1998-02-06|1998-03-07|TAKE BACK RETURN|AIR|ly pending theodolites haggle quickly fluf|
+192|162|7|2|20|21243.20|0.07|0.01|N|O|1998-03-13|1998-02-02|1998-03-31|TAKE BACK RETURN|REG AIR|tes. carefu|
+192|111|8|3|15|15166.65|0.09|0.01|N|O|1998-01-30|1998-02-10|1998-02-23|TAKE BACK RETURN|TRUCK|he ironic requests haggle about|
+192|197|1|4|2|2194.38|0.06|0.02|N|O|1998-03-06|1998-02-03|1998-03-24|COLLECT COD|SHIP|s. dependencies nag furiously alongside|
+192|83|4|5|25|24577.00|0.02|0.03|N|O|1998-02-15|1998-01-11|1998-03-17|COLLECT COD|TRUCK|. carefully regular|
+192|142|9|6|45|46896.30|0.00|0.05|N|O|1998-03-11|1998-01-09|1998-04-03|NONE|MAIL|equests. ideas sleep idea|
+193|93|5|1|9|8937.81|0.06|0.06|A|F|1993-09-17|1993-10-08|1993-09-30|COLLECT COD|TRUCK|against the fluffily regular d|
+193|154|6|2|15|15812.25|0.02|0.07|R|F|1993-11-22|1993-10-09|1993-12-05|TAKE BACK RETURN|SHIP|ffily. regular packages d|
+193|94|6|3|23|22864.07|0.06|0.05|A|F|1993-08-21|1993-10-11|1993-09-02|DELIVER IN PERSON|TRUCK|ly even accounts wake blithely bold|
+194|3|6|1|17|15351.00|0.05|0.04|R|F|1992-05-24|1992-05-22|1992-05-30|COLLECT COD|AIR| regular deposi|
+194|184|5|2|1|1084.18|0.04|0.06|R|F|1992-04-30|1992-05-18|1992-05-23|NONE|REG AIR| regular theodolites. regular, iron|
+194|66|1|3|13|12558.78|0.08|0.08|A|F|1992-05-07|1992-06-18|1992-05-10|NONE|AIR|about the blit|
+194|146|7|4|36|37661.04|0.00|0.05|R|F|1992-05-21|1992-05-18|1992-05-27|TAKE BACK RETURN|RAIL|pecial packages wake after the slyly r|
+194|57|2|5|8|7656.40|0.04|0.00|R|F|1992-07-06|1992-06-25|1992-07-11|COLLECT COD|FOB|uriously unusual excuses|
+194|149|6|6|16|16786.24|0.06|0.03|A|F|1992-05-14|1992-06-14|1992-05-21|TAKE BACK RETURN|TRUCK|y regular requests. furious|
+194|168|7|7|21|22431.36|0.02|0.01|R|F|1992-05-06|1992-05-20|1992-05-07|COLLECT COD|REG AIR|accounts detect quickly dogged |
+195|85|6|1|6|5910.48|0.04|0.02|A|F|1994-01-09|1994-03-27|1994-01-28|COLLECT COD|REG AIR|y, even deposits haggle carefully. bli|
+195|94|8|2|41|40757.69|0.05|0.07|A|F|1994-02-24|1994-02-11|1994-03-20|NONE|TRUCK|rts detect in place of t|
+195|86|7|3|34|33526.72|0.08|0.08|R|F|1994-01-31|1994-02-11|1994-02-12|NONE|TRUCK| cajole furiously bold i|
+195|86|7|4|41|40429.28|0.06|0.04|R|F|1994-03-14|1994-03-13|1994-04-09|COLLECT COD|RAIL|ggle fluffily foxes. fluffily ironic ex|
+196|136|7|1|19|19686.47|0.03|0.02|R|F|1993-04-17|1993-05-27|1993-04-30|NONE|SHIP|sts maintain foxes. furiously regular p|
+196|10|3|2|15|13650.15|0.03|0.04|A|F|1993-07-05|1993-05-08|1993-07-06|TAKE BACK RETURN|SHIP|s accounts. furio|
+197|99|1|1|39|38964.51|0.02|0.04|N|O|1995-07-21|1995-07-01|1995-08-14|TAKE BACK RETURN|AIR|press accounts. daringly sp|
+197|178|8|2|8|8625.36|0.09|0.02|A|F|1995-04-17|1995-07-01|1995-04-27|DELIVER IN PERSON|SHIP|y blithely even deposits. blithely fina|
+197|156|4|3|17|17954.55|0.06|0.02|N|O|1995-08-02|1995-06-23|1995-08-03|COLLECT COD|REG AIR|ts. careful|
+197|18|5|4|25|22950.25|0.04|0.01|N|F|1995-06-13|1995-05-23|1995-06-24|TAKE BACK RETURN|FOB|s-- quickly final accounts|
+197|42|9|5|14|13188.56|0.09|0.01|R|F|1995-05-08|1995-05-24|1995-05-12|TAKE BACK RETURN|RAIL|use slyly slyly silent depo|
+197|106|1|6|1|1006.10|0.07|0.05|N|O|1995-07-15|1995-06-21|1995-08-11|COLLECT COD|RAIL| even, thin dependencies sno|
+198|57|8|1|33|31582.65|0.07|0.02|N|O|1998-01-05|1998-03-20|1998-01-10|TAKE BACK RETURN|TRUCK|carefully caref|
+198|16|10|2|20|18320.20|0.03|0.00|N|O|1998-01-15|1998-03-31|1998-01-25|DELIVER IN PERSON|FOB|carefully final escapades a|
+198|149|2|3|15|15737.10|0.04|0.02|N|O|1998-04-12|1998-02-26|1998-04-15|COLLECT COD|MAIL|es. quickly pending deposits s|
+198|11|5|4|35|31885.35|0.08|0.02|N|O|1998-02-27|1998-03-23|1998-03-14|TAKE BACK RETURN|RAIL|ests nod quickly furiously sly pinto be|
+198|102|3|5|33|33069.30|0.02|0.01|N|O|1998-03-22|1998-03-12|1998-04-14|DELIVER IN PERSON|SHIP|ending foxes acr|
+199|133|9|1|50|51656.50|0.02|0.00|N|O|1996-06-12|1996-06-03|1996-07-04|DELIVER IN PERSON|MAIL|essly regular ideas boost sly|
+199|134|5|2|30|31023.90|0.08|0.05|N|O|1996-03-27|1996-05-29|1996-04-14|NONE|TRUCK|ilent packages doze quickly. thinly |
+224|151|2|1|16|16818.40|0.04|0.00|A|F|1994-08-01|1994-07-30|1994-08-27|DELIVER IN PERSON|MAIL|y unusual foxes |
+224|109|2|2|34|34309.40|0.04|0.08|R|F|1994-07-13|1994-08-25|1994-07-31|COLLECT COD|TRUCK| carefully. final platelets |
+224|190|1|3|41|44697.79|0.07|0.04|A|F|1994-09-01|1994-09-15|1994-09-02|TAKE BACK RETURN|SHIP|after the furiou|
+224|167|4|4|12|12805.92|0.08|0.06|R|F|1994-10-12|1994-08-29|1994-10-20|DELIVER IN PERSON|MAIL|uriously regular packages. slyly fina|
+224|94|7|5|45|44734.05|0.07|0.07|R|F|1994-08-14|1994-09-02|1994-08-27|COLLECT COD|AIR|leep furiously regular requests. furiousl|
+224|51|3|6|4|3804.20|0.02|0.00|R|F|1994-09-08|1994-08-24|1994-10-04|DELIVER IN PERSON|FOB|tructions |
+225|172|3|1|4|4288.68|0.09|0.07|N|O|1995-08-05|1995-08-19|1995-09-03|TAKE BACK RETURN|SHIP|ng the ironic packages. asymptotes among |
+225|131|7|2|3|3093.39|0.00|0.08|N|O|1995-07-25|1995-07-08|1995-08-17|DELIVER IN PERSON|REG AIR| fluffily about the carefully bold a|
+225|199|2|3|45|49463.55|0.06|0.01|N|O|1995-08-17|1995-08-20|1995-08-30|TAKE BACK RETURN|FOB|the slyly even platelets use aro|
+225|147|4|4|24|25131.36|0.00|0.06|N|O|1995-09-23|1995-08-05|1995-10-16|COLLECT COD|MAIL|ironic accounts are final account|
+225|8|5|5|31|28148.00|0.04|0.06|N|O|1995-06-21|1995-07-24|1995-07-04|TAKE BACK RETURN|FOB|special platelets. quickly r|
+225|132|8|6|12|12385.56|0.00|0.00|A|F|1995-06-04|1995-07-15|1995-06-08|COLLECT COD|MAIL| unusual requests. bus|
+225|142|1|7|44|45854.16|0.10|0.06|N|O|1995-09-22|1995-08-16|1995-10-22|NONE|REG AIR|leep slyly |
+226|97|9|1|4|3988.36|0.00|0.00|R|F|1993-03-31|1993-04-30|1993-04-10|NONE|TRUCK|c foxes integrate carefully against th|
+226|138|4|2|46|47753.98|0.06|0.01|A|F|1993-07-06|1993-04-24|1993-07-13|COLLECT COD|FOB|s. carefully bold accounts cajol|
+226|38|4|3|35|32831.05|0.09|0.03|A|F|1993-03-31|1993-05-18|1993-04-01|NONE|RAIL|osits cajole. final, even foxes a|
+226|41|10|4|45|42346.80|0.10|0.02|R|F|1993-04-17|1993-05-27|1993-05-11|DELIVER IN PERSON|AIR| carefully pending pi|
+226|118|8|5|2|2036.22|0.07|0.02|R|F|1993-03-26|1993-04-13|1993-04-20|TAKE BACK RETURN|SHIP|al platelets. express somas |
+226|83|4|6|48|47187.84|0.02|0.00|A|F|1993-06-11|1993-05-15|1993-06-19|NONE|REG AIR|efully silent packages. final deposit|
+226|118|8|7|14|14253.54|0.09|0.00|R|F|1993-05-20|1993-06-05|1993-05-27|COLLECT COD|MAIL|ep carefully regular accounts. ironic|
+227|166|1|1|19|20257.04|0.05|0.06|N|O|1995-12-10|1996-01-30|1995-12-26|NONE|RAIL|s cajole furiously a|
+227|175|3|2|24|25804.08|0.07|0.07|N|O|1996-02-03|1995-12-24|1996-02-12|COLLECT COD|SHIP|uses across the blithe dependencies cajol|
+228|5|8|1|3|2715.00|0.10|0.08|A|F|1993-05-20|1993-04-08|1993-05-26|DELIVER IN PERSON|SHIP|ckages. sly|
+229|84|5|1|20|19681.60|0.02|0.03|R|F|1994-01-11|1994-01-31|1994-01-26|DELIVER IN PERSON|REG AIR|le. instructions use across the quickly fin|
+229|129|10|2|29|29844.48|0.07|0.00|A|F|1994-03-15|1994-03-02|1994-03-26|COLLECT COD|SHIP|s, final request|
+229|79|10|3|28|27413.96|0.02|0.02|R|F|1994-02-10|1994-02-02|1994-03-10|DELIVER IN PERSON|FOB| final, regular requests. platel|
+229|177|6|4|3|3231.51|0.02|0.08|R|F|1994-03-22|1994-03-24|1994-04-04|DELIVER IN PERSON|REG AIR|posits. furiously regular theodol|
+229|156|1|5|33|34852.95|0.03|0.06|R|F|1994-03-25|1994-02-11|1994-04-13|NONE|FOB| deposits; bold, ruthless theodolites|
+229|106|9|6|29|29176.90|0.04|0.00|R|F|1994-01-14|1994-02-16|1994-01-22|NONE|FOB|uriously pending |
+230|186|7|1|46|49964.28|0.09|0.00|R|F|1994-02-03|1994-01-15|1994-02-23|TAKE BACK RETURN|SHIP|old packages ha|
+230|195|7|2|6|6571.14|0.03|0.08|A|F|1994-01-26|1994-01-25|1994-02-13|NONE|REG AIR| sleep furiously about the p|
+230|8|5|3|1|908.00|0.07|0.06|R|F|1994-01-22|1994-01-03|1994-02-05|TAKE BACK RETURN|RAIL|blithely unusual dolphins. bold, ex|
+230|10|3|4|44|40040.44|0.08|0.06|R|F|1994-02-09|1994-01-18|1994-03-11|NONE|MAIL|deposits integrate slyly sile|
+230|19|9|5|8|7352.08|0.09|0.06|R|F|1993-11-03|1994-01-20|1993-11-11|TAKE BACK RETURN|TRUCK|g the instructions. fluffil|
+230|34|10|6|8|7472.24|0.00|0.05|R|F|1993-11-21|1994-01-05|1993-12-19|TAKE BACK RETURN|FOB|nal ideas. silent, reg|
+231|159|10|1|16|16946.40|0.04|0.08|R|F|1994-11-20|1994-10-29|1994-12-17|TAKE BACK RETURN|AIR|e furiously ironic pinto beans.|
+231|84|5|2|46|45267.68|0.04|0.05|R|F|1994-12-13|1994-12-02|1994-12-14|DELIVER IN PERSON|SHIP|affix blithely. bold requests among the f|
+231|199|1|3|50|54959.50|0.09|0.01|A|F|1994-12-11|1994-12-14|1994-12-13|NONE|RAIL|onic packages haggle fluffily a|
+231|57|8|4|31|29668.55|0.08|0.02|A|F|1994-11-05|1994-12-27|1994-11-30|TAKE BACK RETURN|SHIP|iously special decoys wake q|
+256|89|10|1|22|21759.76|0.09|0.02|R|F|1994-01-12|1993-12-28|1994-01-26|COLLECT COD|FOB|ke quickly ironic, ironic deposits. reg|
+256|119|6|2|40|40764.40|0.10|0.01|A|F|1993-11-30|1993-12-13|1993-12-02|NONE|FOB|nal theodolites. deposits cajole s|
+256|130|9|3|45|46355.85|0.02|0.08|R|F|1994-01-14|1994-01-17|1994-02-10|COLLECT COD|SHIP| grouches. ideas wake quickly ar|
+257|147|8|1|7|7329.98|0.05|0.02|N|O|1998-06-18|1998-05-15|1998-06-27|COLLECT COD|FOB|ackages sleep bold realms. f|
+258|107|4|1|8|8056.80|0.00|0.07|R|F|1994-01-20|1994-03-21|1994-02-09|NONE|REG AIR|ully about the fluffily silent dependencies|
+258|197|1|2|40|43887.60|0.10|0.01|A|F|1994-03-13|1994-02-23|1994-04-05|DELIVER IN PERSON|FOB|silent frets nod daringly busy, bold|
+258|162|3|3|45|47797.20|0.07|0.07|R|F|1994-03-04|1994-02-13|1994-03-30|DELIVER IN PERSON|TRUCK|regular excuses-- fluffily ruthl|
+258|133|9|4|31|32027.03|0.02|0.05|A|F|1994-04-20|1994-03-20|1994-04-28|COLLECT COD|REG AIR| slyly blithely special mul|
+258|36|2|5|25|23400.75|0.08|0.02|A|F|1994-04-13|1994-02-26|1994-04-29|TAKE BACK RETURN|TRUCK|leep pending packages.|
+258|147|4|6|36|37697.04|0.09|0.04|A|F|1994-01-11|1994-03-04|1994-01-18|DELIVER IN PERSON|AIR|nic asymptotes. slyly silent r|
+259|99|10|1|14|13987.26|0.00|0.08|A|F|1993-12-17|1993-12-09|1993-12-31|COLLECT COD|SHIP|ons against the express acco|
+259|162|1|2|14|14870.24|0.03|0.05|R|F|1993-11-10|1993-11-20|1993-11-17|DELIVER IN PERSON|FOB|ully even, regul|
+259|24|5|3|42|38808.84|0.09|0.00|R|F|1993-10-20|1993-11-18|1993-11-12|NONE|TRUCK|the slyly ironic pinto beans. fi|
+259|196|10|4|3|3288.57|0.08|0.06|R|F|1993-10-04|1993-11-07|1993-10-14|TAKE BACK RETURN|SHIP|ng slyly at the accounts.|
+259|193|6|5|6|6559.14|0.00|0.05|R|F|1993-12-05|1993-12-22|1993-12-21|COLLECT COD|TRUCK| requests sleep|
+260|156|7|1|50|52807.50|0.07|0.08|N|O|1997-03-24|1997-02-09|1997-04-20|TAKE BACK RETURN|REG AIR|c deposits |
+260|183|4|2|26|28162.68|0.02|0.07|N|O|1996-12-12|1997-02-06|1996-12-15|NONE|TRUCK|ld theodolites boost fl|
+260|42|1|3|27|25435.08|0.05|0.08|N|O|1997-03-23|1997-02-15|1997-04-22|TAKE BACK RETURN|RAIL|ions according to the|
+260|6|1|4|29|26274.00|0.10|0.06|N|O|1997-03-15|1997-01-14|1997-04-13|NONE|MAIL|fluffily even asymptotes. express wa|
+260|96|9|5|44|43827.96|0.01|0.05|N|O|1997-03-26|1997-02-03|1997-04-19|DELIVER IN PERSON|MAIL|above the blithely ironic instr|
+261|2|7|1|34|30668.00|0.05|0.08|R|F|1993-08-18|1993-09-24|1993-08-20|COLLECT COD|REG AIR|c packages. asymptotes da|
+261|66|7|2|20|19321.20|0.00|0.06|R|F|1993-10-21|1993-08-02|1993-11-04|DELIVER IN PERSON|RAIL|ites hinder |
+261|174|3|3|28|30076.76|0.08|0.03|R|F|1993-07-24|1993-08-20|1993-08-05|COLLECT COD|AIR|ironic packages nag slyly. carefully fin|
+261|119|3|4|49|49936.39|0.04|0.05|R|F|1993-09-12|1993-08-31|1993-10-07|COLLECT COD|SHIP|ions. bold accounts |
+261|61|6|5|49|47091.94|0.01|0.08|A|F|1993-09-29|1993-09-08|1993-10-01|COLLECT COD|SHIP| pinto beans haggle slyly furiously pending|
+261|97|9|6|20|19941.80|0.06|0.06|A|F|1993-10-15|1993-09-05|1993-11-07|NONE|AIR|ing to the special, ironic deposi|
+262|192|3|1|39|42595.41|0.01|0.05|N|O|1996-01-15|1996-02-18|1996-01-28|COLLECT COD|RAIL|usual, regular requests|
+262|61|6|2|33|31714.98|0.09|0.03|N|O|1996-03-10|1996-01-31|1996-03-27|TAKE BACK RETURN|AIR|atelets sleep furiously. requests cajole. b|
+262|59|1|3|35|33566.75|0.05|0.08|N|O|1996-03-12|1996-02-14|1996-04-11|COLLECT COD|MAIL|lites cajole along the pending packag|
+263|24|9|1|22|20328.44|0.06|0.08|R|F|1994-08-24|1994-06-20|1994-09-09|NONE|FOB|efully express fo|
+263|85|6|2|9|8865.72|0.08|0.00|A|F|1994-07-21|1994-07-16|1994-08-08|TAKE BACK RETURN|TRUCK|lms wake bl|
+263|143|2|3|50|52157.00|0.06|0.04|R|F|1994-08-18|1994-07-31|1994-08-22|NONE|TRUCK|re the packages. special|
+288|51|3|1|31|29482.55|0.00|0.03|N|O|1997-03-17|1997-04-28|1997-04-06|TAKE BACK RETURN|AIR|instructions wa|
+288|117|1|2|49|49838.39|0.08|0.05|N|O|1997-04-19|1997-05-19|1997-05-18|TAKE BACK RETURN|TRUCK|ic excuses sleep always spe|
+288|99|10|3|36|35967.24|0.02|0.02|N|O|1997-02-22|1997-05-07|1997-03-07|TAKE BACK RETURN|TRUCK|yly pending excu|
+288|79|10|4|19|18602.33|0.07|0.07|N|O|1997-03-14|1997-04-04|1997-03-26|NONE|MAIL|deposits. blithely quick courts ar|
+288|162|9|5|31|32926.96|0.10|0.04|N|O|1997-05-29|1997-04-24|1997-06-20|TAKE BACK RETURN|RAIL|ns. fluffily|
+289|174|2|1|25|26854.25|0.07|0.05|N|O|1997-03-18|1997-05-05|1997-04-15|DELIVER IN PERSON|FOB|out the quickly bold theodol|
+289|112|2|2|6|6072.66|0.06|0.05|N|O|1997-02-18|1997-05-08|1997-03-19|DELIVER IN PERSON|SHIP|d packages use fluffily furiously|
+289|17|4|3|44|40348.44|0.10|0.08|N|O|1997-06-05|1997-04-20|1997-07-02|COLLECT COD|MAIL|ly ironic foxes. asymptotes |
+289|40|6|4|48|45121.92|0.01|0.08|N|O|1997-03-14|1997-03-30|1997-03-24|DELIVER IN PERSON|RAIL|sits cajole. bold pinto beans x-ray fl|
+289|47|4|5|13|12311.52|0.10|0.03|N|O|1997-06-08|1997-04-06|1997-06-18|TAKE BACK RETURN|REG AIR|ts. quickly bold deposits alongside|
+290|6|1|1|35|31710.00|0.01|0.02|R|F|1994-04-01|1994-02-05|1994-04-27|NONE|MAIL|ove the final foxes detect slyly fluffily|
+290|129|4|2|2|2058.24|0.05|0.04|A|F|1994-01-30|1994-02-13|1994-02-21|TAKE BACK RETURN|TRUCK|. permanently furious reques|
+290|2|5|3|5|4510.00|0.03|0.05|A|F|1994-01-19|1994-02-24|1994-01-27|NONE|MAIL|ans integrate. requests sleep. fur|
+290|124|9|4|23|23554.76|0.05|0.08|R|F|1994-03-14|1994-02-21|1994-04-09|NONE|AIR|refully unusual packages. |
+291|123|6|1|21|21485.52|0.05|0.07|A|F|1994-05-26|1994-05-10|1994-06-23|COLLECT COD|TRUCK|y quickly regular theodolites. final t|
+291|138|9|2|19|19724.47|0.08|0.02|R|F|1994-06-14|1994-04-25|1994-06-19|NONE|REG AIR|e. ruthlessly final accounts after the|
+291|61|8|3|30|28831.80|0.10|0.02|R|F|1994-03-22|1994-04-30|1994-03-24|DELIVER IN PERSON|FOB| fluffily regular deposits. quickl|
+292|154|5|1|8|8433.20|0.10|0.03|R|F|1992-02-18|1992-03-30|1992-03-18|DELIVER IN PERSON|RAIL|sily bold deposits alongside of the ex|
+292|100|1|2|24|24002.40|0.08|0.04|R|F|1992-03-24|1992-03-06|1992-04-20|COLLECT COD|TRUCK| bold, pending theodolites u|
+293|9|6|1|14|12726.00|0.02|0.05|R|F|1992-10-19|1992-12-23|1992-11-10|DELIVER IN PERSON|SHIP|es. packages above the|
+293|187|8|2|11|11958.98|0.10|0.04|R|F|1992-12-24|1992-12-01|1993-01-12|COLLECT COD|MAIL| affix carefully quickly special idea|
+293|118|8|3|13|13235.43|0.04|0.02|A|F|1992-12-17|1992-12-26|1992-12-22|COLLECT COD|RAIL| wake after the quickly even deposits. bli|
+294|60|2|1|31|29761.86|0.00|0.01|R|F|1993-08-06|1993-08-19|1993-08-13|TAKE BACK RETURN|AIR|le fluffily along the quick|
+295|198|10|1|29|31847.51|0.02|0.07|A|F|1994-11-09|1994-12-08|1994-12-07|COLLECT COD|MAIL|inst the carefully ironic pinto beans. blit|
+295|92|6|2|26|25794.34|0.04|0.03|R|F|1994-12-13|1994-11-30|1995-01-06|DELIVER IN PERSON|AIR|ts above the slyly regular requests x-ray q|
+295|16|10|3|8|7328.08|0.10|0.07|R|F|1995-01-13|1994-11-17|1995-01-25|NONE|TRUCK| final instructions h|
+295|61|10|4|26|24987.56|0.10|0.04|A|F|1995-01-12|1994-11-22|1995-01-22|DELIVER IN PERSON|MAIL| carefully iron|
+320|5|2|1|30|27150.00|0.05|0.01|N|O|1997-12-04|1998-01-21|1997-12-13|NONE|RAIL| ironic, final accounts wake quick de|
+320|193|5|2|13|14211.47|0.03|0.00|N|O|1997-12-16|1997-12-26|1997-12-17|TAKE BACK RETURN|AIR|he furiously regular pinto beans. car|
+321|1|8|1|21|18921.00|0.01|0.08|A|F|1993-07-18|1993-04-24|1993-08-13|TAKE BACK RETURN|REG AIR|hockey players sleep slyly sl|
+321|141|4|2|41|42686.74|0.08|0.07|R|F|1993-06-21|1993-06-07|1993-07-09|NONE|REG AIR|special packages shall have to doze blit|
+322|153|8|1|12|12637.80|0.08|0.07|A|F|1992-06-29|1992-05-30|1992-07-11|NONE|AIR|ular theodolites promise qu|
+322|44|5|2|48|45313.92|0.02|0.07|A|F|1992-06-11|1992-06-16|1992-06-26|COLLECT COD|RAIL|dolites detect qu|
+322|13|3|3|20|18260.20|0.04|0.01|R|F|1992-04-26|1992-05-04|1992-05-22|DELIVER IN PERSON|MAIL|ckly toward |
+322|184|5|4|10|10841.80|0.06|0.03|R|F|1992-04-12|1992-05-13|1992-04-14|DELIVER IN PERSON|AIR| deposits grow slyly according to th|
+322|12|2|5|35|31920.35|0.07|0.06|A|F|1992-07-17|1992-05-03|1992-08-14|TAKE BACK RETURN|RAIL|egular accounts cajole carefully. even d|
+322|34|5|6|3|2802.09|0.08|0.05|A|F|1992-07-03|1992-05-10|1992-07-28|NONE|AIR|ending, ironic deposits along the blith|
+322|38|4|7|5|4690.15|0.01|0.02|A|F|1992-04-15|1992-05-12|1992-04-26|COLLECT COD|REG AIR| special grouches sleep quickly instructio|
+323|164|9|1|50|53208.00|0.05|0.04|A|F|1994-04-20|1994-04-25|1994-05-12|DELIVER IN PERSON|REG AIR|cial requests |
+323|96|8|2|18|17929.62|0.06|0.07|R|F|1994-04-13|1994-06-02|1994-05-10|DELIVER IN PERSON|TRUCK|posits cajole furiously pinto beans. |
+323|143|4|3|9|9388.26|0.07|0.04|A|F|1994-06-26|1994-06-10|1994-07-13|COLLECT COD|TRUCK|nic accounts. regular, regular pack|
+324|200|3|1|26|28605.20|0.07|0.01|R|F|1992-04-19|1992-05-28|1992-05-12|DELIVER IN PERSON|RAIL|ross the slyly regular s|
+325|159|1|1|34|36011.10|0.09|0.04|A|F|1993-10-28|1993-12-13|1993-11-17|TAKE BACK RETURN|MAIL|ly bold deposits. always iron|
+325|186|7|2|5|5430.90|0.07|0.08|A|F|1994-01-02|1994-01-05|1994-01-04|TAKE BACK RETURN|MAIL| theodolites. |
+325|19|3|3|35|32165.35|0.07|0.07|A|F|1993-12-06|1994-01-03|1993-12-26|DELIVER IN PERSON|REG AIR|packages wa|
+326|180|9|1|41|44287.38|0.06|0.03|N|O|1995-08-30|1995-07-09|1995-09-12|DELIVER IN PERSON|TRUCK|ily quickly bold ideas.|
+326|20|4|2|38|34960.76|0.02|0.08|N|O|1995-09-12|1995-08-23|1995-09-14|COLLECT COD|RAIL|es sleep slyly. carefully regular inst|
+326|184|5|3|25|27104.50|0.03|0.04|N|O|1995-08-03|1995-07-27|1995-08-16|NONE|AIR|ily furiously unusual accounts. |
+326|85|6|4|5|4925.40|0.03|0.08|N|O|1995-07-29|1995-07-13|1995-08-12|NONE|REG AIR|deas sleep according to the sometimes spe|
+326|35|6|5|31|28985.93|0.04|0.08|N|O|1995-09-27|1995-07-06|1995-10-22|NONE|TRUCK|cies sleep quick|
+326|157|9|6|41|43343.15|0.02|0.00|N|O|1995-07-05|1995-07-23|1995-07-20|TAKE BACK RETURN|REG AIR|to beans wake before the furiously re|
+326|43|10|7|47|44322.88|0.04|0.04|N|O|1995-09-16|1995-07-04|1995-10-04|NONE|REG AIR| special accounts sleep |
+327|144|3|1|16|16706.24|0.03|0.01|N|O|1995-07-05|1995-06-07|1995-07-09|TAKE BACK RETURN|TRUCK|cial ideas sleep af|
+327|42|9|2|9|8478.36|0.09|0.05|A|F|1995-05-24|1995-07-11|1995-06-05|NONE|AIR| asymptotes are fu|
+352|64|5|1|17|16389.02|0.07|0.05|R|F|1994-06-02|1994-05-31|1994-06-29|NONE|FOB|pending deposits sleep furiously |
+353|120|7|1|41|41824.92|0.00|0.06|A|F|1994-03-25|1994-03-31|1994-03-30|DELIVER IN PERSON|AIR|refully final theodoli|
+353|148|9|2|29|30396.06|0.09|0.00|A|F|1994-01-11|1994-03-19|1994-02-09|COLLECT COD|FOB|ctions impr|
+353|135|1|3|12|12421.56|0.06|0.01|R|F|1994-01-02|1994-03-26|1994-01-19|DELIVER IN PERSON|RAIL|g deposits cajole |
+353|78|7|4|46|44991.22|0.00|0.04|A|F|1994-04-14|1994-01-31|1994-05-05|DELIVER IN PERSON|FOB| ironic dolphins |
+353|117|4|5|9|9153.99|0.02|0.02|A|F|1994-03-15|1994-03-20|1994-03-18|TAKE BACK RETURN|RAIL|ual accounts! carefu|
+353|103|4|6|39|39120.90|0.02|0.05|A|F|1994-01-15|1994-03-30|1994-02-01|NONE|MAIL|losely quickly even accounts. c|
+354|50|7|1|14|13300.70|0.08|0.04|N|O|1996-04-12|1996-06-03|1996-05-08|NONE|SHIP|quickly regular grouches will eat. careful|
+354|194|8|2|24|26260.56|0.01|0.01|N|O|1996-05-08|1996-05-17|1996-06-07|DELIVER IN PERSON|AIR|y silent requests. regular, even accounts|
+354|59|10|3|50|47952.50|0.08|0.05|N|O|1996-03-21|1996-05-20|1996-04-04|COLLECT COD|TRUCK|to beans s|
+354|107|4|4|7|7049.70|0.06|0.01|N|O|1996-05-07|1996-04-18|1996-05-24|NONE|MAIL|ously idly ironic accounts-- quickl|
+354|31|2|5|18|16758.54|0.04|0.08|N|O|1996-03-31|1996-05-13|1996-04-27|DELIVER IN PERSON|RAIL| about the carefully unusual |
+354|62|1|6|36|34634.16|0.03|0.02|N|O|1996-03-19|1996-05-29|1996-03-30|NONE|AIR|onic requests thrash bold g|
+354|5|10|7|14|12670.00|0.01|0.07|N|O|1996-07-06|1996-06-08|1996-07-10|TAKE BACK RETURN|MAIL|t thinly above the ironic, |
+355|114|1|1|31|31437.41|0.09|0.07|A|F|1994-07-13|1994-08-18|1994-07-18|DELIVER IN PERSON|FOB|y unusual, ironic|
+355|97|1|2|41|40880.69|0.05|0.00|A|F|1994-08-15|1994-07-19|1994-09-06|DELIVER IN PERSON|TRUCK| deposits. carefully r|
+356|46|7|1|4|3784.16|0.10|0.01|A|F|1994-07-28|1994-08-01|1994-08-04|DELIVER IN PERSON|REG AIR| the dependencies nod unusual, final ac|
+356|108|3|2|48|48388.80|0.02|0.03|R|F|1994-08-12|1994-07-31|1994-08-26|NONE|FOB|unusual packages. furiously |
+356|119|3|3|35|35668.85|0.08|0.07|R|F|1994-10-14|1994-07-31|1994-10-23|COLLECT COD|TRUCK|s. unusual, final|
+356|56|1|4|41|39198.05|0.07|0.05|A|F|1994-09-28|1994-09-20|1994-10-07|COLLECT COD|SHIP| according to the express foxes will|
+356|125|8|5|37|37929.44|0.05|0.03|A|F|1994-07-15|1994-08-24|1994-08-09|DELIVER IN PERSON|FOB|ndencies are since the packag|
+357|114|5|1|26|26366.86|0.06|0.03|N|O|1996-12-28|1996-11-26|1997-01-13|NONE|FOB| carefully pending accounts use a|
+357|186|7|2|36|39102.48|0.07|0.06|N|O|1996-12-28|1996-11-13|1997-01-24|DELIVER IN PERSON|AIR|d the carefully even requests. |
+357|165|2|3|32|34085.12|0.05|0.07|N|O|1997-01-28|1996-12-29|1997-02-14|NONE|MAIL|y above the carefully final accounts|
+358|191|3|1|41|44738.79|0.06|0.01|A|F|1993-11-18|1993-11-14|1993-11-28|NONE|TRUCK|ely frets. furious deposits sleep |
+358|190|1|2|32|34886.08|0.05|0.08|A|F|1993-10-18|1993-12-12|1993-10-31|NONE|TRUCK|y final foxes sleep blithely sl|
+358|169|6|3|40|42766.40|0.09|0.01|A|F|1993-12-05|1993-11-04|1994-01-01|COLLECT COD|MAIL|ng the ironic theo|
+358|97|10|4|15|14956.35|0.08|0.08|A|F|1993-10-04|1993-12-17|1993-10-23|TAKE BACK RETURN|MAIL|out the blithely ironic deposits slee|
+358|29|2|5|18|16722.36|0.01|0.02|R|F|1993-10-07|1993-11-01|1993-10-26|COLLECT COD|SHIP|olphins haggle ironic accounts. f|
+358|162|3|6|32|33989.12|0.03|0.05|R|F|1993-12-21|1993-11-06|1994-01-17|DELIVER IN PERSON|RAIL|lyly express deposits |
+358|83|4|7|45|44238.60|0.05|0.02|A|F|1993-12-08|1993-10-29|1993-12-30|NONE|REG AIR|to beans. regular, unusual deposits sl|
+359|166|7|1|30|31984.80|0.00|0.08|A|F|1995-01-06|1995-02-20|1995-01-20|TAKE BACK RETURN|AIR|uses detect spec|
+359|12|9|2|18|16416.18|0.00|0.03|A|F|1995-01-27|1995-03-18|1995-01-31|DELIVER IN PERSON|RAIL|unusual warthogs. ironically sp|
+359|132|8|3|17|17546.21|0.07|0.06|A|F|1995-01-31|1995-03-18|1995-02-10|COLLECT COD|SHIP|sts according to the blithely|
+359|90|1|4|38|37623.42|0.10|0.08|R|F|1995-03-30|1995-01-20|1995-04-25|DELIVER IN PERSON|RAIL|g furiously. regular, sile|
+359|168|5|5|11|11749.76|0.01|0.03|A|F|1995-02-15|1995-01-27|1995-02-18|NONE|FOB|rets wake blithely. slyly final dep|
+359|183|4|6|23|24913.14|0.04|0.07|R|F|1995-01-31|1995-03-11|1995-02-16|DELIVER IN PERSON|REG AIR|ic courts snooze quickly furiously final fo|
+384|179|8|1|38|41008.46|0.07|0.01|R|F|1992-06-02|1992-04-18|1992-06-10|DELIVER IN PERSON|TRUCK|totes cajole blithely against the even|
+384|64|3|2|49|47238.94|0.09|0.07|A|F|1992-04-01|1992-04-25|1992-04-18|COLLECT COD|AIR|refully carefully ironic instructions. bl|
+384|182|3|3|11|11903.98|0.02|0.08|A|F|1992-04-02|1992-04-21|1992-04-15|COLLECT COD|MAIL|ash carefully|
+384|93|6|4|11|10923.99|0.00|0.06|R|F|1992-06-24|1992-05-29|1992-07-22|COLLECT COD|TRUCK|nic excuses are furiously above the blith|
+384|132|8|5|14|14449.82|0.08|0.06|R|F|1992-06-14|1992-05-29|1992-07-05|DELIVER IN PERSON|TRUCK|ckages are slyly after the slyly specia|
+385|167|6|1|7|7470.12|0.05|0.06|N|O|1996-05-23|1996-05-09|1996-06-06|DELIVER IN PERSON|REG AIR| special asymptote|
+385|54|9|2|46|43886.30|0.08|0.07|N|O|1996-03-29|1996-05-17|1996-04-18|NONE|REG AIR|lthily ironic f|
+386|153|5|1|39|41072.85|0.10|0.07|A|F|1995-05-10|1995-02-28|1995-05-25|NONE|SHIP|hely. carefully regular accounts hag|
+386|69|4|2|16|15504.96|0.06|0.01|A|F|1995-04-12|1995-04-18|1995-05-11|DELIVER IN PERSON|MAIL|lithely fluffi|
+386|131|2|3|37|38151.81|0.09|0.04|A|F|1995-05-23|1995-03-01|1995-05-25|TAKE BACK RETURN|MAIL|ending pearls breach fluffily. slyly pen|
+387|137|8|1|1|1037.13|0.08|0.03|N|O|1997-05-06|1997-04-23|1997-05-10|NONE|SHIP| pinto beans wake furiously carefu|
+387|153|4|2|42|44232.30|0.07|0.05|N|O|1997-05-25|1997-02-25|1997-05-29|DELIVER IN PERSON|RAIL|lithely final theodolites.|
+387|97|10|3|40|39883.60|0.09|0.02|N|O|1997-03-08|1997-04-18|1997-03-31|COLLECT COD|TRUCK| quickly ironic platelets are slyly. fluff|
+387|56|7|4|19|18164.95|0.08|0.00|N|O|1997-03-14|1997-04-21|1997-04-04|NONE|REG AIR|gular dependencies|
+387|149|6|5|32|33572.48|0.08|0.06|N|O|1997-05-02|1997-04-11|1997-05-11|DELIVER IN PERSON|TRUCK|gle. silent, fur|
+388|33|9|1|42|39187.26|0.05|0.06|R|F|1993-02-21|1993-02-26|1993-03-15|COLLECT COD|FOB|accounts sleep furiously|
+388|128|9|2|46|47293.52|0.07|0.01|A|F|1993-03-22|1993-01-26|1993-03-24|COLLECT COD|FOB|to beans nag about the careful reque|
+388|65|2|3|40|38602.40|0.06|0.01|A|F|1992-12-24|1993-01-28|1993-01-19|TAKE BACK RETURN|REG AIR|quests against the carefully unusual epi|
+389|190|1|1|2|2180.38|0.09|0.00|R|F|1994-04-13|1994-04-10|1994-04-25|TAKE BACK RETURN|RAIL|fts. courts eat blithely even dependenc|
+390|107|10|1|10|10071.00|0.02|0.05|N|O|1998-05-26|1998-07-06|1998-06-23|TAKE BACK RETURN|SHIP| requests. final accounts x-ray beside the|
+390|124|7|2|17|17410.04|0.09|0.06|N|O|1998-06-07|1998-06-14|1998-07-07|COLLECT COD|SHIP|ending, pending pinto beans wake slyl|
+390|184|5|3|46|49872.28|0.07|0.04|N|O|1998-06-06|1998-05-20|1998-06-14|DELIVER IN PERSON|SHIP|cial excuses. bold, pending packages|
+390|142|3|4|42|43769.88|0.01|0.05|N|O|1998-06-06|1998-06-22|1998-07-05|COLLECT COD|SHIP|counts nag across the sly, sil|
+390|128|3|5|13|13365.56|0.02|0.06|N|O|1998-07-08|1998-05-10|1998-07-18|DELIVER IN PERSON|SHIP|sleep carefully idle packages. blithely |
+390|125|4|6|11|11276.32|0.09|0.06|N|O|1998-05-05|1998-05-15|1998-06-01|DELIVER IN PERSON|SHIP|according to the foxes are furiously |
+390|85|6|7|24|23641.92|0.05|0.02|N|O|1998-04-18|1998-05-19|1998-04-28|TAKE BACK RETURN|AIR|y. enticingly final depos|
+391|122|1|1|14|14309.68|0.09|0.02|R|F|1995-02-11|1995-02-03|1995-02-13|TAKE BACK RETURN|TRUCK| escapades sleep furiously about |
+416|94|6|1|25|24852.25|0.00|0.05|A|F|1993-10-11|1993-11-26|1993-10-21|DELIVER IN PERSON|TRUCK|y final theodolites about|
+416|111|1|2|22|22244.42|0.10|0.00|R|F|1993-12-27|1993-12-17|1994-01-09|COLLECT COD|RAIL|rint blithely above the pending sentim|
+416|175|5|3|25|26879.25|0.07|0.01|R|F|1993-10-16|1993-12-03|1993-10-29|NONE|AIR|ses boost after the bold requests.|
+417|40|1|1|39|36661.56|0.01|0.02|A|F|1994-05-31|1994-05-02|1994-06-06|NONE|SHIP|y regular requests wake along |
+417|70|7|2|18|17461.26|0.00|0.01|R|F|1994-03-29|1994-04-10|1994-04-26|TAKE BACK RETURN|FOB|- final requests sle|
+417|45|2|3|41|38746.64|0.10|0.01|R|F|1994-04-11|1994-03-08|1994-05-06|COLLECT COD|RAIL|tes. regular requests across the |
+417|132|3|4|2|2064.26|0.01|0.03|R|F|1994-02-13|1994-04-19|1994-03-15|DELIVER IN PERSON|SHIP|uriously bol|
+418|19|3|1|31|28489.31|0.00|0.03|N|F|1995-06-05|1995-06-18|1995-06-26|COLLECT COD|FOB|final theodolites. fluffil|
+418|2|5|2|1|902.00|0.04|0.07|N|O|1995-06-23|1995-06-16|1995-07-23|DELIVER IN PERSON|AIR|regular, silent pinto|
+418|35|1|3|3|2805.09|0.04|0.06|N|O|1995-06-29|1995-07-12|1995-07-01|COLLECT COD|AIR|ly furiously regular w|
+419|153|8|1|33|34753.95|0.05|0.02|N|O|1996-11-06|1996-12-25|1996-11-20|TAKE BACK RETURN|TRUCK|y above the bli|
+419|65|2|2|32|30881.92|0.01|0.06|N|O|1996-12-04|1996-12-04|1996-12-24|COLLECT COD|SHIP|blithely regular requests. special pinto|
+419|71|1|3|15|14566.05|0.07|0.04|N|O|1996-12-17|1996-11-28|1996-12-19|TAKE BACK RETURN|REG AIR| sleep final, regular theodolites. fluffi|
+419|9|6|4|15|13635.00|0.01|0.02|N|O|1997-01-09|1996-12-22|1997-01-25|COLLECT COD|FOB|of the careful, thin theodolites. quickly s|
+419|149|2|5|17|17835.38|0.01|0.00|N|O|1997-01-13|1996-12-20|1997-02-01|COLLECT COD|REG AIR|lar dependencies: carefully regu|
+420|101|6|1|5|5005.50|0.04|0.03|N|O|1995-11-04|1996-01-02|1995-11-30|NONE|REG AIR|cajole blit|
+420|162|7|2|22|23367.52|0.05|0.04|N|O|1996-01-25|1995-12-16|1996-02-03|TAKE BACK RETURN|AIR|ly against the blithely re|
+420|48|1|3|45|42661.80|0.09|0.08|N|O|1996-01-14|1996-01-01|1996-01-26|COLLECT COD|FOB| final accounts. furiously express forges|
+420|75|6|4|12|11700.84|0.08|0.08|N|O|1996-02-05|1996-01-03|1996-02-12|TAKE BACK RETURN|REG AIR|c instructions are |
+420|73|2|5|37|36003.59|0.02|0.00|N|O|1995-11-16|1995-12-13|1995-11-19|DELIVER IN PERSON|SHIP|rbits. bold requests along the quickl|
+420|124|7|6|40|40964.80|0.01|0.05|N|O|1995-11-26|1995-12-26|1995-12-20|TAKE BACK RETURN|FOB| after the special|
+420|16|7|7|39|35724.39|0.00|0.08|N|O|1995-12-09|1995-12-16|1995-12-31|DELIVER IN PERSON|REG AIR|s. ironic waters about the car|
+421|134|5|1|1|1034.13|0.02|0.07|R|F|1992-05-29|1992-04-27|1992-06-09|NONE|TRUCK|oldly busy deposit|
+422|152|10|1|25|26303.75|0.10|0.07|N|O|1997-07-01|1997-08-17|1997-07-09|DELIVER IN PERSON|SHIP|carefully bold theodolit|
+422|171|1|2|10|10711.70|0.02|0.03|N|O|1997-06-15|1997-08-04|1997-07-08|TAKE BACK RETURN|AIR|he furiously ironic theodolite|
+422|176|4|3|46|49503.82|0.09|0.00|N|O|1997-06-21|1997-07-14|1997-06-27|DELIVER IN PERSON|RAIL| ideas. qu|
+422|162|7|4|25|26554.00|0.10|0.04|N|O|1997-08-24|1997-07-09|1997-09-22|NONE|FOB|ep along the furiousl|
+423|132|3|1|27|27867.51|0.06|0.03|N|O|1996-08-20|1996-08-01|1996-08-23|TAKE BACK RETURN|SHIP|ccounts. blithely regular pack|
+448|126|7|1|4|4104.48|0.00|0.04|N|O|1995-11-25|1995-10-20|1995-11-26|TAKE BACK RETURN|MAIL|nts thrash quickly among the b|
+448|173|1|2|46|49365.82|0.05|0.00|N|O|1995-08-31|1995-09-30|1995-09-09|COLLECT COD|SHIP| to the fluffily ironic packages.|
+448|27|6|3|35|32445.70|0.10|0.08|N|O|1995-09-27|1995-11-19|1995-10-20|COLLECT COD|REG AIR|ses nag quickly quickly ir|
+448|170|1|4|8|8561.36|0.10|0.00|N|O|1995-11-02|1995-10-16|1995-11-15|COLLECT COD|TRUCK|ounts wake blithely. furiously pending|
+448|138|9|5|23|23876.99|0.02|0.05|N|O|1995-09-26|1995-11-02|1995-10-17|NONE|SHIP|ious, final gifts|
+449|152|7|1|12|12625.80|0.02|0.08|N|O|1995-11-06|1995-08-25|1995-11-18|TAKE BACK RETURN|SHIP|ly. blithely ironic |
+449|109|6|2|4|4036.40|0.10|0.06|N|O|1995-10-27|1995-09-14|1995-11-21|DELIVER IN PERSON|FOB|are fluffily. requests are furiously|
+449|10|1|3|3|2730.03|0.07|0.08|N|O|1995-07-28|1995-09-11|1995-08-01|NONE|RAIL| bold deposits. express theodolites haggle|
+449|158|3|4|22|23279.30|0.07|0.00|N|O|1995-08-17|1995-09-04|1995-09-10|COLLECT COD|FOB|furiously final theodolites eat careful|
+450|162|7|1|42|44610.72|0.03|0.00|N|F|1995-06-07|1995-05-29|1995-06-23|TAKE BACK RETURN|SHIP|y asymptotes. regular depen|
+450|107|8|2|5|5035.50|0.03|0.02|A|F|1995-04-02|1995-05-06|1995-04-13|TAKE BACK RETURN|TRUCK|the pinto bea|
+450|143|6|3|32|33380.48|0.06|0.03|N|O|1995-07-02|1995-04-25|1995-07-30|TAKE BACK RETURN|SHIP| accounts nod fluffily even, pending|
+450|57|9|4|40|38282.00|0.05|0.03|R|F|1995-03-20|1995-05-25|1995-04-14|NONE|RAIL|ve. asymptote|
+450|79|10|5|2|1958.14|0.09|0.00|A|F|1995-03-11|1995-05-21|1995-03-16|COLLECT COD|AIR|y even pinto beans; qui|
+450|153|1|6|33|34753.95|0.08|0.05|R|F|1995-05-18|1995-05-22|1995-05-23|TAKE BACK RETURN|REG AIR|ily carefully final depo|
+451|130|9|1|36|37084.68|0.02|0.06|N|O|1998-06-18|1998-08-14|1998-06-20|TAKE BACK RETURN|AIR|rges can haggle carefully ironic, dogged |
+451|33|4|2|42|39187.26|0.05|0.01|N|O|1998-08-01|1998-08-05|1998-08-30|DELIVER IN PERSON|TRUCK|express excuses. blithely ironic pin|
+451|87|8|3|1|987.08|0.07|0.05|N|O|1998-07-13|1998-07-03|1998-08-04|DELIVER IN PERSON|AIR| carefully ironic packages solve furiously |
+451|77|5|4|28|27357.96|0.04|0.05|N|O|1998-06-16|1998-07-09|1998-06-17|DELIVER IN PERSON|SHIP| theodolites. even cou|
+452|115|6|1|2|2030.22|0.04|0.03|N|O|1997-12-26|1998-01-03|1998-01-12|COLLECT COD|FOB|y express instru|
+453|198|1|1|45|49418.55|0.01|0.00|N|O|1997-06-30|1997-08-20|1997-07-19|COLLECT COD|REG AIR|ifts wake carefully.|
+453|176|4|2|38|40894.46|0.08|0.04|N|O|1997-06-30|1997-07-08|1997-07-16|DELIVER IN PERSON|REG AIR| furiously f|
+453|14|1|3|38|34732.38|0.10|0.01|N|O|1997-08-10|1997-07-24|1997-09-07|NONE|SHIP|sts cajole. furiously un|
+453|96|7|4|45|44824.05|0.10|0.01|N|O|1997-09-18|1997-06-29|1997-10-14|TAKE BACK RETURN|AIR|ironic foxes. slyly pending depos|
+453|26|1|5|32|29632.64|0.04|0.01|N|O|1997-07-15|1997-06-27|1997-07-18|NONE|REG AIR|s. fluffily bold packages cajole. unu|
+453|95|7|6|28|27862.52|0.07|0.07|N|O|1997-08-16|1997-08-12|1997-08-27|NONE|MAIL|final dependencies. slyly special pl|
+454|118|8|1|24|24434.64|0.06|0.01|N|O|1996-04-26|1996-03-23|1996-05-20|NONE|TRUCK|le. deposits after the ideas nag unusual pa|
+455|157|9|1|42|44400.30|0.10|0.02|N|O|1997-01-26|1997-01-10|1997-02-22|DELIVER IN PERSON|REG AIR|around the quickly blit|
+455|28|9|2|44|40832.88|0.05|0.08|N|O|1997-01-17|1997-02-22|1997-02-12|TAKE BACK RETURN|TRUCK| accounts sleep slyly ironic asymptote|
+455|49|2|3|45|42706.80|0.04|0.06|N|O|1996-12-20|1997-01-31|1997-01-07|TAKE BACK RETURN|SHIP|thrash ironically regular packages. qui|
+455|171|9|4|11|11782.87|0.01|0.02|N|O|1997-03-15|1997-02-14|1997-03-26|DELIVER IN PERSON|MAIL|g deposits against the slyly idle foxes u|
+480|53|4|1|22|20967.10|0.04|0.02|A|F|1993-06-16|1993-07-28|1993-07-09|NONE|MAIL|into beans cajole furiously. accounts s|
+481|19|9|1|17|15623.17|0.07|0.05|A|F|1992-10-21|1992-12-09|1992-11-19|DELIVER IN PERSON|MAIL|. quickly final accounts among the |
+481|21|2|2|19|17499.38|0.08|0.01|R|F|1993-01-09|1992-11-27|1993-01-14|TAKE BACK RETURN|AIR|p blithely after t|
+481|186|7|3|42|45619.56|0.08|0.08|A|F|1992-11-27|1992-11-11|1992-12-08|COLLECT COD|RAIL|mptotes are furiously among the iron|
+481|82|3|4|11|10802.88|0.05|0.06|A|F|1993-01-12|1992-11-17|1993-02-05|NONE|FOB|eful attai|
+481|112|9|5|31|31375.41|0.05|0.01|A|F|1993-01-15|1992-12-31|1993-01-21|DELIVER IN PERSON|AIR|usly final packages believe. quick|
+482|138|9|1|32|33220.16|0.00|0.02|N|O|1996-05-22|1996-05-14|1996-05-29|NONE|SHIP|usual deposits affix against |
+482|122|5|2|1|1022.12|0.05|0.08|N|O|1996-05-29|1996-05-20|1996-05-31|COLLECT COD|AIR|es. quickly ironic escapades sleep furious|
+482|62|9|3|31|29823.86|0.04|0.03|N|O|1996-06-01|1996-05-06|1996-06-17|NONE|MAIL| blithe pin|
+482|196|7|4|8|8769.52|0.02|0.05|N|O|1996-04-19|1996-05-05|1996-04-21|NONE|TRUCK|tructions near the final, regular ideas de|
+482|39|10|5|46|43195.38|0.01|0.06|N|O|1996-07-19|1996-06-05|1996-08-10|NONE|MAIL|furiously thin realms. final, fina|
+482|79|10|6|19|18602.33|0.04|0.00|N|O|1996-03-27|1996-04-25|1996-04-15|NONE|FOB|ts hinder carefully silent requests|
+483|33|9|1|8|7464.24|0.00|0.08|N|O|1995-08-22|1995-08-23|1995-09-18|COLLECT COD|RAIL|osits. carefully fin|
+483|80|1|2|23|22541.84|0.04|0.06|N|O|1995-07-20|1995-08-11|1995-08-04|DELIVER IN PERSON|MAIL|requests was quickly against th|
+483|88|9|3|9|8892.72|0.04|0.03|N|O|1995-09-10|1995-09-02|1995-09-13|NONE|AIR| carefully express ins|
+484|31|2|1|49|45620.47|0.10|0.02|N|O|1997-03-06|1997-02-28|1997-03-23|COLLECT COD|TRUCK|ven accounts|
+484|32|8|2|45|41941.35|0.06|0.07|N|O|1997-04-09|1997-03-20|1997-04-19|DELIVER IN PERSON|TRUCK|usly final excuses boost slyly blithe|
+484|184|5|3|50|54209.00|0.06|0.05|N|O|1997-01-24|1997-03-27|1997-02-22|DELIVER IN PERSON|MAIL|uctions wake. final, silent requests haggle|
+484|165|6|4|22|23433.52|0.07|0.03|N|O|1997-04-29|1997-03-26|1997-05-17|TAKE BACK RETURN|SHIP|es are pending instructions. furiously unu|
+484|77|6|5|48|46899.36|0.00|0.05|N|O|1997-03-05|1997-02-08|1997-03-22|TAKE BACK RETURN|MAIL|l, bold packages? even mult|
+484|97|9|6|10|9970.90|0.01|0.08|N|O|1997-04-06|1997-02-14|1997-04-16|COLLECT COD|FOB|x fluffily carefully regular|
+485|150|1|1|50|52507.50|0.01|0.00|N|O|1997-03-28|1997-05-26|1997-04-18|TAKE BACK RETURN|MAIL|iously quick excuses. carefully final f|
+485|28|7|2|40|37120.80|0.08|0.01|N|O|1997-04-29|1997-05-08|1997-04-30|TAKE BACK RETURN|TRUCK|al escapades|
+485|137|3|3|22|22816.86|0.00|0.05|N|O|1997-04-06|1997-04-27|1997-05-01|DELIVER IN PERSON|TRUCK|refully final notornis haggle according |
+486|76|7|1|36|35138.52|0.00|0.01|N|O|1996-06-25|1996-05-06|1996-07-07|COLLECT COD|AIR|deposits around the quickly regular packa|
+486|68|9|2|40|38722.40|0.03|0.08|N|O|1996-05-21|1996-06-06|1996-06-07|COLLECT COD|SHIP|ts nag quickly among the slyl|
+486|136|2|3|26|26939.38|0.04|0.03|N|O|1996-03-16|1996-05-25|1996-03-31|NONE|RAIL|forges along the |
+486|72|1|4|38|36938.66|0.08|0.05|N|O|1996-05-07|1996-04-26|1996-05-26|TAKE BACK RETURN|TRUCK| blithely final pinto |
+486|29|2|5|3|2787.06|0.07|0.05|N|O|1996-07-07|1996-04-20|1996-07-23|DELIVER IN PERSON|RAIL|ccounts ha|
+486|47|4|6|46|43563.84|0.00|0.03|N|O|1996-04-18|1996-05-02|1996-04-20|COLLECT COD|AIR|theodolites eat carefully furious|
+487|92|3|1|47|46628.23|0.06|0.06|R|F|1992-09-30|1992-10-08|1992-10-24|NONE|TRUCK|tions. blithely reg|
+487|83|4|2|2|1966.16|0.02|0.06|R|F|1992-10-19|1992-11-04|1992-11-11|COLLECT COD|TRUCK|oss the unusual pinto beans. reg|
+512|189|10|1|19|20694.42|0.08|0.05|N|O|1995-07-12|1995-07-11|1995-08-04|COLLECT COD|MAIL| sleep. requests alongside of the fluff|
+512|23|2|2|37|34151.74|0.01|0.04|N|O|1995-06-20|1995-07-05|1995-07-16|NONE|RAIL|nic depths cajole? blithely b|
+512|180|1|3|40|43207.20|0.05|0.02|N|O|1995-07-06|1995-07-08|1995-07-08|COLLECT COD|TRUCK|quests are da|
+512|83|4|4|10|9830.80|0.09|0.02|N|O|1995-09-16|1995-07-29|1995-10-07|NONE|AIR|xes. pinto beans cajole carefully; |
+512|65|6|5|6|5790.36|0.03|0.05|R|F|1995-06-10|1995-06-21|1995-06-16|DELIVER IN PERSON|FOB|en ideas haggle |
+512|33|9|6|12|11196.36|0.04|0.00|R|F|1995-05-21|1995-08-03|1995-06-09|COLLECT COD|FOB|old furiously express deposits. specia|
+512|51|9|7|2|1902.10|0.09|0.08|N|O|1995-06-19|1995-08-13|1995-06-24|NONE|TRUCK|e slyly silent accounts serve with|
+513|62|7|1|20|19241.20|0.09|0.07|N|O|1995-07-12|1995-05-31|1995-07-31|NONE|AIR|efully ironic ideas doze slyl|
+513|122|5|2|44|44973.28|0.01|0.01|N|O|1995-07-14|1995-07-14|1995-08-12|NONE|MAIL|kages sleep boldly ironic theodolites. acco|
+514|79|9|1|21|20560.47|0.06|0.02|N|O|1996-06-09|1996-05-15|1996-07-07|DELIVER IN PERSON|RAIL|s sleep quickly blithely|
+514|118|2|2|34|34615.74|0.08|0.02|N|O|1996-04-14|1996-06-03|1996-04-23|COLLECT COD|REG AIR|ily even patterns. bold, silent instruc|
+514|13|7|3|6|5478.06|0.06|0.01|N|O|1996-05-30|1996-06-04|1996-06-28|COLLECT COD|SHIP|as haggle blithely; quickly s|
+514|116|7|4|43|43692.73|0.00|0.08|N|O|1996-06-07|1996-05-14|1996-07-01|TAKE BACK RETURN|FOB|thely regular |
+515|105|8|1|10|10051.00|0.03|0.02|A|F|1993-10-04|1993-11-03|1993-10-08|NONE|FOB|ar deposits th|
+515|148|1|2|38|39829.32|0.10|0.07|A|F|1993-09-19|1993-11-12|1993-10-03|DELIVER IN PERSON|SHIP|ays. furiously express requests haggle furi|
+515|183|4|3|11|11914.98|0.00|0.02|R|F|1993-09-04|1993-10-02|1993-09-05|DELIVER IN PERSON|FOB|ly pending accounts haggle blithel|
+515|109|10|4|34|34309.40|0.09|0.03|R|F|1993-10-03|1993-10-26|1993-10-15|DELIVER IN PERSON|REG AIR|ic dependencie|
+515|131|7|5|32|32996.16|0.01|0.07|R|F|1993-10-10|1993-10-08|1993-11-02|TAKE BACK RETURN|FOB|r sauternes boost. final theodolites wake a|
+515|109|4|6|25|25227.50|0.04|0.08|R|F|1993-11-14|1993-11-07|1993-12-03|DELIVER IN PERSON|MAIL|e packages engag|
+516|25|4|1|11|10175.22|0.01|0.06|N|O|1998-05-02|1998-05-23|1998-05-12|DELIVER IN PERSON|FOB|ongside of the blithely final reque|
+517|45|6|1|28|26461.12|0.03|0.02|N|O|1997-04-30|1997-05-18|1997-05-17|COLLECT COD|MAIL| requests. special, fi|
+517|156|4|2|15|15842.25|0.02|0.00|N|O|1997-04-09|1997-06-26|1997-05-01|NONE|TRUCK| slyly. express requests ar|
+517|41|8|3|9|8469.36|0.04|0.00|N|O|1997-05-03|1997-06-16|1997-05-24|COLLECT COD|SHIP| slyly stealthily express instructions. |
+517|133|4|4|11|11364.43|0.06|0.02|N|O|1997-06-20|1997-06-01|1997-06-27|NONE|REG AIR|ly throughout the fu|
+517|24|3|5|23|21252.46|0.00|0.01|N|O|1997-04-19|1997-05-07|1997-05-12|COLLECT COD|RAIL| kindle. furiously bold requests mus|
+518|165|6|1|30|31954.80|0.07|0.05|N|O|1998-02-18|1998-03-27|1998-03-16|COLLECT COD|TRUCK|slyly by the packages. carefull|
+518|84|5|2|23|22633.84|0.05|0.07|N|O|1998-02-20|1998-05-05|1998-03-11|COLLECT COD|TRUCK| special requests. fluffily ironic re|
+518|134|5|3|12|12409.56|0.01|0.06|N|O|1998-03-08|1998-03-31|1998-04-06|NONE|AIR| packages thrash slyly|
+518|122|3|4|46|47017.52|0.07|0.02|N|O|1998-04-07|1998-04-17|1998-04-29|NONE|MAIL|. blithely even ideas cajole furiously. b|
+518|71|2|5|16|15537.12|0.01|0.01|N|O|1998-03-15|1998-03-24|1998-04-08|NONE|MAIL|use quickly expre|
+518|197|10|6|39|42790.41|0.09|0.08|N|O|1998-02-26|1998-03-17|1998-03-21|DELIVER IN PERSON|FOB| the bold, special deposits are carefully |
+518|186|7|7|48|52136.64|0.03|0.07|N|O|1998-03-06|1998-04-22|1998-03-14|NONE|FOB| slyly final platelets; quickly even deposi|
+519|159|4|1|1|1059.15|0.07|0.07|N|O|1997-12-01|1998-01-26|1997-12-23|COLLECT COD|REG AIR|bold requests believe furiou|
+519|3|4|2|38|34314.00|0.05|0.08|N|O|1998-02-19|1997-12-15|1998-03-19|DELIVER IN PERSON|FOB|gular excuses detect quickly furiously |
+519|106|1|3|19|19115.90|0.00|0.02|N|O|1998-01-09|1998-01-03|1998-02-06|COLLECT COD|AIR|asymptotes. p|
+519|47|6|4|27|25570.08|0.08|0.06|N|O|1997-11-20|1997-12-06|1997-12-16|DELIVER IN PERSON|REG AIR|le. even, final dependencies|
+519|10|5|5|13|11830.13|0.06|0.08|N|O|1998-02-06|1997-12-02|1998-03-03|TAKE BACK RETURN|TRUCK|c accounts wake along the ironic so|
+519|151|6|6|3|3153.45|0.04|0.00|N|O|1998-02-01|1998-01-25|1998-02-27|TAKE BACK RETURN|FOB|erve blithely blithely ironic asymp|
+544|139|10|1|47|48839.11|0.08|0.06|R|F|1993-03-14|1993-03-27|1993-03-27|COLLECT COD|SHIP|ecial pains. deposits grow foxes. |
+545|170|1|1|4|4280.68|0.02|0.00|N|O|1996-02-23|1995-12-16|1996-03-21|DELIVER IN PERSON|FOB|, ironic grouches cajole over|
+545|171|10|2|18|19281.06|0.00|0.00|N|O|1996-02-21|1996-01-17|1996-02-26|NONE|RAIL|al, final packages affix. even a|
+546|85|6|1|16|15761.28|0.08|0.02|N|O|1997-02-04|1996-12-30|1997-02-25|DELIVER IN PERSON|TRUCK|de of the orbits. sometimes regula|
+547|71|10|1|44|42727.08|0.08|0.08|N|O|1996-10-18|1996-08-17|1996-10-27|TAKE BACK RETURN|FOB|thely express dependencies. qu|
+547|137|8|2|48|49782.24|0.01|0.04|N|O|1996-10-21|1996-08-04|1996-11-20|COLLECT COD|SHIP|thely specia|
+547|182|3|3|3|3246.54|0.05|0.02|N|O|1996-09-04|1996-08-01|1996-09-21|COLLECT COD|SHIP|pinto beans. ironi|
+548|197|8|1|2|2194.38|0.06|0.05|A|F|1994-11-26|1994-11-06|1994-12-06|COLLECT COD|MAIL|ests haggle quickly eve|
+548|5|6|2|6|5430.00|0.00|0.08|A|F|1995-01-18|1994-12-08|1995-02-10|NONE|TRUCK|sits wake furiously regular|
+548|1|8|3|21|18921.00|0.03|0.08|A|F|1995-01-13|1994-12-18|1995-01-25|NONE|AIR|ideas. special accounts above the furiou|
+548|57|9|4|21|20098.05|0.08|0.03|A|F|1994-10-27|1994-12-04|1994-11-21|DELIVER IN PERSON|AIR| engage quickly. regular theo|
+548|93|7|5|19|18868.71|0.00|0.02|A|F|1994-09-24|1994-11-24|1994-10-01|DELIVER IN PERSON|MAIL|courts boost care|
+548|153|8|6|32|33700.80|0.06|0.04|A|F|1994-12-16|1994-11-20|1994-12-29|NONE|REG AIR|c instruction|
+549|196|9|1|18|19731.42|0.07|0.04|R|F|1992-10-19|1992-08-12|1992-11-13|COLLECT COD|REG AIR|furiously according to the ironic, regular |
+549|189|10|2|38|41388.84|0.07|0.05|A|F|1992-08-17|1992-08-28|1992-09-05|COLLECT COD|RAIL|the regular, furious excuses. carefu|
+549|66|7|3|36|34778.16|0.08|0.04|R|F|1992-09-11|1992-10-11|1992-09-12|DELIVER IN PERSON|AIR|ts against the ironic, even theodolites eng|
+549|21|4|4|18|16578.36|0.09|0.01|A|F|1992-07-31|1992-09-11|1992-08-08|NONE|RAIL|ely regular accounts above the |
+549|24|7|5|38|35112.76|0.06|0.02|R|F|1992-08-23|1992-08-12|1992-08-25|COLLECT COD|REG AIR|eposits. carefully regular depos|
+550|191|3|1|31|33826.89|0.04|0.02|N|O|1995-10-24|1995-09-27|1995-11-04|COLLECT COD|AIR|thely silent packages. unusual|
+551|24|9|1|8|7392.16|0.08|0.02|N|O|1995-07-29|1995-07-18|1995-08-02|NONE|REG AIR| wake quickly slyly pending platel|
+551|159|4|2|20|21183.00|0.00|0.07|N|O|1995-09-18|1995-08-25|1995-10-11|COLLECT COD|TRUCK|r ideas. final, even ideas hinder alongside|
+551|162|9|3|16|16994.56|0.07|0.06|N|O|1995-07-29|1995-08-19|1995-08-10|COLLECT COD|MAIL|y along the carefully ex|
+576|87|8|1|2|1974.16|0.07|0.01|N|O|1997-05-15|1997-06-30|1997-05-28|NONE|RAIL|ccounts along the ac|
+576|34|5|2|6|5604.18|0.06|0.05|N|O|1997-05-15|1997-07-26|1997-06-03|DELIVER IN PERSON|TRUCK|al deposits. slyly even sauternes a|
+576|37|3|3|6|5622.18|0.08|0.07|N|O|1997-08-28|1997-06-16|1997-09-25|DELIVER IN PERSON|FOB|ts. ironic multipliers |
+576|138|9|4|5|5190.65|0.03|0.07|N|O|1997-06-11|1997-06-17|1997-07-05|NONE|REG AIR|l foxes boost slyly. accounts af|
+577|26|5|1|25|23150.50|0.06|0.01|A|F|1995-04-09|1995-02-20|1995-05-09|TAKE BACK RETURN|AIR|ve slyly of the frets. careful|
+577|64|1|2|14|13496.84|0.08|0.03|R|F|1995-03-19|1995-02-25|1995-04-09|DELIVER IN PERSON|RAIL|l accounts wake deposits. ironic packa|
+578|156|7|1|40|42246.00|0.02|0.08|N|O|1997-02-10|1997-03-18|1997-02-11|NONE|SHIP|usly even platel|
+578|188|9|2|23|25028.14|0.05|0.08|N|O|1997-03-06|1997-03-03|1997-03-20|TAKE BACK RETURN|FOB|nstructions. ironic deposits|
+579|151|6|1|9|9460.35|0.00|0.05|N|O|1998-06-20|1998-04-28|1998-07-19|DELIVER IN PERSON|RAIL|e ironic, express deposits are furiously|
+579|33|4|2|39|36388.17|0.02|0.01|N|O|1998-06-21|1998-06-03|1998-06-26|COLLECT COD|REG AIR|ncies. furiously final r|
+579|60|5|3|6|5760.36|0.03|0.00|N|O|1998-04-24|1998-05-03|1998-05-08|TAKE BACK RETURN|TRUCK|ickly final requests-- bold accou|
+579|7|10|4|41|37187.00|0.04|0.05|N|O|1998-05-28|1998-05-01|1998-06-04|COLLECT COD|REG AIR|bold, express requests sublate slyly. blith|
+579|13|7|5|28|25564.28|0.00|0.03|N|O|1998-07-10|1998-05-24|1998-07-19|NONE|RAIL|ic ideas until th|
+579|167|6|6|5|5335.80|0.05|0.08|N|O|1998-05-02|1998-04-25|1998-05-05|COLLECT COD|REG AIR|refully silent ideas cajole furious|
+580|85|6|1|33|32507.64|0.03|0.05|N|O|1997-10-11|1997-09-19|1997-10-16|TAKE BACK RETURN|FOB|y express theodolites cajole carefully |
+580|174|5|2|31|33299.27|0.04|0.08|N|O|1997-10-04|1997-09-08|1997-10-15|COLLECT COD|FOB|ose alongside of the sl|
+580|185|6|3|19|20618.42|0.04|0.04|N|O|1997-07-23|1997-09-21|1997-08-15|NONE|FOB|mong the special packag|
+581|64|1|1|41|39526.46|0.09|0.07|N|O|1997-05-26|1997-04-06|1997-06-10|TAKE BACK RETURN|MAIL|nts. quickly|
+581|93|5|2|14|13903.26|0.06|0.08|N|O|1997-05-17|1997-04-14|1997-06-08|NONE|MAIL|. deposits s|
+581|101|6|3|49|49053.90|0.10|0.02|N|O|1997-02-27|1997-04-24|1997-03-10|TAKE BACK RETURN|MAIL|. slyly regular pinto beans acr|
+581|75|4|4|30|29252.10|0.10|0.08|N|O|1997-06-19|1997-05-21|1997-06-22|TAKE BACK RETURN|TRUCK| regular ideas grow furio|
+582|57|9|1|7|6699.35|0.07|0.00|N|O|1997-11-16|1997-11-29|1997-12-10|TAKE BACK RETURN|FOB|ithely unusual t|
+582|51|2|2|49|46601.45|0.05|0.03|N|O|1997-12-17|1998-01-12|1997-12-31|COLLECT COD|REG AIR|nts according to the furiously regular pin|
+582|141|4|3|42|43727.88|0.07|0.00|N|O|1997-11-15|1997-12-21|1997-12-03|COLLECT COD|SHIP|iously beside the silent de|
+582|168|9|4|36|38453.76|0.06|0.01|N|O|1997-12-09|1997-11-27|1997-12-26|TAKE BACK RETURN|SHIP|lar requests. quickly |
+583|145|6|1|1|1045.14|0.07|0.07|N|O|1997-06-17|1997-04-29|1997-06-28|NONE|TRUCK| regular, regular ideas. even, bra|
+583|120|4|2|47|47945.64|0.10|0.06|N|O|1997-07-14|1997-05-12|1997-08-11|DELIVER IN PERSON|AIR|nts are fluffily. furiously even re|
+583|130|5|3|34|35024.42|0.01|0.02|N|O|1997-05-11|1997-04-24|1997-06-03|DELIVER IN PERSON|MAIL|express req|
+583|142|1|4|33|34390.62|0.10|0.01|N|O|1997-05-28|1997-04-25|1997-06-24|NONE|AIR|kages cajole slyly across the|
+583|189|10|5|13|14159.34|0.04|0.06|N|O|1997-06-23|1997-05-29|1997-07-08|COLLECT COD|TRUCK|y sly theodolites. ironi|
+608|154|6|1|19|20028.85|0.08|0.06|N|O|1996-04-19|1996-05-02|1996-05-03|DELIVER IN PERSON|RAIL|ideas. the|
+608|198|1|2|40|43927.60|0.03|0.01|N|O|1996-05-21|1996-04-11|1996-06-02|NONE|AIR| alongside of the regular tithes. sly|
+609|66|5|1|21|20287.26|0.01|0.05|R|F|1994-08-24|1994-08-23|1994-08-27|DELIVER IN PERSON|FOB|de of the special warthogs. excu|
+610|111|8|1|49|49544.39|0.10|0.07|N|O|1995-08-29|1995-10-26|1995-09-12|TAKE BACK RETURN|SHIP|ular instruc|
+610|68|3|2|11|10648.66|0.07|0.08|N|O|1995-10-31|1995-10-25|1995-11-18|NONE|MAIL|blithely final |
+610|118|9|3|26|26470.86|0.09|0.04|N|O|1995-11-22|1995-09-09|1995-12-04|TAKE BACK RETURN|AIR|cross the furiously even theodolites sl|
+610|186|7|4|17|18465.06|0.03|0.03|N|O|1995-11-01|1995-10-30|1995-11-04|COLLECT COD|FOB|p quickly instead of the slyly pending foxe|
+610|146|7|5|39|40799.46|0.08|0.05|N|O|1995-10-30|1995-10-21|1995-11-11|TAKE BACK RETURN|REG AIR|counts. ironic warhorses are |
+610|95|7|6|5|4975.45|0.00|0.07|N|O|1995-08-11|1995-10-22|1995-08-26|TAKE BACK RETURN|FOB|n pinto beans. iro|
+610|190|1|7|27|29435.13|0.06|0.03|N|O|1995-09-02|1995-09-19|1995-09-15|NONE|REG AIR| ironic pinto beans haggle. blithe|
+611|17|7|1|39|35763.39|0.05|0.06|R|F|1993-05-06|1993-04-09|1993-05-22|TAKE BACK RETURN|SHIP|nto beans |
+611|81|2|2|1|981.08|0.08|0.07|R|F|1993-05-17|1993-02-26|1993-06-15|DELIVER IN PERSON|MAIL|ts. pending platelets aff|
+611|120|4|3|39|39784.68|0.09|0.02|A|F|1993-03-10|1993-03-10|1993-03-17|TAKE BACK RETURN|TRUCK|the evenly bold requests. furious|
+612|185|6|1|5|5425.90|0.07|0.00|R|F|1992-11-08|1992-11-20|1992-12-03|TAKE BACK RETURN|RAIL|structions. q|
+612|195|7|2|28|30665.32|0.07|0.06|R|F|1993-01-02|1992-12-11|1993-01-30|DELIVER IN PERSON|TRUCK|regular instructions affix bl|
+612|67|4|3|49|47385.94|0.00|0.08|A|F|1993-01-08|1992-11-25|1993-01-17|TAKE BACK RETURN|REG AIR|theodolite|
+612|39|5|4|28|26292.84|0.05|0.00|A|F|1992-11-12|1992-12-05|1992-12-02|TAKE BACK RETURN|REG AIR|lyly regular asym|
+612|88|9|5|1|988.08|0.08|0.04|R|F|1992-12-18|1992-12-13|1992-12-20|TAKE BACK RETURN|FOB| requests.|
+612|189|10|6|33|35942.94|0.10|0.03|R|F|1992-11-30|1992-12-01|1992-12-12|COLLECT COD|MAIL|bove the blithely even ideas. careful|
+613|91|5|1|17|16848.53|0.06|0.06|N|O|1995-09-23|1995-08-04|1995-10-15|NONE|SHIP|ar dependencie|
+613|79|7|2|6|5874.42|0.05|0.05|N|O|1995-08-05|1995-08-09|1995-08-08|TAKE BACK RETURN|MAIL|y ironic deposits eat |
+613|186|7|3|3|3258.54|0.03|0.01|N|O|1995-09-27|1995-09-11|1995-10-05|NONE|TRUCK|ccounts cajole. |
+613|159|10|4|7|7414.05|0.02|0.04|N|O|1995-09-07|1995-08-02|1995-09-16|DELIVER IN PERSON|MAIL|ously blithely final pinto beans. regula|
+614|195|8|1|21|22998.99|0.00|0.03|R|F|1993-03-29|1993-01-06|1993-04-16|TAKE BACK RETURN|TRUCK|arefully. slyly express packag|
+614|187|8|2|48|52184.64|0.07|0.07|A|F|1993-03-09|1993-01-19|1993-03-19|DELIVER IN PERSON|SHIP|riously special excuses haggle along the|
+614|167|2|3|43|45887.88|0.05|0.00|A|F|1993-03-07|1993-02-22|1993-03-18|DELIVER IN PERSON|SHIP| express accounts wake. slyly ironic ins|
+614|147|6|4|14|14659.96|0.04|0.06|A|F|1992-12-03|1993-02-14|1992-12-27|DELIVER IN PERSON|SHIP|ular packages haggle about the pack|
+614|196|8|5|30|32885.70|0.08|0.07|R|F|1993-01-16|1993-02-08|1993-02-12|TAKE BACK RETURN|FOB|tructions are f|
+614|137|8|6|48|49782.24|0.04|0.08|A|F|1992-12-14|1993-01-22|1993-01-11|NONE|TRUCK| regular platelets cajole quickly eve|
+615|105|6|1|36|36183.60|0.10|0.01|A|F|1992-06-01|1992-07-14|1992-06-27|NONE|FOB| packages. carefully final pinto bea|
+640|93|7|1|49|48661.41|0.09|0.02|R|F|1993-03-27|1993-04-17|1993-04-15|NONE|RAIL|s haggle slyly|
+640|1|4|2|40|36040.00|0.09|0.05|A|F|1993-05-11|1993-04-11|1993-05-15|COLLECT COD|TRUCK|oach according to the bol|
+640|180|8|3|22|23763.96|0.05|0.07|A|F|1993-05-07|1993-04-14|1993-05-21|TAKE BACK RETURN|TRUCK|osits across the slyly regular theodo|
+640|32|3|4|45|41941.35|0.07|0.07|R|F|1993-04-15|1993-04-23|1993-04-21|DELIVER IN PERSON|REG AIR|ong the qui|
+641|126|9|1|18|18470.16|0.01|0.08|R|F|1993-10-17|1993-10-11|1993-10-29|DELIVER IN PERSON|AIR|p blithely bold packages. quick|
+641|100|2|2|1|1000.10|0.09|0.02|R|F|1993-12-03|1993-10-28|1993-12-26|TAKE BACK RETURN|RAIL| nag across the regular foxes.|
+641|95|7|3|40|39803.60|0.05|0.06|R|F|1993-11-22|1993-10-20|1993-12-11|DELIVER IN PERSON|REG AIR|lets. furiously regular requests cajo|
+641|71|10|4|25|24276.75|0.03|0.02|A|F|1993-12-04|1993-11-18|1993-12-18|TAKE BACK RETURN|FOB|d, regular d|
+641|4|9|5|41|37064.00|0.07|0.04|R|F|1993-11-29|1993-10-27|1993-12-04|TAKE BACK RETURN|FOB| asymptotes are quickly. bol|
+642|54|5|1|26|24805.30|0.10|0.03|A|F|1994-04-16|1994-02-01|1994-04-27|COLLECT COD|REG AIR|quests according to the unu|
+643|13|3|1|28|25564.28|0.00|0.08|A|F|1995-04-13|1995-05-12|1995-04-14|TAKE BACK RETURN|TRUCK|ly regular requests nag sly|
+643|51|2|2|48|45650.40|0.01|0.02|N|O|1995-07-10|1995-06-07|1995-08-01|NONE|FOB|ly ironic accounts|
+643|163|2|3|23|24452.68|0.05|0.03|N|O|1995-07-09|1995-05-18|1995-07-31|COLLECT COD|RAIL|sits are carefully according to the e|
+643|45|4|4|39|36856.56|0.08|0.04|A|F|1995-06-08|1995-06-16|1995-06-13|COLLECT COD|RAIL| the pains. carefully s|
+643|190|1|5|47|51238.93|0.10|0.03|R|F|1995-04-05|1995-06-14|1995-04-26|DELIVER IN PERSON|RAIL|y against |
+644|134|10|1|46|47569.98|0.02|0.01|A|F|1992-05-20|1992-06-14|1992-06-14|DELIVER IN PERSON|RAIL| special requests was sometimes expre|
+644|130|3|2|11|11331.43|0.05|0.02|A|F|1992-08-20|1992-07-21|1992-09-11|TAKE BACK RETURN|TRUCK|ealthy pinto beans use carefu|
+644|101|6|3|44|44048.40|0.04|0.04|R|F|1992-08-17|1992-07-26|1992-08-20|COLLECT COD|REG AIR|iously ironic pinto beans. bold packa|
+644|80|8|4|7|6860.56|0.01|0.02|A|F|1992-05-18|1992-07-01|1992-06-07|COLLECT COD|RAIL| regular requests are blithely. slyly|
+644|50|1|5|23|21851.15|0.02|0.04|R|F|1992-07-31|1992-07-28|1992-08-13|DELIVER IN PERSON|TRUCK|uctions nag quickly alongside of t|
+644|85|6|6|33|32507.64|0.00|0.07|R|F|1992-08-26|1992-07-27|1992-08-28|NONE|AIR|ages sleep. bold, bo|
+644|51|9|7|38|36139.90|0.08|0.06|R|F|1992-05-17|1992-07-10|1992-06-06|TAKE BACK RETURN|MAIL| packages. blithely slow accounts nag quic|
+645|160|8|1|33|34985.28|0.01|0.02|A|F|1994-12-09|1995-02-21|1995-01-03|NONE|TRUCK|heodolites b|
+645|170|1|2|47|50297.99|0.07|0.05|R|F|1995-02-16|1995-02-15|1995-02-25|COLLECT COD|TRUCK|hely regular instructions alon|
+645|70|7|3|46|44623.22|0.10|0.01|A|F|1995-01-04|1995-02-21|1995-01-21|COLLECT COD|REG AIR| regular dependencies across the speci|
+645|96|9|4|49|48808.41|0.05|0.03|R|F|1995-01-24|1995-01-06|1995-02-17|NONE|TRUCK|y. slyly iron|
+645|5|8|5|43|38915.00|0.06|0.02|A|F|1995-02-12|1995-02-27|1995-03-06|TAKE BACK RETURN|REG AIR| furiously accounts. slyly|
+645|34|5|6|18|16812.54|0.10|0.08|A|F|1995-03-02|1995-02-08|1995-03-03|COLLECT COD|RAIL|ep. slyly even |
+645|28|9|7|9|8352.18|0.03|0.03|A|F|1994-12-25|1995-01-04|1995-01-15|COLLECT COD|REG AIR|special deposits. regular, final th|
+646|109|6|1|31|31282.10|0.00|0.05|R|F|1994-12-17|1995-02-16|1995-01-04|COLLECT COD|MAIL|ag furiousl|
+646|127|8|2|1|1027.12|0.07|0.01|A|F|1994-12-05|1995-01-07|1994-12-31|TAKE BACK RETURN|MAIL|t blithely regular deposits. quic|
+646|30|9|3|24|22320.72|0.06|0.02|A|F|1995-02-20|1994-12-30|1995-03-16|TAKE BACK RETURN|TRUCK|regular accounts haggle dog|
+646|99|2|4|34|33969.06|0.01|0.00|R|F|1994-12-28|1994-12-27|1994-12-31|COLLECT COD|SHIP|slow accounts. fluffily idle instructions|
+646|90|1|5|17|16831.53|0.04|0.01|A|F|1994-12-31|1994-12-26|1995-01-01|DELIVER IN PERSON|REG AIR|inal packages haggle carefully |
+646|115|2|6|40|40604.40|0.10|0.01|R|F|1995-01-01|1995-01-13|1995-01-11|COLLECT COD|TRUCK|ronic packages sleep across th|
+647|17|1|1|41|37597.41|0.08|0.08|N|O|1997-11-19|1997-09-24|1997-12-15|COLLECT COD|REG AIR|r instructions. quickly unusu|
+647|113|10|2|5|5065.55|0.10|0.00|N|O|1997-09-25|1997-09-22|1997-10-25|TAKE BACK RETURN|AIR|ly express packages haggle caref|
+647|153|8|3|15|15797.25|0.08|0.00|N|O|1997-09-23|1997-10-09|1997-10-21|NONE|MAIL|ve the even, bold foxes sleep |
+672|173|4|1|41|43999.97|0.06|0.06|R|F|1994-06-20|1994-07-03|1994-06-22|COLLECT COD|REG AIR| dependencies in|
+672|190|1|2|9|9811.71|0.03|0.04|R|F|1994-06-25|1994-06-06|1994-07-19|TAKE BACK RETURN|TRUCK|haggle carefully carefully reg|
+672|143|2|3|35|36509.90|0.02|0.01|R|F|1994-07-13|1994-06-04|1994-07-14|COLLECT COD|RAIL| dependencies haggle quickly. theo|
+673|71|10|1|22|21363.54|0.03|0.02|R|F|1994-03-15|1994-04-27|1994-03-29|TAKE BACK RETURN|TRUCK| the regular, even requests. carefully fin|
+674|102|5|1|23|23048.30|0.06|0.07|A|F|1992-10-25|1992-10-15|1992-11-03|COLLECT COD|SHIP|ve the quickly even deposits. blithe|
+674|59|4|2|4|3836.20|0.02|0.07|R|F|1992-10-05|1992-11-22|1992-10-22|NONE|RAIL|ly express pinto beans sleep car|
+675|157|9|1|1|1057.15|0.04|0.08|N|O|1997-11-27|1997-09-30|1997-12-12|DELIVER IN PERSON|REG AIR|ide of the slyly regular packages. unus|
+675|137|3|2|35|36299.55|0.08|0.07|N|O|1997-08-19|1997-10-16|1997-09-17|DELIVER IN PERSON|REG AIR|s. furiously expre|
+675|176|6|3|34|36589.78|0.10|0.04|N|O|1997-11-17|1997-10-07|1997-11-27|NONE|FOB|y final accounts unwind around the |
+675|100|4|4|15|15001.50|0.09|0.05|N|O|1997-10-18|1997-09-28|1997-11-13|COLLECT COD|TRUCK|posits after the furio|
+675|5|8|5|46|41630.00|0.09|0.05|N|O|1997-09-18|1997-10-14|1997-10-01|DELIVER IN PERSON|AIR| deposits along the express foxes |
+676|51|3|1|9|8559.45|0.09|0.02|N|O|1997-04-03|1997-02-02|1997-04-08|COLLECT COD|REG AIR|aintain sl|
+676|78|6|2|20|19561.40|0.07|0.07|N|O|1997-02-02|1997-02-01|1997-02-11|NONE|REG AIR|riously around the blithely |
+676|163|4|3|35|37210.60|0.05|0.01|N|O|1996-12-30|1997-01-13|1997-01-19|DELIVER IN PERSON|RAIL|into beans. blithe|
+676|73|1|4|24|23353.68|0.01|0.06|N|O|1997-02-05|1997-01-16|1997-03-07|TAKE BACK RETURN|TRUCK|ress, regular dep|
+676|166|1|5|31|33050.96|0.01|0.06|N|O|1997-02-06|1997-02-28|1997-03-08|COLLECT COD|TRUCK|ial deposits cajo|
+676|76|7|6|33|32210.31|0.09|0.05|N|O|1997-03-02|1997-02-22|1997-03-19|TAKE BACK RETURN|TRUCK|as wake slyly furiously close pinto b|
+676|143|6|7|11|11474.54|0.07|0.02|N|O|1997-03-09|1997-03-06|1997-03-31|TAKE BACK RETURN|MAIL|he final acco|
+677|59|7|1|32|30689.60|0.04|0.08|R|F|1994-01-06|1994-01-31|1994-02-02|NONE|RAIL|slyly final|
+677|168|9|2|39|41658.24|0.00|0.07|R|F|1993-12-19|1994-02-11|1994-01-05|TAKE BACK RETURN|SHIP|ges. furiously regular packages use |
+677|24|5|3|46|42504.92|0.01|0.02|R|F|1993-12-02|1994-02-12|1993-12-06|COLLECT COD|RAIL|ng theodolites. furiously unusual theodo|
+677|148|7|4|1|1048.14|0.06|0.05|R|F|1993-12-01|1994-01-14|1993-12-26|DELIVER IN PERSON|MAIL|ly. regular |
+677|150|9|5|25|26253.75|0.00|0.05|A|F|1994-03-12|1994-02-02|1994-03-28|DELIVER IN PERSON|AIR| packages integrate blithely|
+678|146|7|1|20|20922.80|0.05|0.08|R|F|1993-06-21|1993-04-07|1993-07-10|TAKE BACK RETURN|MAIL|furiously express excuses. foxes eat fu|
+678|37|3|2|22|20614.66|0.01|0.02|A|F|1993-05-10|1993-04-29|1993-06-08|NONE|REG AIR|de of the carefully even requests. bl|
+678|143|10|3|16|16690.24|0.06|0.02|R|F|1993-03-20|1993-04-13|1993-04-16|DELIVER IN PERSON|REG AIR|equests cajole around the carefully regular|
+678|199|10|4|48|52761.12|0.08|0.08|R|F|1993-02-28|1993-04-04|1993-03-24|NONE|REG AIR|ithely. slyly express foxes|
+678|98|9|5|16|15969.44|0.06|0.04|R|F|1993-03-09|1993-04-18|1993-04-07|NONE|AIR| about the |
+678|43|4|6|11|10373.44|0.09|0.00|R|F|1993-04-28|1993-05-16|1993-05-11|COLLECT COD|TRUCK|ess deposits dazzle f|
+679|192|3|1|9|9829.71|0.09|0.00|N|O|1995-12-20|1996-01-27|1996-01-07|COLLECT COD|REG AIR|leep slyly. entici|
+704|190|1|1|40|43607.60|0.05|0.05|N|O|1997-01-30|1997-01-10|1997-02-20|COLLECT COD|AIR|ggle quickly. r|
+704|4|5|2|14|12656.00|0.07|0.08|N|O|1997-02-02|1996-12-26|1997-02-19|DELIVER IN PERSON|REG AIR|ve the quickly final forges. furiously p|
+705|189|10|1|46|50102.28|0.05|0.06|N|O|1997-04-18|1997-05-06|1997-05-05|DELIVER IN PERSON|SHIP|ss deposits. ironic packa|
+705|117|7|2|35|35598.85|0.10|0.04|N|O|1997-03-25|1997-03-20|1997-04-23|TAKE BACK RETURN|FOB|carefully ironic accounts|
+706|197|9|1|23|25235.37|0.05|0.00|N|O|1995-12-06|1995-12-02|1995-12-16|COLLECT COD|SHIP|ckey players. requests above the|
+707|155|6|1|34|35875.10|0.01|0.02|R|F|1994-12-08|1995-01-15|1995-01-02|NONE|RAIL| dependencies|
+707|43|10|2|22|20746.88|0.00|0.06|A|F|1995-01-12|1994-12-28|1995-01-16|DELIVER IN PERSON|REG AIR| kindle ironically|
+708|124|7|1|3|3072.36|0.05|0.02|N|O|1998-10-09|1998-09-22|1998-11-07|COLLECT COD|FOB|e slyly pending foxes. |
+708|180|1|2|19|20523.42|0.06|0.00|N|O|1998-10-28|1998-09-23|1998-11-25|COLLECT COD|SHIP| requests. even, thin ideas|
+708|122|5|3|33|33729.96|0.09|0.06|N|O|1998-09-10|1998-09-20|1998-09-22|COLLECT COD|RAIL|s boost carefully ruthless theodolites. f|
+708|56|7|4|5|4780.25|0.07|0.07|N|O|1998-07-22|1998-08-15|1998-07-28|TAKE BACK RETURN|REG AIR|c pinto beans nag after the account|
+708|143|2|5|36|37553.04|0.08|0.01|N|O|1998-07-16|1998-09-04|1998-08-11|NONE|SHIP|ests. even, regular hockey p|
+708|23|6|6|7|6461.14|0.10|0.03|N|O|1998-08-16|1998-08-15|1998-09-10|COLLECT COD|REG AIR|lly express ac|
+709|87|8|1|7|6909.56|0.00|0.00|N|O|1998-06-14|1998-06-08|1998-06-18|TAKE BACK RETURN|RAIL| special orbits cajole |
+709|198|10|2|15|16472.85|0.08|0.00|N|O|1998-07-10|1998-06-26|1998-08-09|NONE|RAIL|ily regular deposits. sauternes was accor|
+709|169|8|3|10|10691.60|0.01|0.02|N|O|1998-06-04|1998-06-30|1998-06-11|NONE|REG AIR|ts cajole boldly |
+709|108|9|4|40|40324.00|0.10|0.08|N|O|1998-08-12|1998-06-20|1998-08-20|DELIVER IN PERSON|RAIL|ggle fluffily carefully ironic|
+710|163|8|1|47|49968.52|0.06|0.08|A|F|1993-01-18|1993-03-24|1993-01-24|TAKE BACK RETURN|MAIL|usual ideas into th|
+710|193|4|2|38|41541.22|0.07|0.02|R|F|1993-04-18|1993-03-12|1993-05-15|COLLECT COD|FOB|sts boost fluffily aft|
+710|139|5|3|7|7273.91|0.04|0.06|R|F|1993-01-20|1993-03-28|1993-02-15|TAKE BACK RETURN|REG AIR|xpress, special ideas. bl|
+710|90|1|4|25|24752.25|0.00|0.05|R|F|1993-03-31|1993-02-05|1993-04-22|COLLECT COD|FOB|eas detect do|
+710|186|7|5|12|13034.16|0.01|0.02|A|F|1993-02-18|1993-02-27|1993-03-07|DELIVER IN PERSON|MAIL|ions. slyly express theodolites al|
+710|114|4|6|21|21296.31|0.04|0.06|R|F|1993-03-22|1993-03-05|1993-03-27|DELIVER IN PERSON|SHIP|es. furiously p|
+710|160|2|7|46|48767.36|0.03|0.07|R|F|1993-04-16|1993-03-27|1993-05-05|COLLECT COD|MAIL|ges use; blithely pending excuses inte|
+711|146|3|1|2|2092.28|0.10|0.04|R|F|1993-12-01|1993-12-09|1993-12-16|DELIVER IN PERSON|REG AIR|ely across t|
+711|103|8|2|27|27083.70|0.00|0.08|A|F|1993-10-02|1993-10-26|1993-10-08|DELIVER IN PERSON|MAIL|slyly. ironic asy|
+711|128|7|3|46|47293.52|0.10|0.00|R|F|1993-12-26|1993-11-19|1994-01-21|TAKE BACK RETURN|MAIL|deposits. permanen|
+711|128|9|4|20|20562.40|0.09|0.00|A|F|1994-01-17|1993-11-10|1994-01-31|DELIVER IN PERSON|TRUCK|kly regular acco|
+736|158|9|1|46|48674.90|0.05|0.01|N|O|1998-07-16|1998-09-01|1998-08-09|NONE|AIR|uctions cajole|
+736|80|1|2|23|22541.84|0.02|0.05|N|O|1998-10-08|1998-08-27|1998-10-19|TAKE BACK RETURN|AIR|k accounts are carefully|
+736|57|9|3|13|12441.65|0.00|0.03|N|O|1998-08-16|1998-07-26|1998-08-19|DELIVER IN PERSON|FOB|st furiously among the |
+736|98|2|4|14|13973.26|0.06|0.04|N|O|1998-10-04|1998-08-14|1998-10-16|COLLECT COD|REG AIR|nstructions.|
+736|169|6|5|32|34213.12|0.04|0.03|N|O|1998-07-30|1998-08-22|1998-08-12|DELIVER IN PERSON|RAIL|iously final accoun|
+737|182|3|1|12|12986.16|0.01|0.01|R|F|1992-04-28|1992-06-30|1992-05-08|COLLECT COD|RAIL|posits after the slyly bold du|
+738|198|1|1|34|37338.46|0.00|0.06|R|F|1993-06-09|1993-04-15|1993-07-09|TAKE BACK RETURN|TRUCK|s against the ironic exc|
+738|188|9|2|4|4352.72|0.00|0.03|A|F|1993-06-20|1993-04-08|1993-07-09|NONE|AIR|ar packages. fluffily bo|
+738|170|1|3|23|24613.91|0.04|0.08|A|F|1993-03-17|1993-04-02|1993-04-05|TAKE BACK RETURN|SHIP|nic, final excuses promise quickly regula|
+738|141|10|4|12|12493.68|0.04|0.08|A|F|1993-06-16|1993-05-05|1993-06-22|NONE|SHIP|ove the slyly regular p|
+738|175|4|5|30|32255.10|0.02|0.00|A|F|1993-06-12|1993-05-29|1993-06-25|NONE|AIR|ecial instructions haggle blithely regula|
+739|85|6|1|28|27582.24|0.00|0.03|N|O|1998-06-03|1998-08-04|1998-06-29|TAKE BACK RETURN|RAIL|elets about the pe|
+739|4|7|2|50|45200.00|0.07|0.06|N|O|1998-08-26|1998-07-16|1998-09-02|COLLECT COD|MAIL|ndencies. blith|
+739|49|2|3|12|11388.48|0.05|0.00|N|O|1998-08-20|1998-07-24|1998-08-22|NONE|MAIL|le slyly along the close i|
+739|44|3|4|47|44369.88|0.09|0.07|N|O|1998-08-12|1998-07-09|1998-08-28|NONE|REG AIR|deas according to the theodolites sn|
+739|188|9|5|30|32645.40|0.07|0.06|N|O|1998-06-19|1998-08-26|1998-07-02|DELIVER IN PERSON|REG AIR|above the even deposits. ironic requests|
+740|2|9|1|22|19844.00|0.10|0.02|N|O|1995-07-24|1995-09-11|1995-08-11|TAKE BACK RETURN|FOB|odolites cajole ironic, pending instruc|
+740|66|1|2|35|33812.10|0.00|0.00|N|O|1995-09-06|1995-08-22|1995-10-02|NONE|TRUCK|p quickly. fu|
+740|199|10|3|29|31876.51|0.06|0.05|N|O|1995-10-26|1995-09-17|1995-10-29|DELIVER IN PERSON|FOB|ntly bold pinto beans sleep quickl|
+741|187|8|1|25|27179.50|0.03|0.06|N|O|1998-07-15|1998-08-27|1998-08-12|DELIVER IN PERSON|MAIL|accounts. blithely bold pa|
+741|91|4|2|22|21803.98|0.09|0.01|N|O|1998-09-07|1998-09-28|1998-09-12|COLLECT COD|AIR|ven deposits about the regular, ironi|
+742|102|3|1|46|46096.60|0.04|0.08|A|F|1995-03-12|1995-03-20|1995-03-16|TAKE BACK RETURN|SHIP|e slyly bold deposits cajole according to|
+742|96|8|2|15|14941.35|0.08|0.05|A|F|1995-02-26|1995-03-20|1995-03-03|NONE|SHIP|blithely unusual pinto|
+742|102|5|3|24|24050.40|0.08|0.08|A|F|1995-02-12|1995-03-12|1995-02-14|DELIVER IN PERSON|SHIP|affix slyly. furiously i|
+742|192|4|4|16|17475.04|0.01|0.05|A|F|1995-01-15|1995-02-25|1995-01-24|COLLECT COD|AIR|eodolites haggle carefully regul|
+742|101|4|5|48|48052.80|0.09|0.08|R|F|1995-03-24|1995-01-23|1995-04-08|TAKE BACK RETURN|TRUCK| platelets |
+742|192|6|6|49|53517.31|0.02|0.07|A|F|1995-01-13|1995-02-13|1995-01-26|TAKE BACK RETURN|RAIL| carefully bold foxes sle|
+743|192|5|1|21|22935.99|0.01|0.04|N|O|1996-10-26|1996-11-05|1996-11-11|COLLECT COD|MAIL|d requests. packages afte|
+768|196|7|1|39|42751.41|0.06|0.08|N|O|1996-09-25|1996-10-27|1996-10-20|NONE|SHIP|out the ironic|
+768|18|9|2|2|1836.02|0.00|0.04|N|O|1996-11-13|1996-10-03|1996-11-25|DELIVER IN PERSON|SHIP|ular courts. slyly dogged accou|
+768|6|1|3|30|27180.00|0.06|0.05|N|O|1996-09-22|1996-11-03|1996-10-13|NONE|MAIL| furiously fluffy pinto beans haggle along|
+768|25|8|4|37|34225.74|0.10|0.00|N|O|1996-10-02|1996-09-23|1996-10-14|TAKE BACK RETURN|REG AIR|ending reques

<TRUNCATED>


[30/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
Add the documentation for release-0.8.8.

Change-Id: Ie4f1b62294acd7f2d6ad743c6712fabf8e18bfb4
Reviewed-on: https://asterix-gerrit.ics.uci.edu/754
Reviewed-by: Till Westmann <ti...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/commit/08953b2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/tree/08953b2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/diff/08953b2e

Branch: refs/heads/asf-site
Commit: 08953b2e6a39937906f49a07b3e4e3748e2ab2c2
Parents: a1d4909
Author: Yingyi Bu <yi...@couchbase.com>
Authored: Fri Mar 25 15:23:26 2016 -0700
Committer: Yingyi Bu <bu...@gmail.com>
Committed: Fri Mar 25 16:26:03 2016 -0700

----------------------------------------------------------------------
 content/docs/0.8.8-incubating/api.html          |  606 ++
 content/docs/0.8.8-incubating/aql/allens.html   |  660 ++
 .../docs/0.8.8-incubating/aql/datamodel.html    |  783 +++
 .../docs/0.8.8-incubating/aql/externaldata.html |  633 ++
 content/docs/0.8.8-incubating/aql/filters.html  |  272 +
 .../docs/0.8.8-incubating/aql/functions.html    | 5111 +++++++++++++++
 content/docs/0.8.8-incubating/aql/js-sdk.html   |  958 +++
 content/docs/0.8.8-incubating/aql/manual.html   | 1029 +++
 .../0.8.8-incubating/aql/primer-sql-like.html   |  886 +++
 content/docs/0.8.8-incubating/aql/primer.html   |  896 +++
 .../docs/0.8.8-incubating/aql/similarity.html   |  431 ++
 .../css/apache-maven-fluido-1.3.0.min.css       |    9 +
 content/docs/0.8.8-incubating/css/print.css     |   23 +
 content/docs/0.8.8-incubating/css/site.css      |    1 +
 content/docs/0.8.8-incubating/csv.html          |  416 ++
 content/docs/0.8.8-incubating/data/fbm.adm      |   15 +
 content/docs/0.8.8-incubating/data/fbu.adm      |   10 +
 content/docs/0.8.8-incubating/data/lineitem.tbl | 6005 ++++++++++++++++++
 content/docs/0.8.8-incubating/data/twm.adm      |   12 +
 content/docs/0.8.8-incubating/data/twu.adm      |    4 +
 .../docs/0.8.8-incubating/feeds/tutorial.html   |  425 ++
 .../0.8.8-incubating/images/AsterixCluster.png  |  Bin 0 -> 95355 bytes
 .../images/accessories-text-editor.png          |  Bin 0 -> 746 bytes
 content/docs/0.8.8-incubating/images/add.gif    |  Bin 0 -> 397 bytes
 .../images/apache-maven-project-2.png           |  Bin 0 -> 33442 bytes
 .../images/application-certificate.png          |  Bin 0 -> 923 bytes
 .../0.8.8-incubating/images/asf_logo_wide.png   |  Bin 0 -> 14470 bytes
 .../0.8.8-incubating/images/asterix_webui.png   |  Bin 0 -> 55418 bytes
 .../0.8.8-incubating/images/asterixlogo.png     |  Bin 0 -> 15334 bytes
 .../0.8.8-incubating/images/contact-new.png     |  Bin 0 -> 736 bytes
 .../images/document-properties.png              |  Bin 0 -> 577 bytes
 .../0.8.8-incubating/images/drive-harddisk.png  |  Bin 0 -> 700 bytes
 .../docs/0.8.8-incubating/images/egg-logo.png   |  Bin 0 -> 8626 bytes
 content/docs/0.8.8-incubating/images/fix.gif    |  Bin 0 -> 366 bytes
 .../docs/0.8.8-incubating/images/hyrax_ts.png   |  Bin 0 -> 4949 bytes
 .../0.8.8-incubating/images/icon_error_sml.gif  |  Bin 0 -> 633 bytes
 .../0.8.8-incubating/images/icon_help_sml.gif   |  Bin 0 -> 1072 bytes
 .../0.8.8-incubating/images/icon_info_sml.gif   |  Bin 0 -> 638 bytes
 .../images/icon_success_sml.gif                 |  Bin 0 -> 604 bytes
 .../images/icon_warning_sml.gif                 |  Bin 0 -> 625 bytes
 .../0.8.8-incubating/images/image-x-generic.png |  Bin 0 -> 662 bytes
 .../images/internet-web-browser.png             |  Bin 0 -> 1017 bytes
 .../images/logos/build-by-maven-black.png       |  Bin 0 -> 2294 bytes
 .../images/logos/build-by-maven-white.png       |  Bin 0 -> 2260 bytes
 .../images/logos/maven-feather.png              |  Bin 0 -> 3330 bytes
 .../0.8.8-incubating/images/network-server.png  |  Bin 0 -> 536 bytes
 .../images/package-x-generic.png                |  Bin 0 -> 717 bytes
 .../images/profiles/pre-release.png             |  Bin 0 -> 32607 bytes
 .../images/profiles/retired.png                 |  Bin 0 -> 22003 bytes
 .../images/profiles/sandbox.png                 |  Bin 0 -> 33010 bytes
 content/docs/0.8.8-incubating/images/remove.gif |  Bin 0 -> 607 bytes
 content/docs/0.8.8-incubating/images/rss.png    |  Bin 0 -> 474 bytes
 .../0.8.8-incubating/images/running_inst.png    |  Bin 0 -> 90641 bytes
 content/docs/0.8.8-incubating/images/update.gif |  Bin 0 -> 1090 bytes
 .../docs/0.8.8-incubating/images/window-new.png |  Bin 0 -> 583 bytes
 .../docs/0.8.8-incubating/images/yarn_clust.png |  Bin 0 -> 61592 bytes
 .../img/glyphicons-halflings-white.png          |  Bin 0 -> 8777 bytes
 .../img/glyphicons-halflings.png                |  Bin 0 -> 12799 bytes
 content/docs/0.8.8-incubating/index.html        |  268 +
 content/docs/0.8.8-incubating/install.html      | 1297 ++++
 .../js/apache-maven-fluido-1.3.0.min.js         |   21 +
 content/docs/0.8.8-incubating/overview.html     |  294 +
 content/docs/0.8.8-incubating/udf.html          |  388 ++
 content/docs/0.8.8-incubating/yarn.html         |  693 ++
 docs/0.8.8-incubating/api.html                  |  606 ++
 docs/0.8.8-incubating/aql/allens.html           |  660 ++
 docs/0.8.8-incubating/aql/datamodel.html        |  783 +++
 docs/0.8.8-incubating/aql/externaldata.html     |  633 ++
 docs/0.8.8-incubating/aql/filters.html          |  272 +
 docs/0.8.8-incubating/aql/functions.html        | 5111 +++++++++++++++
 docs/0.8.8-incubating/aql/js-sdk.html           |  958 +++
 docs/0.8.8-incubating/aql/manual.html           | 1029 +++
 docs/0.8.8-incubating/aql/primer-sql-like.html  |  886 +++
 docs/0.8.8-incubating/aql/primer.html           |  896 +++
 docs/0.8.8-incubating/aql/similarity.html       |  431 ++
 .../css/apache-maven-fluido-1.3.0.min.css       |    9 +
 docs/0.8.8-incubating/css/print.css             |   23 +
 docs/0.8.8-incubating/css/site.css              |    1 +
 docs/0.8.8-incubating/csv.html                  |  416 ++
 docs/0.8.8-incubating/data/fbm.adm              |   15 +
 docs/0.8.8-incubating/data/fbu.adm              |   10 +
 docs/0.8.8-incubating/data/lineitem.tbl         | 6005 ++++++++++++++++++
 docs/0.8.8-incubating/data/twm.adm              |   12 +
 docs/0.8.8-incubating/data/twu.adm              |    4 +
 docs/0.8.8-incubating/feeds/tutorial.html       |  425 ++
 docs/0.8.8-incubating/images/AsterixCluster.png |  Bin 0 -> 95355 bytes
 .../images/accessories-text-editor.png          |  Bin 0 -> 746 bytes
 docs/0.8.8-incubating/images/add.gif            |  Bin 0 -> 397 bytes
 .../images/apache-maven-project-2.png           |  Bin 0 -> 33442 bytes
 .../images/application-certificate.png          |  Bin 0 -> 923 bytes
 docs/0.8.8-incubating/images/asf_logo_wide.png  |  Bin 0 -> 14470 bytes
 docs/0.8.8-incubating/images/asterix_webui.png  |  Bin 0 -> 55418 bytes
 docs/0.8.8-incubating/images/asterixlogo.png    |  Bin 0 -> 15334 bytes
 docs/0.8.8-incubating/images/contact-new.png    |  Bin 0 -> 736 bytes
 .../images/document-properties.png              |  Bin 0 -> 577 bytes
 docs/0.8.8-incubating/images/drive-harddisk.png |  Bin 0 -> 700 bytes
 docs/0.8.8-incubating/images/egg-logo.png       |  Bin 0 -> 8626 bytes
 docs/0.8.8-incubating/images/fix.gif            |  Bin 0 -> 366 bytes
 docs/0.8.8-incubating/images/hyrax_ts.png       |  Bin 0 -> 4949 bytes
 docs/0.8.8-incubating/images/icon_error_sml.gif |  Bin 0 -> 633 bytes
 docs/0.8.8-incubating/images/icon_help_sml.gif  |  Bin 0 -> 1072 bytes
 docs/0.8.8-incubating/images/icon_info_sml.gif  |  Bin 0 -> 638 bytes
 .../images/icon_success_sml.gif                 |  Bin 0 -> 604 bytes
 .../images/icon_warning_sml.gif                 |  Bin 0 -> 625 bytes
 .../0.8.8-incubating/images/image-x-generic.png |  Bin 0 -> 662 bytes
 .../images/internet-web-browser.png             |  Bin 0 -> 1017 bytes
 .../images/logos/build-by-maven-black.png       |  Bin 0 -> 2294 bytes
 .../images/logos/build-by-maven-white.png       |  Bin 0 -> 2260 bytes
 .../images/logos/maven-feather.png              |  Bin 0 -> 3330 bytes
 docs/0.8.8-incubating/images/network-server.png |  Bin 0 -> 536 bytes
 .../images/package-x-generic.png                |  Bin 0 -> 717 bytes
 .../images/profiles/pre-release.png             |  Bin 0 -> 32607 bytes
 .../images/profiles/retired.png                 |  Bin 0 -> 22003 bytes
 .../images/profiles/sandbox.png                 |  Bin 0 -> 33010 bytes
 docs/0.8.8-incubating/images/remove.gif         |  Bin 0 -> 607 bytes
 docs/0.8.8-incubating/images/rss.png            |  Bin 0 -> 474 bytes
 docs/0.8.8-incubating/images/running_inst.png   |  Bin 0 -> 90641 bytes
 docs/0.8.8-incubating/images/update.gif         |  Bin 0 -> 1090 bytes
 docs/0.8.8-incubating/images/window-new.png     |  Bin 0 -> 583 bytes
 docs/0.8.8-incubating/images/yarn_clust.png     |  Bin 0 -> 61592 bytes
 .../img/glyphicons-halflings-white.png          |  Bin 0 -> 8777 bytes
 .../img/glyphicons-halflings.png                |  Bin 0 -> 12799 bytes
 docs/0.8.8-incubating/index.html                |  268 +
 docs/0.8.8-incubating/install.html              | 1297 ++++
 .../js/apache-maven-fluido-1.3.0.min.js         |   21 +
 docs/0.8.8-incubating/overview.html             |  294 +
 docs/0.8.8-incubating/udf.html                  |  388 ++
 docs/0.8.8-incubating/yarn.html                 |  693 ++
 128 files changed, 44292 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/api.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/api.html b/content/docs/0.8.8-incubating/api.html
new file mode 100644
index 0000000..9064063
--- /dev/null
+++ b/content/docs/0.8.8-incubating/api.html
@@ -0,0 +1,606 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; HTTP API to AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>HTTP API to AsterixDB</a>
+          </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>HTTP API to AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#DdlApi">DDL API</a></li>
+  
+<li><a href="#UpdateApi">Update API</a></li>
+  
+<li><a href="#QueryApi">Query API</a></li>
+  
+<li><a href="#AnyApi">Mixed API</a></li>
+  
+<li><a href="#AsynchronousResultApi">Asynchronous Result API</a></li>
+  
+<li><a href="#QueryStatusApi">Query Status API</a></li>
+  
+<li><a href="#ErrorCodes">Error Codes</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="DDL_API_Back_to_TOC"></a><a name="DdlApi" id="DdlApi">DDL API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for the data definition statements</i></p>
+<p>Endpoint: <i>/ddl</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>ddl</td>
+  
+<td>String containing DDL statements to modify Metadata</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>This call does not return any result. If the operations were successful, HTTP OK status code is returned.</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="DDL_Statements"></a>DDL Statements</h4>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse company if exists;
+    create dataverse company;
+    use dataverse company;
+
+    create type Emp as open {
+      id : int32,
+      name : string
+    };
+
+    create dataset Employee(Emp) primary key id;
+</pre></div></div>
+<p>API call for the above DDL statements in the URL-encoded form.</p>
+<p>[http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;](<a class="externalLink" href="http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;">http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br /><tt>&lt;NO PAYLOAD&gt;</tt></p></div></div></div>
+<div class="section">
+<h2><a name="Update_API_Back_to_TOC"></a><a name="UpdateApi" id="UpdateApi">Update API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for update statements (INSERT, DELETE and LOAD)</i></p>
+<p>Endpoint: <i>/update</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>statements</td>
+  
+<td>String containing update (insert/delete) statements to execute</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>This call does not return any result. If the operations were successful, HTTP OK status code is returned.</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Update_Statements"></a>Update Statements</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse company;
+
+    insert into dataset Employee({ &quot;id&quot;:123,&quot;name&quot;:&quot;John Doe&quot;});
+</pre></div></div>
+<p>API call for the above update statement in the URL-encoded form.</p>
+<p>[http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});](<a class="externalLink" href="http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});">http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br /><tt>&lt;NO PAYLOAD&gt;</tt></p></div></div></div>
+<div class="section">
+<h2><a name="Query_API_Back_to_TOC"></a><a name="QueryApi" id="QueryApi">Query API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for query statements</i></p>
+<p>Endpoint: <i>/query</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>query</td>
+  
+<td>Query string to pass to ASTERIX for execution</td>
+  
+<td>Yes</td>
+</tr>
+
+<tr class="a">
+  
+<td>mode</td>
+  
+<td>Indicate if call should be synchronous or asynchronous. mode = synchronous blocks the call until results are available; mode = asynchronous returns immediately with a handle that can be used later to check the query&#x2019;s status and to fetch results when available</td>
+  
+<td>No. default mode = synchronous</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       results: &lt;result as a string, if mode = synchronous&gt;
+       error-code: [&lt;code&gt;, &lt;message&gt;] (if an error occurs)
+       handle: &lt;opaque result handle, if mode = asynchronous&gt;
+    }
+</pre></div></div>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Select_query_with_synchronous_result_delivery"></a>Select query with synchronous result delivery</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse company;
+
+    for $l in dataset('Employee') return $l;
+</pre></div></div>
+<p>API call for the above query statement in the URL-encoded form.</p>
+<p>[http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&#x2018;Employee&#x2019;)%20return%20$l;](<a class="externalLink" href="http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&apos;Employee&apos;)%20return%20$l;">http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset('Employee')%20return%20$l;</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+      &quot;results&quot;: [
+          [
+              &quot;{ &quot;id&quot;: 123, &quot;name&quot;: &quot;John Doe&quot; }&quot;
+          ]
+      ]
+    }
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Same_select_query_with_asynchronous_result_delivery"></a>Same select query with asynchronous result delivery</h4>
+<p>API call for the above query statement in the URL-encoded form with mode=asynchronous</p>
+<p>[http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&#x2018;Employee&#x2019;)%20return%20$l;&amp;mode=asynchronous](<a class="externalLink" href="http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&apos;Employee&apos;)%20return%20$l;&amp;mode=asynchronous">http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset('Employee')%20return%20$l;&amp;mode=asynchronous</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+        &quot;handle&quot;: [45,0]
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Mixed_API_Back_to_TOC"></a><a name="AnyApi" id="AnyApi">Mixed API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for any/mixed statement</i></p>
+<p>Endpoint: <i>/aql</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>query</td>
+  
+<td>Query string to pass to ASTERIX for execution</td>
+  
+<td>Yes</td>
+</tr>
+
+<tr class="a">
+  
+<td>mode</td>
+  
+<td>Indicate if call should be synchronous or asynchronous. mode = synchronous blocks the call until results are available; mode = asynchronous returns immediately with a handle that can be used later to check the query&#x2019;s status and to fetch results when available</td>
+  
+<td>No. default mode = synchronous</td>
+</tr>
+</table>
+<p>Similar to <i><i>/update</i></i> but allows any arbitrary AQL statement rather than only modifications.</p></div>
+<div class="section">
+<h2><a name="Asynchronous_Result_API_Back_to_TOC"></a><a name="AsynchronousResultApi" id="AsynchronousResultApi">Asynchronous Result API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point to fetch the results of an asynchronous query</i></p>
+<p>Endpoint: <i>/query/result</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>handle</td>
+  
+<td>Result handle that was returned by a previous call to a /query call with mode = asynchronous</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       results: &lt;result as a string, if mode = synchronous, or mode = asynchronous and results are available&gt;
+       error-code: [&lt;code&gt;, &lt;message&gt;] (if an error occurs)
+    }
+</pre></div></div>
+<p>If mode = asynchronous and results are not available, the returned JSON object is empty: { }</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Fetching_results_for_asynchronous_query"></a>Fetching results for asynchronous query</h4>
+<p>We use the handle returned by the asynchronous query to get the results for the query. The handle returned was:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+        &quot;handle&quot;: [45,0]
+    }
+</pre></div></div>
+<p>API call for reading results from the previous asynchronous query in the URL-encoded form.</p>
+<p><a class="externalLink" href="http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D">http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D</a></p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+      &quot;results&quot;: [
+          [
+              &quot;{ &quot;id&quot;: 123, &quot;name&quot;: &quot;John Doe&quot; }&quot;
+          ]
+      ]
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Query_Status_API_Back_to_TOC"></a><a name="QueryStatusApi" id="QueryStatusApi">Query Status API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point to check the status of the query asynchronous</i></p>
+<p>Endpoint: <i>/query/status</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>handle</td>
+  
+<td>Result handle that was returned by a previous call to a /query call with mode = asynchronous</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       status: (&quot;RUNNING&quot; | &quot;SUCCESS&quot; | &quot;ERROR&quot;)
+    }
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Error_Codes_Back_to_TOC"></a><a name="ErrorCodes" id="ErrorCodes">Error Codes</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Table of error codes and their types:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Code</td>
+  
+<td>Type</td>
+</tr>
+
+<tr class="b">
+  
+<td>1</td>
+  
+<td>Invalid statement</td>
+</tr>
+
+<tr class="a">
+  
+<td>2</td>
+  
+<td>Parse failures</td>
+</tr>
+
+<tr class="b">
+  
+<td>99</td>
+  
+<td>Uncategorized error</td>
+</tr>
+</table></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/allens.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/allens.html b/content/docs/0.8.8-incubating/aql/allens.html
new file mode 100644
index 0000000..b4dbbb3
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/allens.html
@@ -0,0 +1,660 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Temporal Functions: Allens Relations</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Allen's Relations Functions</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB Temporal Functions: Allen&#x2019;s Relations</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#AboutAllensRelations">About Allen&#x2019;s Relations</a></li>
+  
+<li><a href="#AllensRelatonsFunctions">Allen&#x2019;s Relations Functions</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="About_Allens_Relations_Back_to_TOC"></a><a name="AboutAllensRelations" id="AboutAllensRelations">About Allen&#x2019;s Relations</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports Allen&#x2019;s relations over interval types. Allen&#x2019;s relations are also called Allen&#x2019;s interval algebra. There are totally 13 base relations described by this algebra, and all of them are supported in AsterixDB (note that <tt>interval-equals</tt> is supported by the <tt>=</tt> comparison symbol so there is no extra function for it). </p>
+<p>A detailed description of Allen&#x2019;s relations can be found from its <a class="externalLink" href="http://en.wikipedia.org/wiki/Allen&apos;s_interval_algebra">wikipedia entry</a>. </p></div>
+<div class="section">
+<h2><a name="Allens_Relations_Functions_Back_to_TOC"></a><a name="AllensRelatonsFunctions" id="AllensRelatonsFunctions">Allen&#x2019;s Relations Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="interval-before_interval-after"></a>interval-before, interval-after</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-before(interval1, interval2)
+interval-after(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether an interval happens before/after another interval. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-before(interval1, interval2)</tt> is true if and only if <tt>interval1.end &lt; interval2.start</tt>, and <tt>interval-after(interval1, interval2)</tt> is true if and only if <tt>interval1.start &gt; interval2.end</tt>. If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2005-05-01&quot;, &quot;2012-09-09&quot;)
+return {&quot;interval-before&quot;: interval-before($itv1, $itv2), &quot;interval-after&quot;: interval-after($itv2, $itv1)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-before&quot;: true, &quot;interval-after&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-covers_interval-covered-by"></a>interval-covers, interval-covered-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-covers(interval1, interval2)
+interval-covered-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval covers the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-covers(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start &lt;= interval2.start
+AND interval1.end &gt;= interval2.end
+</pre></div></div>
+<p><tt>interval-covered-by(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.start &lt;= interval1.start
+AND interval2.end &gt;= interval1.end
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2000-03-01&quot;, &quot;2004-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2012-08-01&quot;)
+return {&quot;interval-covers&quot;: interval-covers($itv1, $itv2), &quot;interval-covered-by&quot;: interval-covered-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-covers&quot;: true, &quot;interval-covered-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-overlaps_interval-overlapped-by"></a>interval-overlaps, interval-overlapped-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-overlaps(interval1, interval2)
+interval-overlapped-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These functions check whether two intervals overlap with each other.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-overlaps(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start &lt; interval2.start
+AND interval2.end &gt; interval1.end
+AND interval1.end &gt; interval2.start
+</pre></div></div>
+<p><tt>interval-overlapped-by(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.start &lt; interval1.start
+AND interval1.end &gt; interval2.end
+AND interval2.end &gt; interval1.start
+</pre></div></div>
+<p>For all these functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p>
+<p>Note that <tt>interval-overlaps</tt> and <tt>interval-overlapped-by</tt> are following the Allen&#x2019;s relations on the definition of overlap.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2004-05-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-12-31&quot;)
+return {&quot;overlaps&quot;: interval-overlaps($itv1, $itv2), 
+        &quot;overlapped-by&quot;: interval-overlapped-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;overlaps&quot;: true, &quot;overlapped-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-overlapping"></a>interval-overlapping</h3>
+<p>Note that <tt>interval-overlapping</tt> is not an Allen&#x2019;s Relation, but syntactic sugar we added for the case that the intersect of two intervals is not empty. Basically this function returns true if any of these functions return true: <tt>interval-overlaps</tt>, <tt>interval-overlapped-by</tt>, <tt>interval-covers</tt>, or <tt>interval-covered-by</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-overlapping(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>This functions check whether two intervals share any points with each other. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-overlapping(interval1, interval2)</tt> is true if</p>
+  
+<div class="source">
+<div class="source">
+<pre>(interval2.start &gt;= interval1.start
+AND interval2.start &lt; interval1.end)
+OR
+(interval2.end &gt; interval1.start
+AND interval2.end &lt;= interval1.end)
+</pre></div></div>
+<p>If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2004-05-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-12-31&quot;)
+return {&quot;overlapping1&quot;: interval-overlapping($itv1, $itv2), 
+        &quot;overlapping2&quot;: interval-overlapping($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;overlapping1&quot;: true, &quot;overlapping2&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-meets_interval-met-by"></a>interval-meets, interval-met-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-meets(interval1, interval2)
+interval-met-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether an interval meets with another interval. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-meets(interval1, interval2)</tt> is true if and only if <tt>interval1.end = interval2.start</tt>, and <tt>interval-met-by(interval1, interval2)</tt> is true if and only if <tt>interval1.start = interval2.end</tt>. If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2005-01-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-08-01&quot;)
+return {&quot;meets&quot;: interval-meets($itv1, $itv2), &quot;metby&quot;: interval-met-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;meets&quot;: true, &quot;metby&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-starts_interval-started-by"></a>interval-starts, interval-started-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-starts(interval1, interval2)
+interval-started-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval starts with the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-starts(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start = interval2.start
+AND interval1.end &lt;= interval2.end
+</pre></div></div>
+<p><tt>interval-started-by(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start = interval2.start
+AND interval2.end &lt;= interval1.end
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2000-01-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2006-08-01&quot;, &quot;2006-08-01&quot;)
+return {&quot;interval-starts&quot;: interval-starts($itv1, $itv2), &quot;interval-started-by&quot;: interval-started-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-starts&quot;: true, &quot;interval-started-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-ends_interval-ended-by"></a>interval-ends, interval-ended-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-ends(interval1, interval2)
+interval-ended-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval ends with the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-ends(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.end = interval2.end
+AND interval1.start &gt;= interval2.start
+</pre></div></div>
+<p><tt>interval-ended-by(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.end = interval1.end
+AND interval2.start &gt;= interval1.start
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;1998-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2006-09-10&quot;, &quot;2007-03-01&quot;)
+return {&quot;interval-ends&quot;: interval-ends($itv1, $itv2), &quot;interval-ended-by&quot;: interval-ended-by($itv3, $itv4) }
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-ends&quot;: true, &quot;interval-ended-by&quot;: true }
+</pre></div></div></li>
+</ul></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/datamodel.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/datamodel.html b/content/docs/0.8.8-incubating/aql/datamodel.html
new file mode 100644
index 0000000..b72617f
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/datamodel.html
@@ -0,0 +1,783 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Asterix Data Model (ADM)</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Asterix Data Model (ADM)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Asterix Data Model (ADM)</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PrimitiveTypes">Primitive Types</a>
+  
+<ul>
+    
+<li><a href="#PrimitiveTypesBoolean">Boolean</a></li>
+    
+<li><a href="#PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a></li>
+    
+<li><a href="#PrimitiveTypesFloat">Float</a></li>
+    
+<li><a href="#PrimitiveTypesDouble">Double</a></li>
+    
+<li><a href="#PrimitiveTypesString">String</a></li>
+    
+<li><a href="#PrimitiveTypesPoint">Point</a></li>
+    
+<li><a href="#PrimitiveTypesLine">Line</a></li>
+    
+<li><a href="#PrimitiveTypesRectangle">Rectangle</a></li>
+    
+<li><a href="#PrimitiveTypesCircle">Circle</a></li>
+    
+<li><a href="#PrimitiveTypesPolygon">Polygon</a></li>
+    
+<li><a href="#PrimitiveTypesDate">Date</a></li>
+    
+<li><a href="#PrimitiveTypesTime">Time</a></li>
+    
+<li><a href="#PrimitiveTypesDateTime">Datetime</a></li>
+    
+<li><a href="#PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a></li>
+    
+<li><a href="#PrimitiveTypesInterval">Interval</a></li>
+    
+<li><a href="#PrimitiveTypesUUID">UUID</a></li>
+  </ul></li>
+  
+<li><a href="#DerivedTypes">Derived Types</a>
+  
+<ul>
+    
+<li><a href="#DerivedTypesRecord">Record</a></li>
+    
+<li><a href="#DerivedTypesOrderedList">OrderedList</a></li>
+    
+<li><a href="#DerivedTypesUnorderedList">UnorderedList</a></li>
+  </ul></li>
+</ul>
+<p>An instance of Asterix data model (ADM) can be a <i><i>primitive type</i></i> (<tt>int32</tt>, <tt>int64</tt>, <tt>string</tt>, <tt>float</tt>, <tt>double</tt>, <tt>date</tt>, <tt>time</tt>, <tt>datetime</tt>, etc. or <tt>null</tt>) or a <i><i>derived type</i></i>.</p></div>
+<div class="section">
+<h2><a name="Primitive_Types_Back_to_TOC"></a><a name="PrimitiveTypes" id="PrimitiveTypes">Primitive Types</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="BooleanBack_to_TOC"></a><a name="PrimitiveTypesBoolean" id="PrimitiveTypesBoolean">Boolean</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>boolean</tt> data type can have one of the two values: <i><i>true</i></i> or <i><i>false</i></i>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $t := true
+let $f := false
+return { &quot;true&quot;: $t, &quot;false&quot;: $f }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;true&quot;: true, &quot;false&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Int8__Int16__Int32__Int64_Back_to_TOC"></a><a name="PrimitiveTypesInt" id="PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>Integer types using 8, 16, 32, or 64 bits. The ranges of these types are:</p>
+
+<ul>
+  
+<li><tt>int8</tt>: -127 to 127</li>
+  
+<li><tt>int16</tt>: -32767 to 32767</li>
+  
+<li><tt>int32</tt>: -2147483647 to 2147483647</li>
+  
+<li><tt>int64</tt>: -9223372036854775808 to 9223372036854775807</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v8 := int8(&quot;125&quot;)
+let $v16 := int16(&quot;32765&quot;)
+let $v32 := 294967295
+let $v64 := int64(&quot;1700000000000000000&quot;)
+return { &quot;int8&quot;: $v8, &quot;int16&quot;: $v16, &quot;int32&quot;: $v32, &quot;int64&quot;: $v64}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;int8&quot;: 125i8, &quot;int16&quot;: 32765i16, &quot;int32&quot;: 294967295, &quot;int64&quot;: 1700000000000000000i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Float_Back_to_TOC"></a><a name="PrimitiveTypesFloat" id="PrimitiveTypesFloat">Float</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>float</tt> represents approximate numeric data values using 4 bytes. The range of a float value can be from 2^(-149) to (2-2^(-23)&#xb7;2^(127) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := float(&quot;NaN&quot;)
+let $v2 := float(&quot;INF&quot;)
+let $v3 := float(&quot;-INF&quot;)
+let $v4 := float(&quot;-2013.5&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: NaNf, &quot;v2&quot;: Infinityf, &quot;v3&quot;: -Infinityf, &quot;v4&quot;: -2013.5f }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Double_Back_to_TOC"></a><a name="PrimitiveTypesDouble" id="PrimitiveTypesDouble">Double</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>double</tt> represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))&#xb7;2^(1023) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := double(&quot;NaN&quot;)
+let $v2 := double(&quot;INF&quot;)
+let $v3 := double(&quot;-INF&quot;)
+let $v4 := double(&quot;-2013.593823748327284&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: NaNd, &quot;v2&quot;: Infinityd, &quot;v3&quot;: -Infinityd, &quot;v4&quot;: -2013.5938237483274d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="String_Back_to_TOC"></a><a name="PrimitiveTypesString" id="PrimitiveTypesString">String</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>string</tt> represents a sequence of characters.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := string(&quot;This is a string.&quot;)
+let $v2 := string(&quot;\&quot;This is a quoted string\&quot;&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: &quot;This is a string.&quot;, &quot;v2&quot;: &quot;\&quot;This is a quoted string\&quot;&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Point_Back_to_TOC"></a><a name="PrimitiveTypesPoint" id="PrimitiveTypesPoint">Point</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>point</tt> is the fundamental two-dimensional building block for spatial types. It consists of two <tt>double</tt> coordinates x and y.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := point(&quot;80.10d, -10E5&quot;)
+let $v2 := point(&quot;5.10E-10d, -10E5&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: point(&quot;80.1,-1000000.0&quot;), &quot;v2&quot;: point(&quot;5.1E-10,-1000000.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Line_Back_to_TOC"></a><a name="PrimitiveTypesLine" id="PrimitiveTypesLine">Line</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>line</tt> consists of two points that represent the start and the end points of a line segment.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := line(&quot;10.1234,11.1e-1 +10.2E-2,-11.22&quot;)
+let $v2 := line(&quot;0.1234,-1.00e-10 +10.5E-2,-01.02&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: line(&quot;10.1234,1.11 0.102,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.0E-10 0.105,-1.02&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="RectangleBack_to_TOC"></a><a name="PrimitiveTypesRectangle" id="PrimitiveTypesRectangle">Rectangle</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>rectangle</tt> consists of two points that represent the <i><i>bottom left</i></i> and <i><i>upper right</i></i> corners of a rectangle.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := rectangle(&quot;5.1,11.8 87.6,15.6548&quot;)
+let $v2 := rectangle(&quot;0.1234,-1.00e-10 5.5487,0.48765&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.0E-10 5.5487,0.48765&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="CircleBack_to_TOC"></a><a name="PrimitiveTypesCircle" id="PrimitiveTypesCircle">Circle</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>circle</tt> consists of one point that represents the center of the circle and a radius of type <tt>double</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := circle(&quot;10.1234,11.1e-1 +10.2E-2&quot;)
+let $v2 := circle(&quot;0.1234,-1.00e-10 +10.5E-2&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: circle(&quot;10.1234,1.11 0.102&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.0E-10 0.105&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="PolygonBack_to_TOC"></a><a name="PrimitiveTypesPolygon" id="PrimitiveTypesPolygon">Polygon</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>polygon</tt> consists of <i><i>n</i></i> points that represent the vertices of a <i><i>simple closed</i></i> polygon.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := polygon(&quot;-1.2,+1.3e2 -2.14E+5,2.15 -3.5e+2,03.6 -4.6E-3,+4.81&quot;)
+let $v2 := polygon(&quot;-1.0,+10.5e2 -02.15E+50,2.5 -1.0,+3.3e3 -2.50E+05,20.15 +3.5e+2,03.6 -4.60E-3,+4.75 -2,+1.0e2 -2.00E+5,20.10 30.5,03.25 -4.33E-3,+4.75&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: polygon(&quot;-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81&quot;), &quot;v2&quot;: polygon(&quot;-1.0,1050.0 -2.15E50,2.5 -1.0,3300.0 -250000.0,20.15 350.0,3.6 -0.0046,4.75 -2.0,100.0 -200000.0,20.1 30.5,3.25 -0.00433,4.75&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DateBack_to_TOC"></a><a name="PrimitiveTypesDate" id="PrimitiveTypesDate">Date</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>date</tt> represents a time point along the Gregorian calendar system specified by the year, month and day. ASTERIX supports the date from <tt>-9999-01-01</tt> to <tt>9999-12-31</tt>.</p>
+<p>A date value can be represented in two formats, extended format and basic format.</p>
+
+<ul>
+  
+<li>Extended format is represented as <tt>[-]yyyy-mm-dd</tt> for <tt>year-month-day</tt>. Each field should be padded if there are less digits than the format specified.</li>
+  
+<li>Basic format is in the format of <tt>[-]yyyymmdd</tt>.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := date(&quot;2013-01-01&quot;)
+let $v2 := date(&quot;-19700101&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-1970-01-01&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="TimeBack_to_TOC"></a><a name="PrimitiveTypesTime" id="PrimitiveTypesTime">Time</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>time</tt> type describes the time within the range of a day. It is represented by three fields: hour, minute and second. Millisecond field is optional as the fraction of the second field. Its extended format is as <tt>hh:mm:ss[.mmm]</tt> and the basic format is <tt>hhmmss[mmm]</tt>. The value domain is from <tt>00:00:00.000</tt> to <tt>23:59:59.999</tt>.</p>
+<p>Timezone field is optional for a time value. Timezone is represented as <tt>[+|-]hh:mm</tt> for extended format or <tt>[+|-]hhmm</tt> for basic format. Note that the sign designators cannot be omitted. <tt>Z</tt> can also be used to represent the UTC local time. If no timezone information is given, it is UTC by default.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := time(&quot;12:12:12.039Z&quot;)
+let $v2 := time(&quot;000000000-0800&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;08:00:00.000Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DatetimeBack_to_TOC"></a><a name="PrimitiveTypesDateTime" id="PrimitiveTypesDateTime">Datetime</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>A <tt>datetime</tt> value is a combination of an <tt>date</tt> and <tt>time</tt>, representing a fixed time point along the Gregorian calendar system. The value is among <tt>-9999-01-01 00:00:00.000</tt> and <tt>9999-12-31 23:59:59.999</tt>.</p>
+<p>A <tt>datetime</tt> value is represented as a combination of the representation of its <tt>date</tt> part and <tt>time</tt> part, separated by a separator <tt>T</tt>. Either extended or basic format can be used, and the two parts should be the same format.</p>
+<p>Millisecond field and timezone field are optional, as specified in the <tt>time</tt> type.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := datetime(&quot;2013-01-01T12:12:12.039Z&quot;)
+let $v2 := datetime(&quot;-19700101T000000000-0800&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-1970-01-01T08:00:00.000Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DurationYear-month-durationDay-time-durationBack_to_TOC"></a><a name="PrimitiveTypesDuration" id="PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>duration</tt> represents a duration of time. A duration value is specified by integers on at least one of the following fields: year, month, day, hour, minute, second, and millisecond.</p>
+<p>A duration value is in the format of <tt>[-]PnYnMnDTnHnMn.mmmS</tt>. The millisecond part (as the fraction of the second field) is optional, and when no millisecond field is used, the decimal point should also be absent.</p>
+<p>Negative durations are also supported for the arithmetic operations between time instance types (<tt>date</tt>, <tt>time</tt> and <tt>datetime</tt>), and is used to roll the time back for the given duration. For example <tt>date(&quot;2012-01-01&quot;) + duration(&quot;-P3D&quot;)</tt> will return <tt>date(&quot;2011-12-29&quot;)</tt>.</p>
+<p>There are also two sub-duration types, namely <tt>year-month-duration</tt> and <tt>day-time-duration</tt>. <tt>year-month-duration</tt> represents only the years and months of a duration, while <tt>day-time-duration</tt> represents only the day to millisecond fields. Different from the <tt>duration</tt> type, both these two subtypes are totally ordered, so they can be used for comparison and index construction.</p>
+<p>Note that a canonical representation of the duration is always returned, regardless whether the duration is in the canonical representation or not from the user&#x2019;s input. More information about canonical representation can be found from <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-dayTimeDuration">XPath dayTimeDuration Canonical Representation</a> and <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-yearMonthDuration">yearMonthDuration Canonical Representation</a>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := duration(&quot;P100Y12MT12M&quot;)
+let $v2 := duration(&quot;-PT20.943S&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: duration(&quot;P101YT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="IntervalBack_to_TOC"></a><a name="PrimitiveTypesInterval" id="PrimitiveTypesInterval">Interval</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>interval</tt> represents inclusive-exclusive ranges of time. It is defined by two time point values with the same temporal type(<tt>date</tt>, <tt>time</tt> or <tt>datetime</tt>).</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := interval-from-date(date(&quot;2013-01-01&quot;), date(&quot;20130505&quot;))
+let $v2 := interval-from-time(time(&quot;00:01:01&quot;), time(&quot;213901049+0800&quot;))
+let $v3 := interval-from-datetime(datetime(&quot;2013-01-01T00:01:01&quot;), datetime(&quot;20130505T213901049+0800&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: interval-date(&quot;2013-01-01, 2013-05-05&quot;), &quot;v2&quot;: interval-time(&quot;00:01:01.000Z, 13:39:01.049Z&quot;), &quot;v3&quot;: interval-datetime(&quot;2013-01-01T00:01:01.000Z, 2013-05-05T13:39:01.049Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="UUIDBack_to_TOC"></a><a name="PrimitiveTypesUUID" id="PrimitiveTypesUUID">UUID</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>uuid</tt> represents a UUID value, which stands for Universally unique identifier. It is defined by a canonical format using hexadecimal text with inserted hyphen characters. (E.g.: 5a28ce1e-6a74-4201-9e8f-683256e5706f). This type is generally used to store auto-generated primary key values.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;)
+return { &quot;v1&quot;:$v1 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;) }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Derived_TypesBack_to_TOC"></a><a name="DerivedTypes" id="DerivedTypes">Derived Types</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="RecordBack_to_TOC"></a><a name="DerivedTypesRecord" id="DerivedTypesRecord">Record</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>A <tt>record</tt> contains a set of &#xfb01;elds, where each &#xfb01;eld is described by its name and type. A record type is either open or closed. Open records can contain &#xfb01;elds that are not part of the type de&#xfb01;nition, while closed records cannot. Syntactically, record constructors are surrounded by curly braces &#x201c;{&#x2026;}&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 213508, &quot;name&quot;: &quot;Alice Bob&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="OrderedListBack_to_TOC"></a><a name="DerivedTypesOrderedList" id="DerivedTypesOrderedList">OrderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>An <tt>orderedList</tt> is a sequence of values for which the order is determined by creation or insertion. OrderedList constructors are denoted by brackets: &#x201c;[&#x2026;]&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    [&quot;alice&quot;, 123, &quot;bob&quot;, null]
+</pre></div></div></div>
+<div class="section">
+<h3><a name="UnorderedListBack_to_TOC"></a><a name="DerivedTypesUnorderedList" id="DerivedTypesUnorderedList">UnorderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>An <tt>unorderedList</tt> is an unordered sequence of values, similar to bags in SQL. UnorderedList constructors are denoted by two opening flower braces followed by data and two closing flower braces, like &#x201c;{{&#x2026;}}&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    {{&quot;hello&quot;, 9328, &quot;world&quot;, [1, 2, null]}}
+</pre></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[16/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/overview.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/overview.html b/content/docs/0.8.8-incubating/overview.html
new file mode 100644
index 0000000..0824800
--- /dev/null
+++ b/content/docs/0.8.8-incubating/overview.html
@@ -0,0 +1,294 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB: A Big Data Management System</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB: A Big Data Management System</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#WhatIsAsterixDB">What Is AsterixDB?</a></li>
+  
+<li><a href="#GettingAndUsingAsterixDB">Getting and Using AsterixDB</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="What_Is_AsterixDB_Back_to_TOC"></a><a name="WhatIsAsterixDB" id="WhatIsAsterixDB">What Is AsterixDB?</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>In a nutshell, AsterixDB is a full-function BDMS (Big Data Management System) with a rich feature set that distinguishes it from pretty much any other Big Data platform that&#x2019;s out and available today. We believe that its feature set makes it well-suited to modern needs such as web data warehousing and social data storage and analysis. AsterixDB has:</p>
+
+<ul>
+  
+<li>A semistructured NoSQL style data model (ADM) resulting from extending JSON with object database ideas</li>
+  
+<li>An expressive and declarative query language (AQL) that supports a broad range of queries and analysis over semistructured data</li>
+  
+<li>A parallel runtime query execution engine, Hyracks, that has been scale-tested on up to 1000+ cores and 500+ disks</li>
+  
+<li>Partitioned LSM-based data storage and indexing to support efficient ingestion and management of semistructured data</li>
+  
+<li>Support for query access to externally stored data (e.g., data in HDFS) as well as to data stored natively by AsterixDB</li>
+  
+<li>A rich set of primitive data types, including spatial and temporal data in addition to integer, floating point, and textual data</li>
+  
+<li>Secondary indexing options that include B+ trees, R trees, and inverted keyword (exact and fuzzy) index types</li>
+  
+<li>Support for fuzzy and spatial queries as well as for more traditional parametric queries</li>
+  
+<li>Basic transactional (concurrency and recovery) capabilities akin to those of a NoSQL store</li>
+</ul></div>
+<div class="section">
+<h2><a name="Getting_and_Using_AsterixDB_Back_to_TOC"></a><a name="GettingAndUsingAsterixDB" id="GettingAndUsingAsterixDB">Getting and Using AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>You are most likely here because you are interested in getting your hands on AsterixDB&#x2014;so you would like to know how to get it, how to set it up, and how to use it. The following is a list of the supporting documents that we have available today:</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p><a href="install.html">Installing AsterixDB using Managix</a> : This is our installation guide, and it is where you should start. This document will tell you how to obtain, install, and manage instances of <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">AsterixDB</a>, including both single-machine setup (for developers) as well as cluster installations (for deployment in its intended form).</p></li>
+  
+<li>
+<p><a href="aql/primer.html">AsterixDB 101: An ADM and AQL Primer</a> : This is a first-timers introduction to the user model of the AsterixDB BDMS, by which we mean the view of AsterixDB as seen from the perspective of an &#x201c;average user&#x201d; or Big Data application developer. The AsterixDB user model consists of its data modeling features (ADM) and its query capabilities (AQL). This document presents a tiny &#x201c;social data warehousing&#x201d; example and uses it as a backdrop for describing, by example, the key features of AsterixDB. By working through this document, you will learn how to define the artifacts needed to manage data in AsterixDB, how to load data into the system, how to use most of the basic features of its query language, and how to insert and delete data dynamically.</p></li>
+  
+<li>
+<p><a href="aql/datamodel.html">Asterix Data Model (ADM)</a>, <a href="aql/functions.html">Asterix Functions</a>, <a href="aql/allens.html">Asterix functions for Allen&#x2019;s Relations</a>, and <a href="aql/manual.html">Asterix Query Language (AQL)</a> : These are reference documents that catalog the primitive data types and built-in functions available in AQL and the reference manual for AQL itself.</p></li>
+  
+<li>
+<p><a href="api.html">REST API to AsterixDB</a> : Access to data in an AsterixDB instance is provided via a REST-based API. This is a short document that describes the REST API entry points and their URL syntax.</p></li>
+</ol>
+<p>To all who have now come this far: Thanks for your interest in AsterixDB, and for kicking its tires in its Beta form. In addition to getting the system and trying it out, please sign up as a member of the AsterixDB user mailing list (users (at) asterixdb.incubator.apache.org) so that you can contact us easily with your questions, issues, and other feedback. We want AsterixDB to be a &#x201c;big hit&#x201d; some day, and we are anxious to see what users do with it and to learn from that feedback what we should be working on most urgently in the next phase of the project.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/udf.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/udf.html b/content/docs/0.8.8-incubating/udf.html
new file mode 100644
index 0000000..5f1baa0
--- /dev/null
+++ b/content/docs/0.8.8-incubating/udf.html
@@ -0,0 +1,388 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Support for User Defined Functions in AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Support for User Defined Functions in AsterixDB</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Support for User Defined Functions in AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PreprocessingCollectedData">Using UDF to preprocess feed-collected data</a></li>
+  
+<li><a href="#WritingAnExternalUDF">Writing an External UDF</a></li>
+  
+<li><a href="#CreatingAnAsterixDBLibrary">Creating an AsterixDB Library</a></li>
+  
+<li><a href="#installingUDF">Installing an AsterixDB Library</a></li>
+</ul>
+<p>In this document, we describe the support for implementing, using, and installing user-defined functions (UDF) in AsterixDB. We will explain how we can use UDFs to preprocess, e.g., data collected using feeds (see the <a href="feeds/tutorial.html">feeds tutorial</a>).</p>
+<div class="section">
+<h3><a name="Installing_an_AsterixDB_Library"></a><a name="installingUDF">Installing an AsterixDB Library</a></h3>
+<p>We assume you have followed the <a href="../install.html">installation instructions</a> to set up a running AsterixDB instance. Let us refer your AsterixDB instance by the name &#x201c;my_asterix&#x201d;.</p>
+
+<ul>
+  
+<li>
+<p>Step 1: Stop the AsterixDB instance if it is in the ACTIVE state.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ managix stop -n my_asterix
+</pre></div></div></li>
+  
+<li>
+<p>Step 2: Install the library using Managix install command. Just to illustrate, we use the help command to look up the syntax</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ managix help  -cmd install
+Installs a library to an asterix instance.
+Options
+n  Name of Asterix Instance
+d  Name of the dataverse under which the library will be installed
+l  Name of the library
+p  Path to library zip bundle
+</pre></div></div></li>
+</ul>
+<p>Above is a sample output and explains the usage and the required parameters. Each library has a name and is installed under a dataverse. Recall that we had created a dataverse by the name - &#x201c;feeds&#x201d; prior to creating our datatypes and dataset. We shall name our library - &#x201c;testlib&#x201d;.</p>
+<p>We assume you have a library zip bundle that needs to be installed. To install the library, use the Managix install command. An example is shown below.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix install -n my_asterix -d feeds -l testlib -p extlibs/asterix-external-data-0.8.7-binary-assembly.zip
+</pre></div></div>
+<p>You should see the following message:</p>
+
+<div class="source">
+<div class="source">
+<pre>    INFO: Installed library testlib
+</pre></div></div>
+<p>We shall next start our AsterixDB instance using the start command as shown below.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix start -n my_asterix
+</pre></div></div>
+<p>You may now use the AsterixDB library in AQL statements and queries. To look at the installed artifacts, you may execute the following query at the AsterixDB web-console.</p>
+
+<div class="source">
+<div class="source">
+<pre>    for $x in dataset Metadata.Function
+    return $x
+
+    for $x in dataset Metadata.Library
+    return $x
+</pre></div></div>
+<p>Our library is now installed and is ready to be used.</p></div></div>
+<div class="section">
+<h2><a name="Preprocessing_Collected_Data"></a><a name="PreprocessingCollectedData" id="PreprocessingCollectedData">Preprocessing Collected Data</a></h2>
+<p>In the following we assume that you already created the <tt>TwitterFeed</tt> and its corresponding data types and dataset following the instruction explained in the <a href="feeds/tutorial.html">feeds tutorial</a>.</p>
+<p>A feed definition may optionally include the specification of a user-defined function that is to be applied to each feed record prior to persistence. Examples of pre-processing might include adding attributes, filtering out records, sampling, sentiment analysis, feature extraction, etc. We can express a UDF, which can be defined in AQL or in a programming language such as Java, to perform such pre-processing. An AQL UDF is a good fit when pre-processing a record requires the result of a query (join or aggregate) over data contained in AsterixDB datasets. More sophisticated processing such as sentiment analysis of text is better handled by providing a Java UDF. A Java UDF has an initialization phase that allows the UDF to access any resources it may need to initialize itself prior to being used in a data flow. It is assumed by the AsterixDB compiler to be stateless and thus usable as an embarrassingly parallel black box. In contrast, the AsterixDB compiler can reason about an AQL 
 UDF and involve the use of indexes during its invocation.</p>
+<p>We consider an example transformation of a raw tweet into its lightweight version called <tt>ProcessedTweet</tt>, which is defined next.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create type ProcessedTweet if not exists as open {
+        id: string,
+        user_name:string,
+        location:point,
+        created_at:string,
+        message_text:string,
+        country: string,
+        topics: {{string}}
+    };
+
+    create dataset ProcessedTweets(ProcessedTweet)
+    primary key id;
+</pre></div></div>
+<p>The processing required in transforming a collected tweet to its lighter version of type <tt>ProcessedTweet</tt> involves extracting the topics or hash-tags (if any) in a tweet and collecting them in the referred &#x201c;topics&#x201d; attribute for the tweet. Additionally, the latitude and longitude values (doubles) are combined into the spatial point type. Note that spatial data types are considered as first-class citizens that come with the support for creating indexes. Next we show a revised version of our example TwitterFeed that involves the use of a UDF. We assume that the UDF that contains the transformation logic into a &#x201c;ProcessedTweet&#x201d; is available as a Java UDF inside an AsterixDB library named &#x2018;testlib&#x2019;. We defer the writing of a Java UDF and its installation as part of an AsterixDB library to a later section of this document.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create feed ProcessedTwitterFeed if not exists
+    using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+    (&quot;consumer.key&quot;=&quot;************&quot;),
+    (&quot;consumer.secret&quot;=&quot;**************&quot;),
+    (&quot;access.token&quot;=&quot;**********&quot;),
+    (&quot;access.token.secret&quot;=&quot;*************&quot;))
+
+    apply function testlib#addHashTagsInPlace;
+</pre></div></div>
+<p>Note that a feed adaptor and a UDF act as pluggable components. These contribute towards providing a generic &#x201c;plug-and-play&#x201d; model where custom implementations can be provided to cater to specific requirements.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Building_a_Cascade_Network_of_Feeds"></a>Building a Cascade Network of Feeds</h4>
+<p>Multiple high-level applications may wish to consume the data ingested from a data feed. Each such application might perceive the feed in a different way and require the arriving data to be processed and/or persisted differently. Building a separate flow of data from the external source for each application is wasteful of resources as the pre-processing or transformations required by each application might overlap and could be done together in an incremental fashion to avoid redundancy. A single flow of data from the external source could provide data for multiple applications. To achieve this, we introduce the notion of primary and secondary feeds in AsterixDB.</p>
+<p>A feed in AsterixDB is considered to be a primary feed if it gets its data from an external data source. The records contained in a feed (subsequent to any pre-processing) are directed to a designated AsterixDB dataset. Alternatively or additionally, these records can be used to derive other feeds known as secondary feeds. A secondary feed is similar to its parent feed in every other aspect; it can have an associated UDF to allow for any subsequent processing, can be persisted into a dataset, and/or can be made to derive other secondary feeds to form a cascade network. A primary feed and a dependent secondary feed form a hierarchy. As an example, we next show an example AQL statement that redefines the previous feed &#x201c;ProcessedTwitterFeed&#x201d; in terms of their respective parent feed (TwitterFeed).</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    drop feed ProcessedTwitterFeed if exists;
+
+    create secondary feed ProcessedTwitterFeed from feed TwitterFeed
+    apply function testlib#addHashTags;
+
+    connect feed ProcessedTwitterFeed to dataset ProcessedTweets;
+</pre></div></div>
+<p>The <tt>addHashTags</tt> function is already provided in the example UDF.To see what records are being inserted into the dataset, we can perform a simple dataset scan after allowing a few moments for the feed to start ingesting data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    for $i in dataset ProcessedTweets limit 10 return $i;
+</pre></div></div>
+<p>For an example of how to write a Java UDF from scratch, the source for the example UDF that has been used in this tutorial is available <a class="externalLink" href="https://github.com/apache/incubator-asterixdb/tree/master/asterix-external-data/src/test/java/org/apache/asterix/external/library">here</a></p></div></div></div>
+<div class="section">
+<h2><a name="Unstalling_an_AsterixDB_Library"></a><a name="installingUDF">Unstalling an AsterixDB Library</a></h2>
+<p>To uninstall a library, use the Managix uninstall command as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix stop -n my_asterix
+
+    $ managix uninstall -n my_asterix -d feeds -l testlib
+</pre></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/yarn.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/yarn.html b/content/docs/0.8.8-incubating/yarn.html
new file mode 100644
index 0000000..df20c35
--- /dev/null
+++ b/content/docs/0.8.8-incubating/yarn.html
@@ -0,0 +1,693 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Introduction</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Deploying AsterixDB using YARN</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Introduction</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#arch">Architecture Overview</a></li>
+  
+<li><a href="#prereq">Prerequisites</a></li>
+  
+<li><a href="#tut">Tutorial Installation</a></li>
+  
+<li><a href="#faq">FAQ and Common Issues</a></li>
+  
+<li><a href="#detail">Reference guide to AsterixDB&#x2019;s YARN Client</a></li>
+</ul>
+<p>This is a guide describing how to deploy AsterixDB onto a YARN-based environment.</p></div>
+<div class="section">
+<h2><a name="AsterixDB_and_the_YARN_environment"></a><a name="arch" id="arch">AsterixDB and the YARN environment</a></h2>
+<p>AsterixDB uses a shared-nothing architecture and local file-based storage- not HDFS. Hence we are reliant on the local storage on each node (&#x2018;iodevices&#x2019; in AsterixDB ). In YARN there are 3 main types of storage available: </p>
+
+<ul>
+  
+<li>HDFS file storage (only suitable for long-lived artifacts, can be slower than local disk)</li>
+  
+<li>Ephemeral container storage that is cleaned by YARN after a container exits (unsuitable except for transient artifacts)</li>
+  
+<li>Node-local destinations not managed by YARN, but which are accesable by the container and live beyond its termination.</li>
+</ul>
+<p>AsterixDB uses only the last type of storage, which is available with both the DefaultContainerExecutor and LinuxContainerExecutor. However keep in mind that with the DefaultContainerExecutor, the directory must be accessable by the same process that the YARN NodeManager is running as, while with the LinuxContainerExecutor it must be accessable by the unix user who is running the job.</p></div>
+<div class="section">
+<h2><a name="Prerequisites"></a><a name="prereq" id="prereq">Prerequisites</a></h2>
+<p>For this tutorial it will be assumed that we have a YARN cluster with the proper environment variables set. To test this, try running the DistributedShell example that is distributed as part of Apache Hadoop. If that sample application can be run successfully then the environment should be acceptable for launching AsterixDB on to your YARN-enabled cluster.</p>
+<div class="section">
+<h3><a name="Vagrant_and_Puppet_Virtualized_cluster_for_Tutorial"></a>Vagrant and Puppet Virtualized cluster for Tutorial</h3>
+<p>For the purposes of this tutorial, a virtualized cluster that matches all of the tutorial configurations can be found at <a class="externalLink" href="https://github.com/parshimers/yarn-sample-cluster">https://github.com/parshimers/yarn-sample-cluster</a>. It requires a machine with about 4-8GB of RAM to run. To start with this cluster, first clone the repository:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; git clone https://github.com/parshimers/yarn-sample-cluster.git
+    Cloning into 'yarn-sample-cluster'...
+    remote: Counting objects: 490, done.
+    remote: Compressing objects: 100% (315/315), done.
+    remote: Total 490 (delta 152), reused 490 (delta 152)
+    Receiving objects: 100% (490/490), 521.34 KiB | 201.00 KiB/s, done.
+    Resolving deltas: 100% (152/152), done.
+    Checking connectivity... done.
+</pre></div></div>
+<p>If the &#x2018;hostmanager&#x2019; plugin for Vagrant isn&#x2019;t already installed, install it like so:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant plugin install vagrant-hostmanager
+    Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
+    Installed the plugin 'vagrant-hostmanager (1.5.0)'!
+</pre></div></div>
+<p>Then start the tutorial cluster. The hostmanger plugin may ask for sudo at some point, because it updates your hosts file to include the virtual machines.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant up
+    Bringing machine 'nc2' up with 'virtualbox' provider...
+    Bringing machine 'nc1' up with 'virtualbox' provider...
+    Bringing machine 'cc' up with 'virtualbox' provider...
+    ...
+</pre></div></div>
+<p>Once vagrant returns, the environment will be ready. The working directory with the Vagrantfile is also visible to each of the virtual machines (in the /vagrant directory), so we will unzip the Asterix binaries here as well for easy access. The YARN binary can be found on the AsterixDB <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">downloads page</a></p>
+
+<div class="source">
+<div class="source">
+<pre>&#x21aa; unzip -d asterix-yarn/ asterix-yarn-binary-assembly.zip
+...
+</pre></div></div>
+<p>To log into the node from which we will run the rest of the tutorial, use &#x2018;vagrant ssh&#x2019; to get to the CC node and move to the YARN client&#x2019;s location:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant ssh cc
+    [vagrant@cc ~]$
+    [vagrant@cc ~]$ cd /vagrant/asterix-yarn
+    [vagrant@cc asterix-yarn]$ 
+</pre></div></div>
+<h1><a name="tut" id="tut">Tutorial installation</a></h1></div></div>
+<div class="section">
+<h2><a name="Configuration"></a>Configuration</h2>
+<p>To deploy AsterixDB onto a YARN cluster, we need to construct a configuration file that describes the resources that will be requested from YARN for AsterixDB. </p>
+
+<div class="source">
+
+<div class="source">
+<pre>
+<img src="images/yarn_clust.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." />
+<i>Fig. 1</i>:  Illustration of a simple YARN cluster with AsterixDB processes and their locations
+</pre></div>
+</div>
+<p>This AsterixDB cluster description file corresponds to the above deployed scenario.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;cluster xmlns=&quot;yarn_cluster&quot;&gt;
+        &lt;name&gt;my_awesome_instance&lt;/name&gt;
+        &lt;txn_log_dir&gt;/home/yarn/&lt;/txn_log_dir&gt;
+        &lt;iodevices&gt;/home/yarn/&lt;/iodevices&gt;
+        &lt;store&gt;asterix-data&lt;/store&gt;
+        &lt;master_node&gt;
+            &lt;id&gt;cc&lt;/id&gt;
+            &lt;client_ip&gt;10.10.0.2&lt;/client_ip&gt;
+            &lt;cluster_ip&gt;10.10.0.2&lt;/cluster_ip&gt;
+            &lt;client_port&gt;1098&lt;/client_port&gt;
+            &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+            &lt;http_port&gt;8888&lt;/http_port&gt;
+        &lt;/master_node&gt;
+        &lt;node&gt;
+            &lt;id&gt;nc1&lt;/id&gt;
+            &lt;cluster_ip&gt;10.10.0.3&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+        &lt;node&gt;
+            &lt;id&gt;nc2&lt;/id&gt;
+            &lt;cluster_ip&gt;10.10.0.4&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+        &lt;metadata_node&gt;nc1&lt;/metadata_node&gt;
+    &lt;/cluster&gt;
+</pre></div></div>
+<p>In this example we have 3 NCs and one CC. Each node is defined by a unique name (not necessarily hostname) and an IP on which AsterixDB nodes will listen and communicate with eachother. This is the &#x2018;cluster_ip&#x2019; parameter. The &#x2018;client_ip&#x2019; parameter is the interface on which client-facing services are presented, for example the web interface. For the next step this file will be saved as &#x2018;my_awesome_cluster_desc.xml&#x2019; in the configs directory.</p></div>
+<div class="section">
+<h2><a name="Installing_and_starting_the_instance"></a>Installing and starting the instance</h2>
+<p>With this configuration in hand, the YARN client can be used to deploy AsterixDB onto the cluster:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance -c configs/my_awesome_cluster_desc.xml install
+    Waiting for new AsterixDB Instance to start  .
+    Asterix successfully deployed and is now running.
+</pre></div></div>
+<p>The instance will be visible in the YARN RM similar to the below image 
+<div class="source"> </p>
+<div class="source">
+<pre> <img src="images/running_inst.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." /> <i>Fig. 2</i>: Hadoop YARN Resource Manager dashboard with running AsterixDB instance </pre></div> </div>
+<p>Once the client returns success, the instance is now ready to be used. We can now use the asterix instance at the CC&#x2019;s IP (10.10.0.2), on the default port (19001).</p>
+
+<div class="source">
+
+<div class="source">
+<pre>
+<img src="images/asterix_webui.png" alt="Illustration of a simple YARN cluster with AsterixDB processes." />
+<i>Fig. 3</i>:  AsterixDB Web User Interface
+</pre></div>
+</div>
+<p>From here, to try things out we could run the ADM &amp; AQL 101 tutorial or any other sample workload.</p></div>
+<div class="section">
+<h2><a name="Stopping_the_instance"></a>Stopping the instance</h2>
+<p>To stop the instance that was just deployed, the <tt>stop</tt> command is used:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance stop
+    Stopping instance my_awesome_instance
+</pre></div></div>
+<p>This attempts a graceful shutdown of the instance. If for some reason this does not succeed, the <tt>kill</tt> action can be used to force shutdown in a similar fashion:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance kill
+    Are you sure you want to kill this instance? In-progress tasks will be aborted
+    Are you sure you want to do this? (yes/no): yes
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Managing_stopped_instances"></a>Managing stopped instances</h2>
+<p>After stopping the instance no containers on any YARN NodeManagers are allocated. However, the state of the instance is still persisted on the local disks (and to a lesser extent, HDFS) of each machine where a Node Controller was deployed, in the iodevices and transaction log folders. Every instance, running or not can be viewed via the <tt>describe</tt> action:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix describe
+    Existing AsterixDB instances:
+    Instance my_awesome_instance is stopped
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Starting_inactive_instances"></a>Starting inactive instances</h2>
+<p>To start the instance back up once more, the <tt>start</tt> action is used:</p>
+
+<div class="source">
+<div class="source">
+<pre>    [vagrant@cc asterix-yarn]$ bin/asterix -n my_awesome_instance start
+    Waiting for AsterixDB instance to resume .
+    Asterix successfully deployed and is now running.
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Shutting_down_vagrant"></a>Shutting down vagrant</h2>
+<p>To stop the virtual machines, issue the vagrant halt command from the host machine in the folder containing the Vagrantfile:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &#x21aa; vagrant halt
+</pre></div></div>
+<h1><a name="detail" id="detail">Listing of Commands and Options</a></h1></div>
+<div class="section">
+<h2><a name="Overview"></a>Overview</h2>
+<p>All commands take the format</p>
+
+<div class="source">
+<div class="source">
+<pre>    asterix [action-specific option] [action]
+</pre></div></div>
+<div class="section">
+<h3><a name="Technical_details"></a>Technical details</h3>
+<p>AsterixDB&#x2019;s YARN client is based on static allocation of containers within Node Managers based on IP. The AM and CC processes are currently not integrated in any fashion.</p>
+<p>The <tt>asterix</tt> command itself is simply a wrapper/launcher around the AsterixClient java class, that provides time-saving default parameters. It is possible to run the client directly with <tt>java -jar</tt> given the correct options as well.</p></div></div>
+<div class="section">
+<h2><a name="Actions"></a>Actions</h2>
+<p>Below is a description of the various actions available via the AsterixDB YARN client</p>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th>Action </th>
+      
+<th>Description </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td><tt>start</tt> </td>
+      
+<td>Starts an existing instance specified by the -name flag </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>install</tt> </td>
+      
+<td>Deploys and starts an AsterixDB instance described by the config specified in the -c parameter, and named by the -n parameter </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>stop</tt> </td>
+      
+<td>Attempts graceful shutdown of an AsterixDB instance specified in the -name parameter </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>kill</tt> </td>
+      
+<td>Forcefully stops an instance by asking YARN to terminate all of its containers. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>destroy</tt> </td>
+      
+<td>Remove the instance specified by -name and all of its stored resources from the cluster </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>describe</tt> </td>
+      
+<td>Show all instances, running or not, visible to the AsterixDB YARN client </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>backup</tt> </td>
+      
+<td>Copies the artifacts from a stopped instance to another directory on HDFS so that the instance can be reverted to that state </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>restore</tt> </td>
+      
+<td>Restores an instance to the state saved in a snapshot </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>lsbackup</tt> </td>
+      
+<td>Lists the stored snapshots from an instance </td>
+    </tr>
+    
+<tr class="a">
+      
+<td><tt>rmbackup</tt> </td>
+      
+<td>Removes a snapshot from HDFS </td>
+    </tr>
+    
+<tr class="b">
+      
+<td><tt>libinstall</tt></td>
+      
+<td>Installs an external library or UDF for use in queries </td>
+    </tr>
+  </tbody>
+</table></div>
+<div class="section">
+<h2><a name="Options"></a>Options</h2>
+<p>Below are all availabe options, and which actions they can be applied to</p>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th>Option </th>
+      
+<th>Long Form </th>
+      
+<th>Short Form </th>
+      
+<th>Usage </th>
+      
+<th>Applicability </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td>Configuration Path </td>
+      
+<td><tt>-asterixConf</tt> </td>
+      
+<td><tt>-c</tt> </td>
+      
+<td><tt>-c [/path/to/file]</tt>. Path to an AsterixDB Cluster Description File </td>
+      
+<td>Only required with <tt>create</tt> . A configuration in DFS defines the existance of an instance. </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Instance Name </td>
+      
+<td><tt>-name</tt> </td>
+      
+<td><tt>-n</tt> </td>
+      
+<td><tt>-n [instance name]</tt> Name/Identifier for instance. </td>
+      
+<td>Required for all actions except <tt>describe</tt> and <tt>lsbackup</tt> </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Asterix Binary Path </td>
+      
+<td><tt>-asterixTar</tt> </td>
+      
+<td><tt>-tar</tt> </td>
+      
+<td><tt>-tar [/path/to/binary]</tt> Path to asterix-server binary. </td>
+      
+<td>This is the AsterixDB server binary that is distributed and run on the DFS. Usually set by default via the launcher script and cached for each instance. Can be manually set, only used in <tt>create</tt> and <tt>install</tt> with <tt>-r</tt> </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Force </td>
+      
+<td><tt>-force</tt> </td>
+      
+<td><tt>-f</tt> </td>
+      
+<td><tt>-f</tt>. Use at your own risk. Disables any sanity-checking during an action. </td>
+      
+<td>Can be applied to any action, but is mostly useful in cases where an instance cannot be removed properly via <tt>destroy</tt> and cleanup of DFS files is desired. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Refresh </td>
+      
+<td><tt>-refresh</tt> </td>
+      
+<td><tt>-r</tt> </td>
+      
+<td><tt>-r</tt>. Replaces cached binary with one mentioned in <tt>-tar</tt>. </td>
+      
+<td>This only has an effect with the <tt>start</tt> action. It can be used to replace/upgrade the binary cached for an instance on the DFS. </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Base Parameters </td>
+      
+<td><tt>-baseConf</tt> </td>
+      
+<td><tt>-bc</tt> </td>
+      
+<td><tt>-bc [path/to/params]</tt>. Specifies parameter file to use during instance creation/alteration. </td>
+      
+<td>This file specifies various internal properties of the AsterixDB system, such as Buffer Cache size and Page size, among many others. It can be helpful to tweak parameters in this file, however caution should be exercised in keeping them at sane values. Only used during <tt>alter</tt> and <tt>create</tt>. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>External library path </td>
+      
+<td><tt>-externalLibs</tt> </td>
+      
+<td><tt>-l</tt> </td>
+      
+<td><tt>-l [path/to/library]</tt>. Specifies an external library to upload to an existing instance. </td>
+      
+<td>Only used in <tt>libinstall</tt>. Specifies the file containing the external function to install </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>External library dataverse. </td>
+      
+<td><tt>-libDataverse</tt> </td>
+      
+<td><tt>-ld</tt> </td>
+      
+<td><tt>-ld [existing dataverse name]</tt> </td>
+      
+<td>Only used in <tt>libinstall</tt>. Specifies the dataverse to install the library in an <tt>-l</tt> option to. </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Snapshot ID </td>
+      
+<td><tt>-snapshot</tt> </td>
+      
+<td>[none] </td>
+      
+<td><tt>-snapshot [backup timestamp/ID]</tt> </td>
+      
+<td>Used with <tt>rmbackup</tt> and <tt>restore</tt> to specify which backup to perform the respective operation on. </td>
+    </tr>
+  </tbody>
+</table>
+<h1><a name="faq" id="faq">Frequently Asked Questions and Common Issues</a></h1>
+<div class="section">
+<h3><a name="Q:_Where_are_the_AsterixDB_logs_located"></a>Q: Where are the AsterixDB logs located?</h3>
+<p>A: YARN manages the logs for each container. They are visible in the YARN Resource Manager&#x2019;s web interface or through the hadoop command line utilities ( see <a class="externalLink" href="http://hortonworks.com/blog/simplifying-user-logs-management-and-access-in-yarn/">http://hortonworks.com/blog/simplifying-user-logs-management-and-access-in-yarn/</a> for more details). </p></div>
+<div class="section">
+<h3><a name="Q:_Why_does_AsterixDB_fail_to_start_and_the_logs_contain_errors_like_Container_is_running_beyond_virtual_memory_limits._"></a>Q: Why does AsterixDB fail to start, and the logs contain errors like &#x2018;Container is running beyond virtual memory limits.&#x2019; ?</h3>
+<p>A: This is a quirk of YARN&#x2019;s memory management that can be observed on certain operating systems (mainly CentOS). It is benign unless it causes problems of this type. A work around is to set <tt>yarn.nodemanager.vmem-check-enabled</tt> to <tt>false</tt> in the yarn-site.xml configuration for Hadoop YARN. This makes the NodeManagers avoid checking the virtual memory entirely and instead rely on resident set size to check memory usage among containers.</p></div>
+<div class="section">
+<h3><a name="Q:_How_do_I_upgrade_my_existing_instance"></a>Q: How do I upgrade my existing instance?</h3>
+<p>A: This is a complex question. Generally, one can use the <tt>refresh</tt> option to upgrade the version of an extant AsterixDB instance. However one must be cautious- we do not guarantee ABI compatability between releases. Therefore extreme caution should be exercised when attempting to upgrade this way!</p></div>
+<div class="section">
+<h3><a name="Q:_Does_AsterixDB_work_on_YARN_for_Windows"></a>Q: Does AsterixDB work on YARN for Windows?</h3>
+<p>A: In general, yes! It has been done without much real issue. However it is a infrequent use case, so expect the deployment to have some hiccups. We&#x2019;re always listening on the <a class="externalLink" href="mailto:users@asterixdb.incubator.apache.org">users@asterixdb.incubator.apache.org</a> mailing list for any issues.</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/api.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/api.html b/docs/0.8.8-incubating/api.html
new file mode 100644
index 0000000..9064063
--- /dev/null
+++ b/docs/0.8.8-incubating/api.html
@@ -0,0 +1,606 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; HTTP API to AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>HTTP API to AsterixDB</a>
+          </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>HTTP API to AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#DdlApi">DDL API</a></li>
+  
+<li><a href="#UpdateApi">Update API</a></li>
+  
+<li><a href="#QueryApi">Query API</a></li>
+  
+<li><a href="#AnyApi">Mixed API</a></li>
+  
+<li><a href="#AsynchronousResultApi">Asynchronous Result API</a></li>
+  
+<li><a href="#QueryStatusApi">Query Status API</a></li>
+  
+<li><a href="#ErrorCodes">Error Codes</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="DDL_API_Back_to_TOC"></a><a name="DdlApi" id="DdlApi">DDL API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for the data definition statements</i></p>
+<p>Endpoint: <i>/ddl</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>ddl</td>
+  
+<td>String containing DDL statements to modify Metadata</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>This call does not return any result. If the operations were successful, HTTP OK status code is returned.</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="DDL_Statements"></a>DDL Statements</h4>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse company if exists;
+    create dataverse company;
+    use dataverse company;
+
+    create type Emp as open {
+      id : int32,
+      name : string
+    };
+
+    create dataset Employee(Emp) primary key id;
+</pre></div></div>
+<p>API call for the above DDL statements in the URL-encoded form.</p>
+<p>[http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;](<a class="externalLink" href="http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;">http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br /><tt>&lt;NO PAYLOAD&gt;</tt></p></div></div></div>
+<div class="section">
+<h2><a name="Update_API_Back_to_TOC"></a><a name="UpdateApi" id="UpdateApi">Update API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for update statements (INSERT, DELETE and LOAD)</i></p>
+<p>Endpoint: <i>/update</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>statements</td>
+  
+<td>String containing update (insert/delete) statements to execute</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>This call does not return any result. If the operations were successful, HTTP OK status code is returned.</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Update_Statements"></a>Update Statements</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse company;
+
+    insert into dataset Employee({ &quot;id&quot;:123,&quot;name&quot;:&quot;John Doe&quot;});
+</pre></div></div>
+<p>API call for the above update statement in the URL-encoded form.</p>
+<p>[http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});](<a class="externalLink" href="http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});">http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br /><tt>&lt;NO PAYLOAD&gt;</tt></p></div></div></div>
+<div class="section">
+<h2><a name="Query_API_Back_to_TOC"></a><a name="QueryApi" id="QueryApi">Query API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for query statements</i></p>
+<p>Endpoint: <i>/query</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>query</td>
+  
+<td>Query string to pass to ASTERIX for execution</td>
+  
+<td>Yes</td>
+</tr>
+
+<tr class="a">
+  
+<td>mode</td>
+  
+<td>Indicate if call should be synchronous or asynchronous. mode = synchronous blocks the call until results are available; mode = asynchronous returns immediately with a handle that can be used later to check the query&#x2019;s status and to fetch results when available</td>
+  
+<td>No. default mode = synchronous</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       results: &lt;result as a string, if mode = synchronous&gt;
+       error-code: [&lt;code&gt;, &lt;message&gt;] (if an error occurs)
+       handle: &lt;opaque result handle, if mode = asynchronous&gt;
+    }
+</pre></div></div>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Select_query_with_synchronous_result_delivery"></a>Select query with synchronous result delivery</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse company;
+
+    for $l in dataset('Employee') return $l;
+</pre></div></div>
+<p>API call for the above query statement in the URL-encoded form.</p>
+<p>[http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&#x2018;Employee&#x2019;)%20return%20$l;](<a class="externalLink" href="http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&apos;Employee&apos;)%20return%20$l;">http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset('Employee')%20return%20$l;</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+      &quot;results&quot;: [
+          [
+              &quot;{ &quot;id&quot;: 123, &quot;name&quot;: &quot;John Doe&quot; }&quot;
+          ]
+      ]
+    }
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Same_select_query_with_asynchronous_result_delivery"></a>Same select query with asynchronous result delivery</h4>
+<p>API call for the above query statement in the URL-encoded form with mode=asynchronous</p>
+<p>[http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&#x2018;Employee&#x2019;)%20return%20$l;&amp;mode=asynchronous](<a class="externalLink" href="http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&apos;Employee&apos;)%20return%20$l;&amp;mode=asynchronous">http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset('Employee')%20return%20$l;&amp;mode=asynchronous</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+        &quot;handle&quot;: [45,0]
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Mixed_API_Back_to_TOC"></a><a name="AnyApi" id="AnyApi">Mixed API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for any/mixed statement</i></p>
+<p>Endpoint: <i>/aql</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>query</td>
+  
+<td>Query string to pass to ASTERIX for execution</td>
+  
+<td>Yes</td>
+</tr>
+
+<tr class="a">
+  
+<td>mode</td>
+  
+<td>Indicate if call should be synchronous or asynchronous. mode = synchronous blocks the call until results are available; mode = asynchronous returns immediately with a handle that can be used later to check the query&#x2019;s status and to fetch results when available</td>
+  
+<td>No. default mode = synchronous</td>
+</tr>
+</table>
+<p>Similar to <i><i>/update</i></i> but allows any arbitrary AQL statement rather than only modifications.</p></div>
+<div class="section">
+<h2><a name="Asynchronous_Result_API_Back_to_TOC"></a><a name="AsynchronousResultApi" id="AsynchronousResultApi">Asynchronous Result API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point to fetch the results of an asynchronous query</i></p>
+<p>Endpoint: <i>/query/result</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>handle</td>
+  
+<td>Result handle that was returned by a previous call to a /query call with mode = asynchronous</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       results: &lt;result as a string, if mode = synchronous, or mode = asynchronous and results are available&gt;
+       error-code: [&lt;code&gt;, &lt;message&gt;] (if an error occurs)
+    }
+</pre></div></div>
+<p>If mode = asynchronous and results are not available, the returned JSON object is empty: { }</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Fetching_results_for_asynchronous_query"></a>Fetching results for asynchronous query</h4>
+<p>We use the handle returned by the asynchronous query to get the results for the query. The handle returned was:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+        &quot;handle&quot;: [45,0]
+    }
+</pre></div></div>
+<p>API call for reading results from the previous asynchronous query in the URL-encoded form.</p>
+<p><a class="externalLink" href="http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D">http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D</a></p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+      &quot;results&quot;: [
+          [
+              &quot;{ &quot;id&quot;: 123, &quot;name&quot;: &quot;John Doe&quot; }&quot;
+          ]
+      ]
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Query_Status_API_Back_to_TOC"></a><a name="QueryStatusApi" id="QueryStatusApi">Query Status API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point to check the status of the query asynchronous</i></p>
+<p>Endpoint: <i>/query/status</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>handle</td>
+  
+<td>Result handle that was returned by a previous call to a /query call with mode = asynchronous</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       status: (&quot;RUNNING&quot; | &quot;SUCCESS&quot; | &quot;ERROR&quot;)
+    }
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Error_Codes_Back_to_TOC"></a><a name="ErrorCodes" id="ErrorCodes">Error Codes</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Table of error codes and their types:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Code</td>
+  
+<td>Type</td>
+</tr>
+
+<tr class="b">
+  
+<td>1</td>
+  
+<td>Invalid statement</td>
+</tr>
+
+<tr class="a">
+  
+<td>2</td>
+  
+<td>Parse failures</td>
+</tr>
+
+<tr class="b">
+  
+<td>99</td>
+  
+<td>Uncategorized error</td>
+</tr>
+</table></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[25/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/primer-sql-like.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/primer-sql-like.html b/content/docs/0.8.8-incubating/aql/primer-sql-like.html
new file mode 100644
index 0000000..e6ae11b
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/primer-sql-like.html
@@ -0,0 +1,886 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB 101: An ADM and AQL Primer (for SQL fans)</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB 101: An ADM and AQL Primer (for SQL fans)</h1>
+<div class="section">
+<h2><a name="Welcome_to_AsterixDB"></a>Welcome to AsterixDB!</h2>
+<p>This document introduces the main features of AsterixDB&#x2019;s data model (ADM) and query language (AQL) by example. The example is a simple scenario involving (synthetic) sample data modeled after data from the social domain. This document describes a set of sample ADM datasets, together with a set of illustrative AQL queries (in a SQL-like form), to introduce you to the &#x201c;AsterixDB user experience&#x201d;. The complete set of steps required to create and load a handful of sample datasets, along with runnable queries and the expected results for each query, are included.</p>
+<p>This document assumes that you are at least vaguely familiar with AsterixDB and why you might want to use it. Most importantly, it assumes you already have a running instance of AsterixDB and that you know how to query it using AsterixDB&#x2019;s basic web interface. For more information on these topics, you should go through the steps in <a href="../install.html">Installing Asterix Using Managix</a> before reading this document and make sure that you have a running AsterixDB instance ready to go. To get your feet wet, you should probably start with a simple local installation of AsterixDB on your favorite machine, accepting all of the default settings that Managix offers. Later you can graduate to trying AsterixDB on a cluster, its real intended home (since it targets Big Data). (Note: With the exception of specifying the correct locations where you put the source data for this example, there should no changes needed in your ADM or AQL statements to run the examples locally and/
 or to run them on a cluster when you are ready to take that step.)</p>
+<p>As you read through this document, you should try each step for yourself on your own AsterixDB instance. Once you have reached the end, you will be fully armed and dangerous, with all the basic AsterixDB knowledge that you&#x2019;ll need to start down the path of modeling, storing, and querying your own semistructured data.</p>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="ADM:_Modeling_Semistructed_Data_in_AsterixDB"></a>ADM: Modeling Semistructed Data in AsterixDB</h2>
+<p>In this section you will learn all about modeling Big Data using ADM, the data model of the AsterixDB BDMS.</p>
+<div class="section">
+<h3><a name="Dataverses_Datatypes_and_Datasets"></a>Dataverses, Datatypes, and Datasets</h3>
+<p>The top-level organizing concept in the AsterixDB world is the <i>dataverse</i>. A dataverse&#x2014;short for &#x201c;data universe&#x201d;&#x2014;is a place (similar to a database in a relational DBMS) in which to create and manage the types, datasets, functions, and other artifacts for a given AsterixDB application. When you start using an AsterixDB instance for the first time, it starts out &#x201c;empty&#x201d;; it contains no data other than the AsterixDB system catalogs (which live in a special dataverse called the Metadata dataverse). To store your data in AsterixDB, you will first create a dataverse and then you use it for the <i>datatypes</i> and <i>datasets</i> for managing your own data. A datatype tells AsterixDB what you know (or more accurately, what you want it to know) a priori about one of the kinds of data instances that you want AsterixDB to hold for you. A dataset is a collection of data instances of a datatype, and AsterixDB makes sure that the data instances
  that you put in it conform to its specified type. Since AsterixDB targets semistructured data, you can use <i>open</i> datatypes and tell it as little or as much as you wish about your data up front; the more you tell it up front, the less information it will have to store repeatedly in the individual data instances that you give it. Instances of open datatypes are permitted to have additional content, beyond what the datatype says, as long as they at least contain the information prescribed by the datatype definition. Open typing allows data to vary from one instance to another and it leaves wiggle room for application evolution in terms of what might need to be stored in the future. If you want to restrict data instances in a dataset to have only what the datatype says, and nothing extra, you can define a <i>closed</i> datatype for that dataset and AsterixDB will keep users from storing objects that have extra data in them. Datatypes are open by default unless you tell AsterixDB 
 otherwise. Let&#x2019;s put these concepts to work</p>
+<p>Our little sample scenario involves hypothetical information about users of two popular social networks, Facebook and Twitter, and their messages. We&#x2019;ll start by defining a dataverse called &#x201c;TinySocial&#x201d; to hold our datatypes and datasets. The AsterixDB data model (ADM) is essentially a superset of JSON&#x2014;it&#x2019;s what you get by extending JSON with more data types and additional data modeling constructs borrowed from object databases. The following is how we can create the TinySocial dataverse plus a set of ADM types for modeling Twitter users, their Tweets, Facebook users, their users&#x2019; employment information, and their messages. (Note: Keep in mind that this is just a tiny and somewhat silly example intended for illustrating some of the key features of AsterixDB. :-))</p>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse TinySocial if exists;
+    create dataverse TinySocial;
+    use dataverse TinySocial;
+
+    create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int32,
+        statuses_count: int32,
+        name: string,
+        followers_count: int32
+    }
+    create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+    }
+    create type EmploymentType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+    }
+    create type FacebookUserType as closed {
+        id: int32,
+        alias: string,
+        name: string,
+        user-since: datetime,
+        friend-ids: {{ int32 }},
+        employment: [EmploymentType]
+    }
+    create type FacebookMessageType as closed {
+        message-id: int32,
+        author-id: int32,
+        in-response-to: int32?,
+        sender-location: point?,
+        message: string
+    }
+</pre></div></div>
+<p>The first three lines above tell AsterixDB to drop the old TinySocial dataverse, if one already exists, and then to create a brand new one and make it the focus of the statements that follow. The first type creation statement creates a datatype for holding information about Twitter users. It is a record type with a mix of integer and string data, very much like a (flat) relational tuple. The indicated fields are all mandatory, but because the type is open, additional fields are welcome. The second statement creates a datatype for Twitter messages; this shows how to specify a closed type. Interestingly (based on one of Twitter&#x2019;s APIs), each Twitter message actually embeds an instance of the sending user&#x2019;s information (current as of when the message was sent), so this is an example of a nested record in ADM. Twitter messages can optionally contain the sender&#x2019;s location, which is modeled via the sender-location field of spatial type <i>point</i>; the question ma
 rk following the field type indicates its optionality. An optional field is like a nullable field in SQL&#x2014;it may be present or missing, but when it&#x2019;s present, its data type will conform to the datatype&#x2019;s specification. The send-time field illustrates the use of a temporal primitive type, <i>datetime</i>. Lastly, the referred-topics field illustrates another way that ADM is richer than the relational model; this field holds a bag (a.k.a. an unordered list) of strings. Since the overall datatype definition for Twitter messages says &#x201c;closed&#x201d;, the fields that it lists are the only fields that instances of this type will be allowed to contain. The next two create type statements create a record type for holding information about one component of the employment history of a Facebook user and then a record type for holding the user information itself. The Facebook user type highlights a few additional ADM data model features. Its friend-ids field is a bag 
 of integers, presumably the Facebook user ids for this user&#x2019;s friends, and its employment field is an ordered list of employment records. The final create type statement defines a type for handling the content of a Facebook message in our hypothetical social data storage scenario.</p>
+<p>Before going on, we need to once again emphasize the idea that AsterixDB is aimed at storing and querying not just Big Data, but Big <i>Semistructured</i> Data. This means that most of the fields listed in the create type statements above could have been omitted without changing anything other than the resulting size of stored data instances on disk. AsterixDB stores its information about the fields defined a priori as separate metadata, whereas the information about other fields that are &#x201c;just there&#x201d; in instances of open datatypes is stored with each instance&#x2014;making for more bits on disk and longer times for operations affected by data size (e.g., dataset scans). The only fields that <i>must</i> be specified a priori are the primary key and any fields that you would like to build indexes on.</p></div>
+<div class="section">
+<h3><a name="Creating_Datasets_and_Indexes"></a>Creating Datasets and Indexes</h3>
+<p>Now that we have defined our datatypes, we can move on and create datasets to store the actual data. (If we wanted to, we could even have several named datasets based on any one of these datatypes.) We can do this as follows, utilizing the DDL capabilities of AsterixDB.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create dataset FacebookUsers(FacebookUserType)
+    primary key id;
+
+    create dataset FacebookMessages(FacebookMessageType)
+    primary key message-id;
+
+    create dataset TwitterUsers(TwitterUserType)
+    primary key screen-name;
+
+    create dataset TweetMessages(TweetMessageType)
+    primary key tweetid
+    hints(cardinality=100);
+
+    create index fbUserSinceIdx on FacebookUsers(user-since);
+    create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+    create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    from $ds in dataset Metadata.Dataset select $ds;
+    from $ix in dataset Metadata.Index select $ix;
+</pre></div></div>
+<p>The ADM DDL statements above create four datasets for holding our social data in the TinySocial dataverse: FacebookUsers, FacebookMessages, TwitterUsers, and TweetMessages. The first statement creates the FacebookUsers data set. It specifies that this dataset will store data instances conforming to FacebookUserType and that it has a primary key which is the id field of each instance. The primary key information is used by AsterixDB to uniquely identify instances for the purpose of later lookup and for use in secondary indexes. Each AsterixDB dataset is stored (and indexed) in the form of a B+ tree on primary key; secondary indexes point to their indexed data by primary key. In AsterixDB clusters, the primary key is also used to hash-partition (a.k.a. shard) the dataset across the nodes of the cluster. The next three create dataset statements are similar. The last one illustrates an optional clause for providing useful hints to AsterixDB. In this case, the hint tells AsterixDB tha
 t the dataset definer is anticipating that the TweetMessages dataset will contain roughly 100 objects; knowing this can help AsterixDB to more efficiently manage and query this dataset. (AsterixDB does not yet gather and maintain data statistics; it will currently, abitrarily, assume a cardinality of one million objects per dataset in the absence of such an optional definition-time hint.)</p>
+<p>The create dataset statements above are followed by four more DDL statements, each of which creates a secondary index on a field of one of the datasets. The first one indexes the FacebookUsers dataset on its user-since field. This index will be a B+ tree index; its type is unspecified and <i>btree</i> is the default type. The other three illustrate how you can explicitly specify the desired type of index. In addition to btree, <i>rtree</i> and inverted <i>keyword</i> indexes are supported by AsterixDB. Indexes can also have composite keys, and more advanced text indexing is available as well (ngram(k), where k is the desired gram length).</p></div>
+<div class="section">
+<h3><a name="Querying_the_Metadata_Dataverse"></a>Querying the Metadata Dataverse</h3>
+<p>The last two statements above show how you can use queries in AQL to examine the AsterixDB system catalogs and tell what artifacts you have created. Just as relational DBMSs use their own tables to store their catalogs, AsterixDB uses its own datasets to persist descriptions of its datasets, datatypes, indexes, and so on. Running the first of the two queries above will list all of your newly created datasets, and it will also show you a full list of all the metadata datasets. (You can then explore from there on your own if you are curious) These last two queries also illustrate one other factoid worth knowing: AsterixDB allows queries to span dataverses by allowing the optional use of fully-qualified dataset names (i.e., <i>dataversename.datasetname</i>) to reference datasets that live in a dataverse other than the one that was named in the most recently executed <i>use dataverse</i> directive.</p>
+<p>&#x2014;-</p></div></div>
+<div class="section">
+<h2><a name="Loading_Data_Into_AsterixDB"></a>Loading Data Into AsterixDB</h2>
+<p>Okay, so far so good&#x2014;AsterixDB is now ready for data, so let&#x2019;s give it some data to store Our next task will be to load some sample data into the four datasets that we just defined. Here we will load a tiny set of records, defined in ADM format (a superset of JSON), into each dataset. In the boxes below you can see the actual data instances contained in each of the provided sample files. In order to load this data yourself, you should first store the four corresponding <tt>.adm</tt> files (whose URLs are indicated on top of each box below) into a filesystem directory accessible to your running AsterixDB instance. Take a few minutes to look carefully at each of the sample data sets. This will give you a better sense of the nature of the data that we are about to load and query. We should note that ADM format is a textual serialization of what AsterixDB will actually store; when persisted in AsterixDB, the data format will be binary and the data in the predefined fiel
 ds of the data instances will be stored separately from their associated field name and type metadata.</p>
+<p><a href="../data/twu.adm">Twitter Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:18,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416}
+    {&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159}
+    {&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649}
+    {&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136}
+</pre></div></div>
+<p><a href="../data/twm.adm">Tweet Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;tweetid&quot;:&quot;1&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;47.44,80.65&quot;),&quot;send-time&quot;:datetime(&quot;2008-04-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;customization&quot;}},&quot;message-text&quot;:&quot; love t-mobile its customization is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;2&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;32.84,67.14&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like verizon its shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;3&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;29.72,75.8&quot;),&quot;send-time&quot;:datetime(&quot;2006-11-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; like motorola the speed is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;4&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;39.28,70.48&quot;),&quot;send-time&quot;:datetime(&quot;2011-12-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;sprint&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like sprint the voice-command is mind-blowing:)&quot;}
+    {&quot;tweetid&quot;:&quot;5&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;40.09,92.69&quot;),&quot;send-time&quot;:datetime(&quot;2006-08-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; can't stand motorola its speed is terrible:(&quot;}
+    {&quot;tweetid&quot;:&quot;6&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;47.51,83.99&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-07T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; like iphone the voice-clarity is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;7&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136},&quot;sender-location&quot;:point(&quot;36.21,72.6&quot;),&quot;send-time&quot;:datetime(&quot;2011-08-25T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; like samsung the platform is good&quot;}
+    {&quot;tweetid&quot;:&quot;8&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;46.05,93.34&quot;),&quot;send-time&quot;:datetime(&quot;2005-10-14T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like t-mobile the shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;9&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;36.86,74.62&quot;),&quot;send-time&quot;:datetime(&quot;2012-07-21T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voicemail-service&quot;}},&quot;message-text&quot;:&quot; love verizon its voicemail-service is awesome&quot;}
+    {&quot;tweetid&quot;:&quot;10&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;29.15,76.53&quot;),&quot;send-time&quot;:datetime(&quot;2008-01-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; hate verizon its voice-clarity is OMG:(&quot;}
+    {&quot;tweetid&quot;:&quot;11&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;37.59,68.42&quot;),&quot;send-time&quot;:datetime(&quot;2008-03-09T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; can't stand iphone its platform is terrible&quot;}
+    {&quot;tweetid&quot;:&quot;12&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;OliJackson_512&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Oli Jackson&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;24.82,94.63&quot;),&quot;send-time&quot;:datetime(&quot;2010-02-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like samsung the voice-command is amazing:)&quot;}
+</pre></div></div>
+<p><a href="../data/fbu.adm">Facebook Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;id&quot;:1,&quot;alias&quot;:&quot;Margarita&quot;,&quot;name&quot;:&quot;MargaritaStoddard&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-20T10:10:00&quot;),&quot;friend-ids&quot;:{{2,3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Codetechno&quot;,&quot;start-date&quot;:date(&quot;2006-08-06&quot;)}]}
+    {&quot;id&quot;:2,&quot;alias&quot;:&quot;Isbel&quot;,&quot;name&quot;:&quot;IsbelDull&quot;,&quot;user-since&quot;:datetime(&quot;2011-01-22T10:10:00&quot;),&quot;friend-ids&quot;:{{1,4}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Hexviafind&quot;,&quot;start-date&quot;:date(&quot;2010-04-27&quot;)}]}
+    {&quot;id&quot;:3,&quot;alias&quot;:&quot;Emory&quot;,&quot;name&quot;:&quot;EmoryUnk&quot;,&quot;user-since&quot;:datetime(&quot;2012-07-10T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,8,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;geomedia&quot;,&quot;start-date&quot;:date(&quot;2010-06-17&quot;),&quot;end-date&quot;:date(&quot;2010-01-26&quot;)}]}
+    {&quot;id&quot;:4,&quot;alias&quot;:&quot;Nicholas&quot;,&quot;name&quot;:&quot;NicholasStroh&quot;,&quot;user-since&quot;:datetime(&quot;2010-12-27T10:10:00&quot;),&quot;friend-ids&quot;:{{2}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zamcorporation&quot;,&quot;start-date&quot;:date(&quot;2010-06-08&quot;)}]}
+    {&quot;id&quot;:5,&quot;alias&quot;:&quot;Von&quot;,&quot;name&quot;:&quot;VonKemble&quot;,&quot;user-since&quot;:datetime(&quot;2010-01-05T10:10:00&quot;),&quot;friend-ids&quot;:{{3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Kongreen&quot;,&quot;start-date&quot;:date(&quot;2010-11-27&quot;)}]}
+    {&quot;id&quot;:6,&quot;alias&quot;:&quot;Willis&quot;,&quot;name&quot;:&quot;WillisWynne&quot;,&quot;user-since&quot;:datetime(&quot;2005-01-17T10:10:00&quot;),&quot;friend-ids&quot;:{{1,3,7}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;jaydax&quot;,&quot;start-date&quot;:date(&quot;2009-05-15&quot;)}]}
+    {&quot;id&quot;:7,&quot;alias&quot;:&quot;Suzanna&quot;,&quot;name&quot;:&quot;SuzannaTillson&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-07T10:10:00&quot;),&quot;friend-ids&quot;:{{6}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Labzatron&quot;,&quot;start-date&quot;:date(&quot;2011-04-19&quot;)}]}
+    {&quot;id&quot;:8,&quot;alias&quot;:&quot;Nila&quot;,&quot;name&quot;:&quot;NilaMilliron&quot;,&quot;user-since&quot;:datetime(&quot;2008-01-01T10:10:00&quot;),&quot;friend-ids&quot;:{{3}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Plexlane&quot;,&quot;start-date&quot;:date(&quot;2010-02-28&quot;)}]}
+    {&quot;id&quot;:9,&quot;alias&quot;:&quot;Woodrow&quot;,&quot;name&quot;:&quot;WoodrowNehling&quot;,&quot;user-since&quot;:datetime(&quot;2005-09-20T10:10:00&quot;),&quot;friend-ids&quot;:{{3,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zuncan&quot;,&quot;start-date&quot;:date(&quot;2003-04-22&quot;),&quot;end-date&quot;:date(&quot;2009-12-13&quot;)}]}
+    {&quot;id&quot;:10,&quot;alias&quot;:&quot;Bram&quot;,&quot;name&quot;:&quot;BramHatch&quot;,&quot;user-since&quot;:datetime(&quot;2010-10-16T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;physcane&quot;,&quot;start-date&quot;:date(&quot;2007-06-05&quot;),&quot;end-date&quot;:date(&quot;2011-11-05&quot;)}]}
+</pre></div></div>
+<p><a href="../data/fbm.adm">Facebook Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;message-id&quot;:1,&quot;author-id&quot;:3,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;47.16,77.75&quot;),&quot;message&quot;:&quot; love sprint its shortcut-menu is awesome:)&quot;}
+    {&quot;message-id&quot;:2,&quot;author-id&quot;:1,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;41.66,80.87&quot;),&quot;message&quot;:&quot; dislike iphone its touch-screen is horrible&quot;}
+    {&quot;message-id&quot;:3,&quot;author-id&quot;:2,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;48.09,81.01&quot;),&quot;message&quot;:&quot; like samsung the plan is amazing&quot;}
+    {&quot;message-id&quot;:4,&quot;author-id&quot;:1,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;37.73,97.04&quot;),&quot;message&quot;:&quot; can't stand at&amp;t the network is horrible:(&quot;}
+    {&quot;message-id&quot;:5,&quot;author-id&quot;:6,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;34.7,90.76&quot;),&quot;message&quot;:&quot; love sprint the customization is mind-blowing&quot;}
+    {&quot;message-id&quot;:6,&quot;author-id&quot;:2,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;31.5,75.56&quot;),&quot;message&quot;:&quot; like t-mobile its platform is mind-blowing&quot;}
+    {&quot;message-id&quot;:7,&quot;author-id&quot;:5,&quot;in-response-to&quot;:15,&quot;sender-location&quot;:point(&quot;32.91,85.05&quot;),&quot;message&quot;:&quot; dislike sprint the speed is horrible&quot;}
+    {&quot;message-id&quot;:8,&quot;author-id&quot;:1,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;40.33,80.87&quot;),&quot;message&quot;:&quot; like verizon the 3G is awesome:)&quot;}
+    {&quot;message-id&quot;:9,&quot;author-id&quot;:3,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;34.45,96.48&quot;),&quot;message&quot;:&quot; love verizon its wireless is good&quot;}
+    {&quot;message-id&quot;:10,&quot;author-id&quot;:1,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;42.5,70.01&quot;),&quot;message&quot;:&quot; can't stand motorola the touch-screen is terrible&quot;}
+    {&quot;message-id&quot;:11,&quot;author-id&quot;:1,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;38.97,77.49&quot;),&quot;message&quot;:&quot; can't stand at&amp;t its plan is terrible&quot;}
+    {&quot;message-id&quot;:12,&quot;author-id&quot;:10,&quot;in-response-to&quot;:6,&quot;sender-location&quot;:point(&quot;42.26,77.76&quot;),&quot;message&quot;:&quot; can't stand t-mobile its voicemail-service is OMG:(&quot;}
+    {&quot;message-id&quot;:13,&quot;author-id&quot;:10,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;42.77,78.92&quot;),&quot;message&quot;:&quot; dislike iphone the voice-command is bad:(&quot;}
+    {&quot;message-id&quot;:14,&quot;author-id&quot;:9,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;41.33,85.28&quot;),&quot;message&quot;:&quot; love at&amp;t its 3G is good:)&quot;}
+    {&quot;message-id&quot;:15,&quot;author-id&quot;:7,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;44.47,67.11&quot;),&quot;message&quot;:&quot; like iphone the voicemail-service is awesome&quot;}
+</pre></div></div>
+<p>It&#x2019;s loading time! We can use AQL <i>load</i> statements to populate our datasets with the sample records shown above. The following shows how loading can be done for data stored in <tt>.adm</tt> files in your local filesystem. <i>Note:</i> You <i>MUST</i> replace the <tt>&lt;Host Name&gt;</tt> and <tt>&lt;Absolute File Path&gt;</tt> placeholders in each load statement below with valid values based on the host IP address (or host name) for the machine and directory that you have downloaded the provided <tt>.adm</tt> files to. As you do so, be very, very careful to retain the two slashes in the load statements, i.e., do not delete the two slashes that appear in front of the absolute path to your <tt>.adm</tt> files. (This will lead to a three-slash character sequence at the start of each load statement&#x2019;s file input path specification.)</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    load dataset FacebookUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+    load dataset FacebookMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+    load dataset TwitterUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+    load dataset TweetMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="AQL:_Querying_Your_AsterixDB_Data"></a>AQL: Querying Your AsterixDB Data</h2>
+<p>Congratulations! You now have sample social data stored (and indexed) in AsterixDB. (You are part of an elite and adventurous group of individuals. :-)) Now that you have successfully loaded the provided sample data into the datasets that we defined, you can start running queries against them.</p>
+<p>The query language for AsterixDB is AQL&#x2014;the Asterix Query Language. AQL is loosely based on XQuery, the language developed and standardized in the early to mid 2000&#x2019;s by the World Wide Web Consortium (W3C) for querying semistructured data stored in their XML format. We have tossed all of the &#x201c;XML cruft&#x201d; out of their language but retained many of its core ideas. We did this because its design was developed over a period of years by a diverse committee of smart and experienced language designers, including &#x201c;SQL people&#x201d;, &#x201c;functional programming people&#x201d;, and &#x201c;XML people&#x201d;, all of whom were focused on how to design a new query language that operates well over semistructured data. (We decided to stand on their shoulders instead of starting from scratch and revisiting many of the same issues.) Note that AQL is not SQL and not based on SQL: In other words, AsterixDB is fully &#x201c;NoSQL compliant&#x201d;. :-)</p>
+<p>In this section we introduce AQL via a set of example queries, along with their expected results, based on the data above, to help you get started. Many of the most important features of AQL are presented in this set of representative queries. You can find more details in the document on the <a href="datamodel.html">Asterix Data Model (ADM)</a>, in the <a href="manual.html">AQL Reference Manual</a>, and a complete list of built-in functions is available in the <a href="functions.html">Asterix Functions</a> document.</p>
+<p>AQL is an expression language. Even the expression 1+1 is a valid AQL query that evaluates to 2. (Try it for yourself! Okay, maybe that&#x2019;s <i>not</i> the best use of a 512-node shared-nothing compute cluster.) Most useful AQL queries will be based on the <i>FLWOR</i> (pronounced &#x201c;flower&#x201d;) expression structure that AQL has borrowed from XQuery ((<a class="externalLink" href="http://en.wikipedia.org/wiki/FLWOR))">http://en.wikipedia.org/wiki/FLWOR))</a>. The FLWOR expression syntax supports both the incremental binding (<i>for</i>) of variables to ADM data instances in a dataset (or in the result of any AQL expression, actually) and the full binding (<i>let</i>) of variables to entire intermediate results in a fashion similar to temporary views in the SQL world. FLWOR is an acronym that is short for <i>for</i>-<i>let</i>-<i>where</i>-<i>order by</i>-<i>return</i>, naming five of the most frequently used clauses from the syntax of a full AQL query. AQL also inclu
 des <i>group by</i> and <i>limit</i> clauses, as you will see shortly. Roughly speaking, for SQL afficiandos, the <i>for</i> clause in AQL is like the <i>from</i> clause in SQL, the <i>return</i> clause in AQL is like the <i>select</i> clause in SQL (but appears at the end instead of the beginning of a query), the <i>let</i> clause in AQL is like SQL&#x2019;s <i>with</i> clause, and the <i>where</i> and <i>order by</i> clauses in both languages are similar.</p>
+<p>In order to allow SQL fans to write queries in their favored ways, AQL provides synonyms: <i>from</i> for <i>for</i>, <i>select</i> for <i>return</i>, <i>with</i> for <i>let</i>, and <i>keeping</i> for <i>with</i> in the group by clause.</p>
+<p>Enough talk! Let&#x2019;s go ahead and try writing some queries and see about learning AQL by example.</p>
+<div class="section">
+<h3><a name="Query_0-A_-_Exact-Match_Lookup"></a>Query 0-A - Exact-Match Lookup</h3>
+<p>For our first query, let&#x2019;s find a Facebook user based on his or her user id. Suppose the user we want is the user whose id is 8:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+    from $user in dataset FacebookUsers
+    where $user.id = 8
+    select $user;
+</pre></div></div>
+<p>The query&#x2019;s <i>from</i> clause binds the variable <tt>$user</tt> incrementally to the data instances residing in the dataset named FacebookUsers. Its <i>where</i> clause selects only those bindings having a user id of interest, filtering out the rest. The <i>select</i> clause returns the (entire) data instance for each binding that satisfies the predicate. Since this dataset is indexed on user id (its primary key), this query will be done via a quick index lookup.</p>
+<p>The expected result for our sample data is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_0-B_-_Range_Scan"></a>Query 0-B - Range Scan</h3>
+<p>AQL, like SQL, supports a variety of different predicates. For example, for our next query, let&#x2019;s find the Facebook users whose ids are in the range between 2 and 4:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    where $user.id &gt;= 2 and $user.id &lt;= 4
+    select $user;
+</pre></div></div>
+<p>This query&#x2019;s expected result, also evaluable using the primary index on user id, is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_1_-_Other_Query_Filters"></a>Query 1 - Other Query Filters</h3>
+<p>AQL can do range queries on any data type that supports the appropriate set of comparators. As an example, this next query retrieves the Facebook users who joined between July 22, 2010 and July 29, 2012:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+    from $user in dataset FacebookUsers
+    where $user.user-since &gt;= datetime('2010-07-22T00:00:00')
+      and $user.user-since &lt;= datetime('2012-07-29T23:59:59')
+    select $user;
+</pre></div></div>
+<p>The expected result for this query, also an indexable query, is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-A_-_Equijoin"></a>Query 2-A - Equijoin</h3>
+<p>In addition to simply binding variables to data instances and returning them &#x201c;whole&#x201d;, an AQL query can construct new ADM instances to return based on combinations of its variable bindings. This gives AQL the power to do joins much like those done using multi-table <i>from</i> clauses in SQL. For example, suppose we wanted a list of all Facebook users paired with their associated messages, with the list enumerating the author name and the message text associated with each Facebook message. We could do this as follows in AQL:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    from $message in dataset FacebookMessages
+    where $message.author-id = $user.id
+    select {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The result of this query is a sequence of new ADM instances, one for each author/message pair. Each instance in the result will be an ADM record containing two fields, &#x201c;uname&#x201d; and &#x201c;message&#x201d;, containing the user&#x2019;s name and the message text, respectively, for each author/message pair. (Note that &#x201c;uname&#x201d; and &#x201c;message&#x201d; are both simple AQL expressions themselves&#x2014;so in the most general case, even the resulting field names can be computed as part of the query, making AQL a very powerful tool for slicing and dicing semistructured data.)</p>
+<p>The expected result of this example AQL join query for our sample data set is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-B_-_Index_join"></a>Query 2-B - Index join</h3>
+<p>By default, AsterixDB evaluates equijoin queries using hash-based join methods that work well for doing ad hoc joins of very large data sets (<a class="externalLink" href="http://en.wikipedia.org/wiki/Hash_join">http://en.wikipedia.org/wiki/Hash_join</a>). On a cluster, hash partitioning is employed as AsterixDB&#x2019;s divide-and-conquer strategy for computing large parallel joins. AsterixDB includes other join methods, but in the absence of data statistics and selectivity estimates, it doesn&#x2019;t (yet) have the know-how to intelligently choose among its alternatives. We therefore asked ourselves the classic question&#x2014;WWOD?&#x2014;What Would Oracle Do?&#x2014;and in the interim, AQL includes a clunky (but useful) hint-based mechanism for addressing the occasional need to suggest to AsterixDB which join method it should use for a particular AQL query.</p>
+<p>The following query is similar to Query 2-A but includes a suggestion to AsterixDB that it should consider employing an index-based nested-loop join technique to process the query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    from $message in dataset FacebookMessages
+    where $message.author-id /*+ indexnl */  = $user.id
+    select {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The expected result is (of course) the same as before, modulo the order of the instances. Result ordering is (intentionally) undefined in AQL in the absence of an <i>order by</i> clause. The query result for our sample data in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+</pre></div></div>
+<p>(It is worth knowing, with respect to influencing AsterixDB&#x2019;s query evaluation, that nested <i>from</i> clauses&#x2014;a.k.a. joins&#x2014; are currently evaluated with the &#x201c;outer&#x201d; clause probing the data of the &#x201c;inner&#x201d; clause.)</p></div>
+<div class="section">
+<h3><a name="Query_3_-_Nested_Outer_Join"></a>Query 3 - Nested Outer Join</h3>
+<p>In order to support joins between tables with missing/dangling join tuples, the designers of SQL ended up shoe-horning a subset of the relational algebra into SQL&#x2019;s <i>from</i> clause syntax&#x2014;and providing a variety of join types there for users to choose from. Left outer joins are particularly important in SQL, e.g., to print a summary of customers and orders, grouped by customer, without omitting those customers who haven&#x2019;t placed any orders yet.</p>
+<p>The AQL language supports nesting, both of queries and of query results, and the combination allows for an arguably cleaner/more natural approach to such queries. As an example, supposed we wanted, for each Facebook user, to produce a record that has his/her name plus a list of the messages written by that user. In SQL, this would involve a left outer join between users and messages, grouping by user, and having the user name repeated along side each message. In AQL, this sort of use case can be handled (more naturally) as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    select {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: from $message in dataset FacebookMessages
+            where $message.author-id = $user.id
+            select $message.message
+    };
+</pre></div></div>
+<p>This AQL query binds the variable <tt>$user</tt> to the data instances in FacebookUsers; for each user, it constructs a result record containing a &#x201c;uname&#x201d; field with the user&#x2019;s name and a &#x201c;messages&#x201d; field with a nested collection of all messages for that user. The nested collection for each user is specified by using a correlated subquery. (Note: While it looks like nested loops could be involved in computing the result, AsterixDB recogizes the equivalence of such a query to an outerjoin, and it will use an efficient hash-based strategy when actually computing the query&#x2019;s result.)</p>
+<p>Here is this example query&#x2019;s expected output:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;messages&quot;: [ &quot; dislike iphone its touch-screen is horrible&quot;, &quot; can't stand at&amp;t the network is horrible:(&quot;, &quot; like verizon the 3G is awesome:)&quot;, &quot; can't stand motorola the touch-screen is terrible&quot;, &quot; can't stand at&amp;t its plan is terrible&quot; ] }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;messages&quot;: [ &quot; like samsung the plan is amazing&quot;, &quot; like t-mobile its platform is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;messages&quot;: [ &quot; love sprint its shortcut-menu is awesome:)&quot;, &quot; love verizon its wireless is good&quot; ] }
+    { &quot;uname&quot;: &quot;NicholasStroh&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;messages&quot;: [ &quot; dislike sprint the speed is horrible&quot; ] }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;messages&quot;: [ &quot; love sprint the customization is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;messages&quot;: [ &quot; like iphone the voicemail-service is awesome&quot; ] }
+    { &quot;uname&quot;: &quot;NilaMilliron&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;messages&quot;: [ &quot; love at&amp;t its 3G is good:)&quot; ] }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;messages&quot;: [ &quot; dislike iphone the voice-command is bad:(&quot;, &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_4_-_Theta_Join"></a>Query 4 - Theta Join</h3>
+<p>Not all joins are expressible as equijoins and computable using equijoin-oriented algorithms. The join predicates for some use cases involve predicates with functions; AsterixDB supports the expression of such queries and will still evaluate them as best it can using nested loop based techniques (and broadcast joins in the parallel case).</p>
+<p>As an example of such a use case, suppose that we wanted, for each tweet T, to find all of the other tweets that originated from within a circle of radius of 1 surrounding tweet T&#x2019;s location. In AQL, this can be specified in a manner similar to the previous query using one of the built-in functions on the spatial data type instead of id equality in the correlated query&#x2019;s <i>where</i> clause:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    select {
+    &quot;message&quot;: $t.message-text,
+    &quot;nearby-messages&quot;: from $t2 in dataset TweetMessages
+                where spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1
+                select { &quot;msgtxt&quot;:$t2.message-text}
+    };
+</pre></div></div>
+<p>Here is the expected result for this query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;message&quot;: &quot; love t-mobile its customization is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love t-mobile its customization is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; }, { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand iphone its platform is terrible&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand iphone its platform is terrible&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the voice-command is amazing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the voice-command is amazing:)&quot; } ] }
+    { &quot;message&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; like motorola the speed is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand motorola its speed is terrible:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand motorola its speed is terrible:(&quot; } ] }
+    { &quot;message&quot;: &quot; like iphone the voice-clarity is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like iphone the voice-clarity is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the platform is good&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the platform is good&quot; } ] }
+    { &quot;message&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; love verizon its voicemail-service is awesome&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love verizon its voicemail-service is awesome&quot; } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_5_-_Fuzzy_Join"></a>Query 5 - Fuzzy Join</h3>
+<p>As another example of a non-equijoin use case, we could ask AsterixDB to find, for each Facebook user, all Twitter users with names &#x201c;similar&#x201d; to their name. AsterixDB supports a variety of &#x201c;fuzzy match&#x201d; functions for use with textual and set-based data. As one example, we could choose to use edit distance with a threshold of 3 as the definition of name similarity, in which case we could write the following query using AQL&#x2019;s operator-based syntax (~=) for testing whether or not two values are similar:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+    from $fbu in dataset FacebookUsers
+    select {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: from $t in dataset TweetMessages
+                with $tu := $t.user
+                where $tu.name ~= $fbu.name
+                select {
+                &quot;twitter-screenname&quot;: $tu.screen-name,
+                &quot;twitter-name&quot;: $tu.name
+                }
+    };
+</pre></div></div>
+<p>The expected result for this query against our sample data is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 2, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 3, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 4, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 5, &quot;name&quot;: &quot;VonKemble&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 6, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 7, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 8, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;similar-users&quot;: [ { &quot;twitter-screenname&quot;: &quot;NilaMilliron_tw&quot;, &quot;twitter-name&quot;: &quot;Nila Milliron&quot; } ] }
+    { &quot;id&quot;: 9, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 10, &quot;name&quot;: &quot;BramHatch&quot;, &quot;similar-users&quot;: [  ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_6_-_Existential_Quantification"></a>Query 6 - Existential Quantification</h3>
+<p>The expressive power of AQL includes support for queries involving &#x201c;some&#x201d; (existentially quantified) and &#x201c;all&#x201d; (universally quantified) query semantics. As an example of an existential AQL query, here we show a query to list the Facebook users who are currently employed. Such employees will have an employment history containing a record with a null end-date value, which leads us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $fbu in dataset FacebookUsers
+    where (some $e in $fbu.employment satisfies is-null($e.end-date))
+    select $fbu;
+</pre></div></div>
+<p>The expected result in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;alias&quot;: &quot;Margarita&quot;, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2, 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Codetechno&quot;, &quot;start-date&quot;: date(&quot;2006-08-06&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 5, &quot;alias&quot;: &quot;Von&quot;, &quot;name&quot;: &quot;VonKemble&quot;, &quot;user-since&quot;: datetime(&quot;2010-01-05T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Kongreen&quot;, &quot;start-date&quot;: date(&quot;2010-11-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 6, &quot;alias&quot;: &quot;Willis&quot;, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;user-since&quot;: datetime(&quot;2005-01-17T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 3, 7 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;jaydax&quot;, &quot;start-date&quot;: date(&quot;2009-05-15&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_7_-_Universal_Quantification"></a>Query 7 - Universal Quantification</h3>
+<p>As an example of a universal AQL query, here we show a query to list the Facebook users who are currently unemployed. Such employees will have an employment history containing no records with null end-date values, leading us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $fbu in dataset FacebookUsers
+    where (every $e in $fbu.employment satisfies not(is-null($e.end-date)))
+    select $fbu;
+</pre></div></div>
+<p>Here is the expected result for our sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 9, &quot;alias&quot;: &quot;Woodrow&quot;, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;user-since&quot;: datetime(&quot;2005-09-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zuncan&quot;, &quot;start-date&quot;: date(&quot;2003-04-22&quot;), &quot;end-date&quot;: date(&quot;2009-12-13&quot;) } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_8_-_Simple_Aggregation"></a>Query 8 - Simple Aggregation</h3>
+<p>Like SQL, the AQL language of AsterixDB provides support for computing aggregates over large amounts of data. As a very simple example, the following AQL query computes the total number of Facebook users:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    count(from $fbu in dataset FacebookUsers select $fbu);
+</pre></div></div>
+<p>In AQL, aggregate functions can be applied to arbitrary subquery results; in this case, the count function is applied to the result of a query that enumerates the Facebook users. The expected result here is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    10
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-A_-_Grouping_and_Aggregation"></a>Query 9-A - Grouping and Aggregation</h3>
+<p>Also like SQL, AQL supports grouped aggregation. For every Twitter user, the following group-by/aggregate query counts the number of tweets sent by that user:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name keeping $t
+    select {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>The <i>from</i> clause incrementally binds $t to tweets, and the <i>group by</i> clause groups the tweets by its issuer&#x2019;s Twitter screen-name. Unlike SQL, where data is tabular&#x2014;flat&#x2014;the data model underlying AQL allows for nesting. Thus, following the <i>group by</i> clause, the <i>select</i> clause in this query sees a sequence of $t groups, with each such group having an associated $uid variable value (i.e., the tweeting user&#x2019;s screen name). In the context of the <i>select</i> clause, due to &#x201c;&#x2026; keeping $t &#x2026;&#x201d;, $uid is bound to the tweeter&#x2019;s id and $t is bound to the <i>set</i> of tweets issued by that tweeter. The <i>select</i> clause constructs a result record containing the tweeter&#x2019;s user id and the count of the items in the associated tweet set. The query result will contain one such record per screen name. This query also illustrates another feature of AQL; notice that each user&#x2019;s screen name is acc
 essed via a path syntax that traverses each tweet&#x2019;s nested record structure.</p>
+<p>Here is the expected result for this query over the sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-B_-_Hash-Based_Grouping_and_Aggregation"></a>Query 9-B - (Hash-Based) Grouping and Aggregation</h3>
+<p>As for joins, AsterixDB has multiple evaluation strategies available for processing grouped aggregate queries. For grouped aggregation, the system knows how to employ both sort-based and hash-based aggregation methods, with sort-based methods being used by default and a hint being available to suggest that a different approach be used in processing a particular AQL query.</p>
+<p>The following query is similar to Query 9-A, but adds a hash-based aggregation hint:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    /*+ hash*/
+    group by $uid := $t.user.screen-name keeping $t
+    select {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>Here is the expected result:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_10_-_Grouping_and_Limits"></a>Query 10 - Grouping and Limits</h3>
+<p>In some use cases it is not necessary to compute the entire answer to a query. In some cases, just having the first <i>N</i> or top <i>N</i> results is sufficient. This is expressible in AQL using the <i>limit</i> clause combined with the <i>order by</i> clause.</p>
+<p>The following AQL query returns the top 3 Twitter users based on who has issued the most tweets:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name keeping $t
+    with $c := count($t)
+    order by $c desc
+    limit 3
+    select {
+        &quot;user&quot;: $uid,
+        &quot;count&quot;: $c
+    };
+</pre></div></div>
+<p>The expected result for this query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_11_-_Left_Outer_Fuzzy_Join"></a>Query 11 - Left Outer Fuzzy Join</h3>
+<p>As a last example of AQL and its query power, the following query, for each tweet, finds all of the tweets that are similar based on the topics that they refer to:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.3&quot;;
+    from $t in dataset TweetMessages
+    select {
+        &quot;tweet&quot;: $t,
+        &quot;similar-tweets&quot;: from $t2 in dataset TweetMessages
+                where  $t2.referred-topics ~= $t.referred-topics
+                and $t2.tweetid != $t.tweetid
+                select $t2.referred-topics
+    };
+</pre></div></div>
+<p>This query illustrates several things worth knowing in order to write fuzzy queries in AQL. First, as mentioned earlier, AQL offers an operator-based syntax for seeing whether two values are &#x201c;similar&#x201d; to one another or not. Second, recall that the referred-topics field of records of datatype TweetMessageType is a bag of strings. This query sets the context for its similarity join by requesting that Jaccard-based similarity semantics (<a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">http://en.wikipedia.org/wiki/Jaccard_index</a>) be used for the query&#x2019;s similarity operator and that a similarity index of 0.3 be used as its similarity threshold.</p>
+<p>The expected result for this fuzzy join query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;1&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;47.44,80.65&quot;), &quot;send-time&quot;: datetime(&quot;2008-04-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, &quot;message-text&quot;: &quot; love t-mobile its customization is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;10&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;29.15,76.53&quot;), &quot;send-time&quot;: datetime(&quot;2008-01-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;11&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NilaMilliron_tw&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Nila Milliron&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;37.59,68.42&quot;), &quot;send-time&quot;: datetime(&quot;2008-03-09T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; can't stand iphone its platform is terrible&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;samsung&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;12&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;OliJackson_512&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Oli Jackson&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;24.82,94.63&quot;), &quot;send-time&quot;: datetime(&quot;2010-02-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like samsung the voice-command is amazing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;platform&quot; }}, {{ &quot;sprint&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;2&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;32.84,67.14&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;3&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;29.72,75.8&quot;), &quot;send-time&quot;: datetime(&quot;2006-11-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; like motorola the speed is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;39.28,70.48&quot;), &quot;send-time&quot;: datetime(&quot;2011-12-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;sprint&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;5&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;40.09,92.69&quot;), &quot;send-time&quot;: datetime(&quot;2006-08-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; can't stand motorola its speed is terrible:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;6&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;47.51,83.99&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-07T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; like iphone the voice-clarity is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;iphone&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 182, &quot;statuses_count&quot;: 394, &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: 32136 }, &quot;sender-location&quot;: point(&quot;36.21,72.6&quot;), &quot;send-time&quot;: datetime(&quot;2011-08-25T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;platform&quot; }}, {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;8&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;46.05,93.34&quot;), &quot;send-time&quot;: datetime(&quot;2005-10-14T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;36.86,74.62&quot;), &quot;send-time&quot;: datetime(&quot;2012-07-21T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, &quot;message-text&quot;: &quot; love verizon its voicemail-service is awesome&quot; }, &quot;similar-tweets&quot;: 

<TRUNCATED>


[10/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/primer-sql-like.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/primer-sql-like.html b/docs/0.8.8-incubating/aql/primer-sql-like.html
new file mode 100644
index 0000000..e6ae11b
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/primer-sql-like.html
@@ -0,0 +1,886 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB 101: An ADM and AQL Primer (for SQL fans)</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB 101: An ADM and AQL Primer (for SQL fans)</h1>
+<div class="section">
+<h2><a name="Welcome_to_AsterixDB"></a>Welcome to AsterixDB!</h2>
+<p>This document introduces the main features of AsterixDB&#x2019;s data model (ADM) and query language (AQL) by example. The example is a simple scenario involving (synthetic) sample data modeled after data from the social domain. This document describes a set of sample ADM datasets, together with a set of illustrative AQL queries (in a SQL-like form), to introduce you to the &#x201c;AsterixDB user experience&#x201d;. The complete set of steps required to create and load a handful of sample datasets, along with runnable queries and the expected results for each query, are included.</p>
+<p>This document assumes that you are at least vaguely familiar with AsterixDB and why you might want to use it. Most importantly, it assumes you already have a running instance of AsterixDB and that you know how to query it using AsterixDB&#x2019;s basic web interface. For more information on these topics, you should go through the steps in <a href="../install.html">Installing Asterix Using Managix</a> before reading this document and make sure that you have a running AsterixDB instance ready to go. To get your feet wet, you should probably start with a simple local installation of AsterixDB on your favorite machine, accepting all of the default settings that Managix offers. Later you can graduate to trying AsterixDB on a cluster, its real intended home (since it targets Big Data). (Note: With the exception of specifying the correct locations where you put the source data for this example, there should no changes needed in your ADM or AQL statements to run the examples locally and/
 or to run them on a cluster when you are ready to take that step.)</p>
+<p>As you read through this document, you should try each step for yourself on your own AsterixDB instance. Once you have reached the end, you will be fully armed and dangerous, with all the basic AsterixDB knowledge that you&#x2019;ll need to start down the path of modeling, storing, and querying your own semistructured data.</p>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="ADM:_Modeling_Semistructed_Data_in_AsterixDB"></a>ADM: Modeling Semistructed Data in AsterixDB</h2>
+<p>In this section you will learn all about modeling Big Data using ADM, the data model of the AsterixDB BDMS.</p>
+<div class="section">
+<h3><a name="Dataverses_Datatypes_and_Datasets"></a>Dataverses, Datatypes, and Datasets</h3>
+<p>The top-level organizing concept in the AsterixDB world is the <i>dataverse</i>. A dataverse&#x2014;short for &#x201c;data universe&#x201d;&#x2014;is a place (similar to a database in a relational DBMS) in which to create and manage the types, datasets, functions, and other artifacts for a given AsterixDB application. When you start using an AsterixDB instance for the first time, it starts out &#x201c;empty&#x201d;; it contains no data other than the AsterixDB system catalogs (which live in a special dataverse called the Metadata dataverse). To store your data in AsterixDB, you will first create a dataverse and then you use it for the <i>datatypes</i> and <i>datasets</i> for managing your own data. A datatype tells AsterixDB what you know (or more accurately, what you want it to know) a priori about one of the kinds of data instances that you want AsterixDB to hold for you. A dataset is a collection of data instances of a datatype, and AsterixDB makes sure that the data instances
  that you put in it conform to its specified type. Since AsterixDB targets semistructured data, you can use <i>open</i> datatypes and tell it as little or as much as you wish about your data up front; the more you tell it up front, the less information it will have to store repeatedly in the individual data instances that you give it. Instances of open datatypes are permitted to have additional content, beyond what the datatype says, as long as they at least contain the information prescribed by the datatype definition. Open typing allows data to vary from one instance to another and it leaves wiggle room for application evolution in terms of what might need to be stored in the future. If you want to restrict data instances in a dataset to have only what the datatype says, and nothing extra, you can define a <i>closed</i> datatype for that dataset and AsterixDB will keep users from storing objects that have extra data in them. Datatypes are open by default unless you tell AsterixDB 
 otherwise. Let&#x2019;s put these concepts to work</p>
+<p>Our little sample scenario involves hypothetical information about users of two popular social networks, Facebook and Twitter, and their messages. We&#x2019;ll start by defining a dataverse called &#x201c;TinySocial&#x201d; to hold our datatypes and datasets. The AsterixDB data model (ADM) is essentially a superset of JSON&#x2014;it&#x2019;s what you get by extending JSON with more data types and additional data modeling constructs borrowed from object databases. The following is how we can create the TinySocial dataverse plus a set of ADM types for modeling Twitter users, their Tweets, Facebook users, their users&#x2019; employment information, and their messages. (Note: Keep in mind that this is just a tiny and somewhat silly example intended for illustrating some of the key features of AsterixDB. :-))</p>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse TinySocial if exists;
+    create dataverse TinySocial;
+    use dataverse TinySocial;
+
+    create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int32,
+        statuses_count: int32,
+        name: string,
+        followers_count: int32
+    }
+    create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+    }
+    create type EmploymentType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+    }
+    create type FacebookUserType as closed {
+        id: int32,
+        alias: string,
+        name: string,
+        user-since: datetime,
+        friend-ids: {{ int32 }},
+        employment: [EmploymentType]
+    }
+    create type FacebookMessageType as closed {
+        message-id: int32,
+        author-id: int32,
+        in-response-to: int32?,
+        sender-location: point?,
+        message: string
+    }
+</pre></div></div>
+<p>The first three lines above tell AsterixDB to drop the old TinySocial dataverse, if one already exists, and then to create a brand new one and make it the focus of the statements that follow. The first type creation statement creates a datatype for holding information about Twitter users. It is a record type with a mix of integer and string data, very much like a (flat) relational tuple. The indicated fields are all mandatory, but because the type is open, additional fields are welcome. The second statement creates a datatype for Twitter messages; this shows how to specify a closed type. Interestingly (based on one of Twitter&#x2019;s APIs), each Twitter message actually embeds an instance of the sending user&#x2019;s information (current as of when the message was sent), so this is an example of a nested record in ADM. Twitter messages can optionally contain the sender&#x2019;s location, which is modeled via the sender-location field of spatial type <i>point</i>; the question ma
 rk following the field type indicates its optionality. An optional field is like a nullable field in SQL&#x2014;it may be present or missing, but when it&#x2019;s present, its data type will conform to the datatype&#x2019;s specification. The send-time field illustrates the use of a temporal primitive type, <i>datetime</i>. Lastly, the referred-topics field illustrates another way that ADM is richer than the relational model; this field holds a bag (a.k.a. an unordered list) of strings. Since the overall datatype definition for Twitter messages says &#x201c;closed&#x201d;, the fields that it lists are the only fields that instances of this type will be allowed to contain. The next two create type statements create a record type for holding information about one component of the employment history of a Facebook user and then a record type for holding the user information itself. The Facebook user type highlights a few additional ADM data model features. Its friend-ids field is a bag 
 of integers, presumably the Facebook user ids for this user&#x2019;s friends, and its employment field is an ordered list of employment records. The final create type statement defines a type for handling the content of a Facebook message in our hypothetical social data storage scenario.</p>
+<p>Before going on, we need to once again emphasize the idea that AsterixDB is aimed at storing and querying not just Big Data, but Big <i>Semistructured</i> Data. This means that most of the fields listed in the create type statements above could have been omitted without changing anything other than the resulting size of stored data instances on disk. AsterixDB stores its information about the fields defined a priori as separate metadata, whereas the information about other fields that are &#x201c;just there&#x201d; in instances of open datatypes is stored with each instance&#x2014;making for more bits on disk and longer times for operations affected by data size (e.g., dataset scans). The only fields that <i>must</i> be specified a priori are the primary key and any fields that you would like to build indexes on.</p></div>
+<div class="section">
+<h3><a name="Creating_Datasets_and_Indexes"></a>Creating Datasets and Indexes</h3>
+<p>Now that we have defined our datatypes, we can move on and create datasets to store the actual data. (If we wanted to, we could even have several named datasets based on any one of these datatypes.) We can do this as follows, utilizing the DDL capabilities of AsterixDB.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create dataset FacebookUsers(FacebookUserType)
+    primary key id;
+
+    create dataset FacebookMessages(FacebookMessageType)
+    primary key message-id;
+
+    create dataset TwitterUsers(TwitterUserType)
+    primary key screen-name;
+
+    create dataset TweetMessages(TweetMessageType)
+    primary key tweetid
+    hints(cardinality=100);
+
+    create index fbUserSinceIdx on FacebookUsers(user-since);
+    create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+    create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    from $ds in dataset Metadata.Dataset select $ds;
+    from $ix in dataset Metadata.Index select $ix;
+</pre></div></div>
+<p>The ADM DDL statements above create four datasets for holding our social data in the TinySocial dataverse: FacebookUsers, FacebookMessages, TwitterUsers, and TweetMessages. The first statement creates the FacebookUsers data set. It specifies that this dataset will store data instances conforming to FacebookUserType and that it has a primary key which is the id field of each instance. The primary key information is used by AsterixDB to uniquely identify instances for the purpose of later lookup and for use in secondary indexes. Each AsterixDB dataset is stored (and indexed) in the form of a B+ tree on primary key; secondary indexes point to their indexed data by primary key. In AsterixDB clusters, the primary key is also used to hash-partition (a.k.a. shard) the dataset across the nodes of the cluster. The next three create dataset statements are similar. The last one illustrates an optional clause for providing useful hints to AsterixDB. In this case, the hint tells AsterixDB tha
 t the dataset definer is anticipating that the TweetMessages dataset will contain roughly 100 objects; knowing this can help AsterixDB to more efficiently manage and query this dataset. (AsterixDB does not yet gather and maintain data statistics; it will currently, abitrarily, assume a cardinality of one million objects per dataset in the absence of such an optional definition-time hint.)</p>
+<p>The create dataset statements above are followed by four more DDL statements, each of which creates a secondary index on a field of one of the datasets. The first one indexes the FacebookUsers dataset on its user-since field. This index will be a B+ tree index; its type is unspecified and <i>btree</i> is the default type. The other three illustrate how you can explicitly specify the desired type of index. In addition to btree, <i>rtree</i> and inverted <i>keyword</i> indexes are supported by AsterixDB. Indexes can also have composite keys, and more advanced text indexing is available as well (ngram(k), where k is the desired gram length).</p></div>
+<div class="section">
+<h3><a name="Querying_the_Metadata_Dataverse"></a>Querying the Metadata Dataverse</h3>
+<p>The last two statements above show how you can use queries in AQL to examine the AsterixDB system catalogs and tell what artifacts you have created. Just as relational DBMSs use their own tables to store their catalogs, AsterixDB uses its own datasets to persist descriptions of its datasets, datatypes, indexes, and so on. Running the first of the two queries above will list all of your newly created datasets, and it will also show you a full list of all the metadata datasets. (You can then explore from there on your own if you are curious) These last two queries also illustrate one other factoid worth knowing: AsterixDB allows queries to span dataverses by allowing the optional use of fully-qualified dataset names (i.e., <i>dataversename.datasetname</i>) to reference datasets that live in a dataverse other than the one that was named in the most recently executed <i>use dataverse</i> directive.</p>
+<p>&#x2014;-</p></div></div>
+<div class="section">
+<h2><a name="Loading_Data_Into_AsterixDB"></a>Loading Data Into AsterixDB</h2>
+<p>Okay, so far so good&#x2014;AsterixDB is now ready for data, so let&#x2019;s give it some data to store Our next task will be to load some sample data into the four datasets that we just defined. Here we will load a tiny set of records, defined in ADM format (a superset of JSON), into each dataset. In the boxes below you can see the actual data instances contained in each of the provided sample files. In order to load this data yourself, you should first store the four corresponding <tt>.adm</tt> files (whose URLs are indicated on top of each box below) into a filesystem directory accessible to your running AsterixDB instance. Take a few minutes to look carefully at each of the sample data sets. This will give you a better sense of the nature of the data that we are about to load and query. We should note that ADM format is a textual serialization of what AsterixDB will actually store; when persisted in AsterixDB, the data format will be binary and the data in the predefined fiel
 ds of the data instances will be stored separately from their associated field name and type metadata.</p>
+<p><a href="../data/twu.adm">Twitter Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:18,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416}
+    {&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159}
+    {&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649}
+    {&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136}
+</pre></div></div>
+<p><a href="../data/twm.adm">Tweet Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;tweetid&quot;:&quot;1&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;47.44,80.65&quot;),&quot;send-time&quot;:datetime(&quot;2008-04-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;customization&quot;}},&quot;message-text&quot;:&quot; love t-mobile its customization is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;2&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;32.84,67.14&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like verizon its shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;3&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;29.72,75.8&quot;),&quot;send-time&quot;:datetime(&quot;2006-11-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; like motorola the speed is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;4&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;39.28,70.48&quot;),&quot;send-time&quot;:datetime(&quot;2011-12-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;sprint&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like sprint the voice-command is mind-blowing:)&quot;}
+    {&quot;tweetid&quot;:&quot;5&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;40.09,92.69&quot;),&quot;send-time&quot;:datetime(&quot;2006-08-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; can't stand motorola its speed is terrible:(&quot;}
+    {&quot;tweetid&quot;:&quot;6&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;47.51,83.99&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-07T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; like iphone the voice-clarity is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;7&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136},&quot;sender-location&quot;:point(&quot;36.21,72.6&quot;),&quot;send-time&quot;:datetime(&quot;2011-08-25T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; like samsung the platform is good&quot;}
+    {&quot;tweetid&quot;:&quot;8&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;46.05,93.34&quot;),&quot;send-time&quot;:datetime(&quot;2005-10-14T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like t-mobile the shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;9&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;36.86,74.62&quot;),&quot;send-time&quot;:datetime(&quot;2012-07-21T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voicemail-service&quot;}},&quot;message-text&quot;:&quot; love verizon its voicemail-service is awesome&quot;}
+    {&quot;tweetid&quot;:&quot;10&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;29.15,76.53&quot;),&quot;send-time&quot;:datetime(&quot;2008-01-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; hate verizon its voice-clarity is OMG:(&quot;}
+    {&quot;tweetid&quot;:&quot;11&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;37.59,68.42&quot;),&quot;send-time&quot;:datetime(&quot;2008-03-09T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; can't stand iphone its platform is terrible&quot;}
+    {&quot;tweetid&quot;:&quot;12&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;OliJackson_512&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Oli Jackson&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;24.82,94.63&quot;),&quot;send-time&quot;:datetime(&quot;2010-02-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like samsung the voice-command is amazing:)&quot;}
+</pre></div></div>
+<p><a href="../data/fbu.adm">Facebook Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;id&quot;:1,&quot;alias&quot;:&quot;Margarita&quot;,&quot;name&quot;:&quot;MargaritaStoddard&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-20T10:10:00&quot;),&quot;friend-ids&quot;:{{2,3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Codetechno&quot;,&quot;start-date&quot;:date(&quot;2006-08-06&quot;)}]}
+    {&quot;id&quot;:2,&quot;alias&quot;:&quot;Isbel&quot;,&quot;name&quot;:&quot;IsbelDull&quot;,&quot;user-since&quot;:datetime(&quot;2011-01-22T10:10:00&quot;),&quot;friend-ids&quot;:{{1,4}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Hexviafind&quot;,&quot;start-date&quot;:date(&quot;2010-04-27&quot;)}]}
+    {&quot;id&quot;:3,&quot;alias&quot;:&quot;Emory&quot;,&quot;name&quot;:&quot;EmoryUnk&quot;,&quot;user-since&quot;:datetime(&quot;2012-07-10T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,8,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;geomedia&quot;,&quot;start-date&quot;:date(&quot;2010-06-17&quot;),&quot;end-date&quot;:date(&quot;2010-01-26&quot;)}]}
+    {&quot;id&quot;:4,&quot;alias&quot;:&quot;Nicholas&quot;,&quot;name&quot;:&quot;NicholasStroh&quot;,&quot;user-since&quot;:datetime(&quot;2010-12-27T10:10:00&quot;),&quot;friend-ids&quot;:{{2}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zamcorporation&quot;,&quot;start-date&quot;:date(&quot;2010-06-08&quot;)}]}
+    {&quot;id&quot;:5,&quot;alias&quot;:&quot;Von&quot;,&quot;name&quot;:&quot;VonKemble&quot;,&quot;user-since&quot;:datetime(&quot;2010-01-05T10:10:00&quot;),&quot;friend-ids&quot;:{{3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Kongreen&quot;,&quot;start-date&quot;:date(&quot;2010-11-27&quot;)}]}
+    {&quot;id&quot;:6,&quot;alias&quot;:&quot;Willis&quot;,&quot;name&quot;:&quot;WillisWynne&quot;,&quot;user-since&quot;:datetime(&quot;2005-01-17T10:10:00&quot;),&quot;friend-ids&quot;:{{1,3,7}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;jaydax&quot;,&quot;start-date&quot;:date(&quot;2009-05-15&quot;)}]}
+    {&quot;id&quot;:7,&quot;alias&quot;:&quot;Suzanna&quot;,&quot;name&quot;:&quot;SuzannaTillson&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-07T10:10:00&quot;),&quot;friend-ids&quot;:{{6}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Labzatron&quot;,&quot;start-date&quot;:date(&quot;2011-04-19&quot;)}]}
+    {&quot;id&quot;:8,&quot;alias&quot;:&quot;Nila&quot;,&quot;name&quot;:&quot;NilaMilliron&quot;,&quot;user-since&quot;:datetime(&quot;2008-01-01T10:10:00&quot;),&quot;friend-ids&quot;:{{3}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Plexlane&quot;,&quot;start-date&quot;:date(&quot;2010-02-28&quot;)}]}
+    {&quot;id&quot;:9,&quot;alias&quot;:&quot;Woodrow&quot;,&quot;name&quot;:&quot;WoodrowNehling&quot;,&quot;user-since&quot;:datetime(&quot;2005-09-20T10:10:00&quot;),&quot;friend-ids&quot;:{{3,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zuncan&quot;,&quot;start-date&quot;:date(&quot;2003-04-22&quot;),&quot;end-date&quot;:date(&quot;2009-12-13&quot;)}]}
+    {&quot;id&quot;:10,&quot;alias&quot;:&quot;Bram&quot;,&quot;name&quot;:&quot;BramHatch&quot;,&quot;user-since&quot;:datetime(&quot;2010-10-16T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;physcane&quot;,&quot;start-date&quot;:date(&quot;2007-06-05&quot;),&quot;end-date&quot;:date(&quot;2011-11-05&quot;)}]}
+</pre></div></div>
+<p><a href="../data/fbm.adm">Facebook Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;message-id&quot;:1,&quot;author-id&quot;:3,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;47.16,77.75&quot;),&quot;message&quot;:&quot; love sprint its shortcut-menu is awesome:)&quot;}
+    {&quot;message-id&quot;:2,&quot;author-id&quot;:1,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;41.66,80.87&quot;),&quot;message&quot;:&quot; dislike iphone its touch-screen is horrible&quot;}
+    {&quot;message-id&quot;:3,&quot;author-id&quot;:2,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;48.09,81.01&quot;),&quot;message&quot;:&quot; like samsung the plan is amazing&quot;}
+    {&quot;message-id&quot;:4,&quot;author-id&quot;:1,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;37.73,97.04&quot;),&quot;message&quot;:&quot; can't stand at&amp;t the network is horrible:(&quot;}
+    {&quot;message-id&quot;:5,&quot;author-id&quot;:6,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;34.7,90.76&quot;),&quot;message&quot;:&quot; love sprint the customization is mind-blowing&quot;}
+    {&quot;message-id&quot;:6,&quot;author-id&quot;:2,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;31.5,75.56&quot;),&quot;message&quot;:&quot; like t-mobile its platform is mind-blowing&quot;}
+    {&quot;message-id&quot;:7,&quot;author-id&quot;:5,&quot;in-response-to&quot;:15,&quot;sender-location&quot;:point(&quot;32.91,85.05&quot;),&quot;message&quot;:&quot; dislike sprint the speed is horrible&quot;}
+    {&quot;message-id&quot;:8,&quot;author-id&quot;:1,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;40.33,80.87&quot;),&quot;message&quot;:&quot; like verizon the 3G is awesome:)&quot;}
+    {&quot;message-id&quot;:9,&quot;author-id&quot;:3,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;34.45,96.48&quot;),&quot;message&quot;:&quot; love verizon its wireless is good&quot;}
+    {&quot;message-id&quot;:10,&quot;author-id&quot;:1,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;42.5,70.01&quot;),&quot;message&quot;:&quot; can't stand motorola the touch-screen is terrible&quot;}
+    {&quot;message-id&quot;:11,&quot;author-id&quot;:1,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;38.97,77.49&quot;),&quot;message&quot;:&quot; can't stand at&amp;t its plan is terrible&quot;}
+    {&quot;message-id&quot;:12,&quot;author-id&quot;:10,&quot;in-response-to&quot;:6,&quot;sender-location&quot;:point(&quot;42.26,77.76&quot;),&quot;message&quot;:&quot; can't stand t-mobile its voicemail-service is OMG:(&quot;}
+    {&quot;message-id&quot;:13,&quot;author-id&quot;:10,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;42.77,78.92&quot;),&quot;message&quot;:&quot; dislike iphone the voice-command is bad:(&quot;}
+    {&quot;message-id&quot;:14,&quot;author-id&quot;:9,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;41.33,85.28&quot;),&quot;message&quot;:&quot; love at&amp;t its 3G is good:)&quot;}
+    {&quot;message-id&quot;:15,&quot;author-id&quot;:7,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;44.47,67.11&quot;),&quot;message&quot;:&quot; like iphone the voicemail-service is awesome&quot;}
+</pre></div></div>
+<p>It&#x2019;s loading time! We can use AQL <i>load</i> statements to populate our datasets with the sample records shown above. The following shows how loading can be done for data stored in <tt>.adm</tt> files in your local filesystem. <i>Note:</i> You <i>MUST</i> replace the <tt>&lt;Host Name&gt;</tt> and <tt>&lt;Absolute File Path&gt;</tt> placeholders in each load statement below with valid values based on the host IP address (or host name) for the machine and directory that you have downloaded the provided <tt>.adm</tt> files to. As you do so, be very, very careful to retain the two slashes in the load statements, i.e., do not delete the two slashes that appear in front of the absolute path to your <tt>.adm</tt> files. (This will lead to a three-slash character sequence at the start of each load statement&#x2019;s file input path specification.)</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    load dataset FacebookUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+    load dataset FacebookMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+    load dataset TwitterUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+    load dataset TweetMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="AQL:_Querying_Your_AsterixDB_Data"></a>AQL: Querying Your AsterixDB Data</h2>
+<p>Congratulations! You now have sample social data stored (and indexed) in AsterixDB. (You are part of an elite and adventurous group of individuals. :-)) Now that you have successfully loaded the provided sample data into the datasets that we defined, you can start running queries against them.</p>
+<p>The query language for AsterixDB is AQL&#x2014;the Asterix Query Language. AQL is loosely based on XQuery, the language developed and standardized in the early to mid 2000&#x2019;s by the World Wide Web Consortium (W3C) for querying semistructured data stored in their XML format. We have tossed all of the &#x201c;XML cruft&#x201d; out of their language but retained many of its core ideas. We did this because its design was developed over a period of years by a diverse committee of smart and experienced language designers, including &#x201c;SQL people&#x201d;, &#x201c;functional programming people&#x201d;, and &#x201c;XML people&#x201d;, all of whom were focused on how to design a new query language that operates well over semistructured data. (We decided to stand on their shoulders instead of starting from scratch and revisiting many of the same issues.) Note that AQL is not SQL and not based on SQL: In other words, AsterixDB is fully &#x201c;NoSQL compliant&#x201d;. :-)</p>
+<p>In this section we introduce AQL via a set of example queries, along with their expected results, based on the data above, to help you get started. Many of the most important features of AQL are presented in this set of representative queries. You can find more details in the document on the <a href="datamodel.html">Asterix Data Model (ADM)</a>, in the <a href="manual.html">AQL Reference Manual</a>, and a complete list of built-in functions is available in the <a href="functions.html">Asterix Functions</a> document.</p>
+<p>AQL is an expression language. Even the expression 1+1 is a valid AQL query that evaluates to 2. (Try it for yourself! Okay, maybe that&#x2019;s <i>not</i> the best use of a 512-node shared-nothing compute cluster.) Most useful AQL queries will be based on the <i>FLWOR</i> (pronounced &#x201c;flower&#x201d;) expression structure that AQL has borrowed from XQuery ((<a class="externalLink" href="http://en.wikipedia.org/wiki/FLWOR))">http://en.wikipedia.org/wiki/FLWOR))</a>. The FLWOR expression syntax supports both the incremental binding (<i>for</i>) of variables to ADM data instances in a dataset (or in the result of any AQL expression, actually) and the full binding (<i>let</i>) of variables to entire intermediate results in a fashion similar to temporary views in the SQL world. FLWOR is an acronym that is short for <i>for</i>-<i>let</i>-<i>where</i>-<i>order by</i>-<i>return</i>, naming five of the most frequently used clauses from the syntax of a full AQL query. AQL also inclu
 des <i>group by</i> and <i>limit</i> clauses, as you will see shortly. Roughly speaking, for SQL afficiandos, the <i>for</i> clause in AQL is like the <i>from</i> clause in SQL, the <i>return</i> clause in AQL is like the <i>select</i> clause in SQL (but appears at the end instead of the beginning of a query), the <i>let</i> clause in AQL is like SQL&#x2019;s <i>with</i> clause, and the <i>where</i> and <i>order by</i> clauses in both languages are similar.</p>
+<p>In order to allow SQL fans to write queries in their favored ways, AQL provides synonyms: <i>from</i> for <i>for</i>, <i>select</i> for <i>return</i>, <i>with</i> for <i>let</i>, and <i>keeping</i> for <i>with</i> in the group by clause.</p>
+<p>Enough talk! Let&#x2019;s go ahead and try writing some queries and see about learning AQL by example.</p>
+<div class="section">
+<h3><a name="Query_0-A_-_Exact-Match_Lookup"></a>Query 0-A - Exact-Match Lookup</h3>
+<p>For our first query, let&#x2019;s find a Facebook user based on his or her user id. Suppose the user we want is the user whose id is 8:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+    from $user in dataset FacebookUsers
+    where $user.id = 8
+    select $user;
+</pre></div></div>
+<p>The query&#x2019;s <i>from</i> clause binds the variable <tt>$user</tt> incrementally to the data instances residing in the dataset named FacebookUsers. Its <i>where</i> clause selects only those bindings having a user id of interest, filtering out the rest. The <i>select</i> clause returns the (entire) data instance for each binding that satisfies the predicate. Since this dataset is indexed on user id (its primary key), this query will be done via a quick index lookup.</p>
+<p>The expected result for our sample data is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_0-B_-_Range_Scan"></a>Query 0-B - Range Scan</h3>
+<p>AQL, like SQL, supports a variety of different predicates. For example, for our next query, let&#x2019;s find the Facebook users whose ids are in the range between 2 and 4:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    where $user.id &gt;= 2 and $user.id &lt;= 4
+    select $user;
+</pre></div></div>
+<p>This query&#x2019;s expected result, also evaluable using the primary index on user id, is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_1_-_Other_Query_Filters"></a>Query 1 - Other Query Filters</h3>
+<p>AQL can do range queries on any data type that supports the appropriate set of comparators. As an example, this next query retrieves the Facebook users who joined between July 22, 2010 and July 29, 2012:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+    from $user in dataset FacebookUsers
+    where $user.user-since &gt;= datetime('2010-07-22T00:00:00')
+      and $user.user-since &lt;= datetime('2012-07-29T23:59:59')
+    select $user;
+</pre></div></div>
+<p>The expected result for this query, also an indexable query, is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-A_-_Equijoin"></a>Query 2-A - Equijoin</h3>
+<p>In addition to simply binding variables to data instances and returning them &#x201c;whole&#x201d;, an AQL query can construct new ADM instances to return based on combinations of its variable bindings. This gives AQL the power to do joins much like those done using multi-table <i>from</i> clauses in SQL. For example, suppose we wanted a list of all Facebook users paired with their associated messages, with the list enumerating the author name and the message text associated with each Facebook message. We could do this as follows in AQL:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    from $message in dataset FacebookMessages
+    where $message.author-id = $user.id
+    select {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The result of this query is a sequence of new ADM instances, one for each author/message pair. Each instance in the result will be an ADM record containing two fields, &#x201c;uname&#x201d; and &#x201c;message&#x201d;, containing the user&#x2019;s name and the message text, respectively, for each author/message pair. (Note that &#x201c;uname&#x201d; and &#x201c;message&#x201d; are both simple AQL expressions themselves&#x2014;so in the most general case, even the resulting field names can be computed as part of the query, making AQL a very powerful tool for slicing and dicing semistructured data.)</p>
+<p>The expected result of this example AQL join query for our sample data set is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-B_-_Index_join"></a>Query 2-B - Index join</h3>
+<p>By default, AsterixDB evaluates equijoin queries using hash-based join methods that work well for doing ad hoc joins of very large data sets (<a class="externalLink" href="http://en.wikipedia.org/wiki/Hash_join">http://en.wikipedia.org/wiki/Hash_join</a>). On a cluster, hash partitioning is employed as AsterixDB&#x2019;s divide-and-conquer strategy for computing large parallel joins. AsterixDB includes other join methods, but in the absence of data statistics and selectivity estimates, it doesn&#x2019;t (yet) have the know-how to intelligently choose among its alternatives. We therefore asked ourselves the classic question&#x2014;WWOD?&#x2014;What Would Oracle Do?&#x2014;and in the interim, AQL includes a clunky (but useful) hint-based mechanism for addressing the occasional need to suggest to AsterixDB which join method it should use for a particular AQL query.</p>
+<p>The following query is similar to Query 2-A but includes a suggestion to AsterixDB that it should consider employing an index-based nested-loop join technique to process the query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    from $message in dataset FacebookMessages
+    where $message.author-id /*+ indexnl */  = $user.id
+    select {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The expected result is (of course) the same as before, modulo the order of the instances. Result ordering is (intentionally) undefined in AQL in the absence of an <i>order by</i> clause. The query result for our sample data in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+</pre></div></div>
+<p>(It is worth knowing, with respect to influencing AsterixDB&#x2019;s query evaluation, that nested <i>from</i> clauses&#x2014;a.k.a. joins&#x2014; are currently evaluated with the &#x201c;outer&#x201d; clause probing the data of the &#x201c;inner&#x201d; clause.)</p></div>
+<div class="section">
+<h3><a name="Query_3_-_Nested_Outer_Join"></a>Query 3 - Nested Outer Join</h3>
+<p>In order to support joins between tables with missing/dangling join tuples, the designers of SQL ended up shoe-horning a subset of the relational algebra into SQL&#x2019;s <i>from</i> clause syntax&#x2014;and providing a variety of join types there for users to choose from. Left outer joins are particularly important in SQL, e.g., to print a summary of customers and orders, grouped by customer, without omitting those customers who haven&#x2019;t placed any orders yet.</p>
+<p>The AQL language supports nesting, both of queries and of query results, and the combination allows for an arguably cleaner/more natural approach to such queries. As an example, supposed we wanted, for each Facebook user, to produce a record that has his/her name plus a list of the messages written by that user. In SQL, this would involve a left outer join between users and messages, grouping by user, and having the user name repeated along side each message. In AQL, this sort of use case can be handled (more naturally) as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $user in dataset FacebookUsers
+    select {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: from $message in dataset FacebookMessages
+            where $message.author-id = $user.id
+            select $message.message
+    };
+</pre></div></div>
+<p>This AQL query binds the variable <tt>$user</tt> to the data instances in FacebookUsers; for each user, it constructs a result record containing a &#x201c;uname&#x201d; field with the user&#x2019;s name and a &#x201c;messages&#x201d; field with a nested collection of all messages for that user. The nested collection for each user is specified by using a correlated subquery. (Note: While it looks like nested loops could be involved in computing the result, AsterixDB recogizes the equivalence of such a query to an outerjoin, and it will use an efficient hash-based strategy when actually computing the query&#x2019;s result.)</p>
+<p>Here is this example query&#x2019;s expected output:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;messages&quot;: [ &quot; dislike iphone its touch-screen is horrible&quot;, &quot; can't stand at&amp;t the network is horrible:(&quot;, &quot; like verizon the 3G is awesome:)&quot;, &quot; can't stand motorola the touch-screen is terrible&quot;, &quot; can't stand at&amp;t its plan is terrible&quot; ] }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;messages&quot;: [ &quot; like samsung the plan is amazing&quot;, &quot; like t-mobile its platform is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;messages&quot;: [ &quot; love sprint its shortcut-menu is awesome:)&quot;, &quot; love verizon its wireless is good&quot; ] }
+    { &quot;uname&quot;: &quot;NicholasStroh&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;messages&quot;: [ &quot; dislike sprint the speed is horrible&quot; ] }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;messages&quot;: [ &quot; love sprint the customization is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;messages&quot;: [ &quot; like iphone the voicemail-service is awesome&quot; ] }
+    { &quot;uname&quot;: &quot;NilaMilliron&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;messages&quot;: [ &quot; love at&amp;t its 3G is good:)&quot; ] }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;messages&quot;: [ &quot; dislike iphone the voice-command is bad:(&quot;, &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_4_-_Theta_Join"></a>Query 4 - Theta Join</h3>
+<p>Not all joins are expressible as equijoins and computable using equijoin-oriented algorithms. The join predicates for some use cases involve predicates with functions; AsterixDB supports the expression of such queries and will still evaluate them as best it can using nested loop based techniques (and broadcast joins in the parallel case).</p>
+<p>As an example of such a use case, suppose that we wanted, for each tweet T, to find all of the other tweets that originated from within a circle of radius of 1 surrounding tweet T&#x2019;s location. In AQL, this can be specified in a manner similar to the previous query using one of the built-in functions on the spatial data type instead of id equality in the correlated query&#x2019;s <i>where</i> clause:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    select {
+    &quot;message&quot;: $t.message-text,
+    &quot;nearby-messages&quot;: from $t2 in dataset TweetMessages
+                where spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1
+                select { &quot;msgtxt&quot;:$t2.message-text}
+    };
+</pre></div></div>
+<p>Here is the expected result for this query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;message&quot;: &quot; love t-mobile its customization is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love t-mobile its customization is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; }, { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand iphone its platform is terrible&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand iphone its platform is terrible&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the voice-command is amazing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the voice-command is amazing:)&quot; } ] }
+    { &quot;message&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; like motorola the speed is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand motorola its speed is terrible:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand motorola its speed is terrible:(&quot; } ] }
+    { &quot;message&quot;: &quot; like iphone the voice-clarity is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like iphone the voice-clarity is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the platform is good&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the platform is good&quot; } ] }
+    { &quot;message&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; love verizon its voicemail-service is awesome&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love verizon its voicemail-service is awesome&quot; } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_5_-_Fuzzy_Join"></a>Query 5 - Fuzzy Join</h3>
+<p>As another example of a non-equijoin use case, we could ask AsterixDB to find, for each Facebook user, all Twitter users with names &#x201c;similar&#x201d; to their name. AsterixDB supports a variety of &#x201c;fuzzy match&#x201d; functions for use with textual and set-based data. As one example, we could choose to use edit distance with a threshold of 3 as the definition of name similarity, in which case we could write the following query using AQL&#x2019;s operator-based syntax (~=) for testing whether or not two values are similar:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+    from $fbu in dataset FacebookUsers
+    select {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: from $t in dataset TweetMessages
+                with $tu := $t.user
+                where $tu.name ~= $fbu.name
+                select {
+                &quot;twitter-screenname&quot;: $tu.screen-name,
+                &quot;twitter-name&quot;: $tu.name
+                }
+    };
+</pre></div></div>
+<p>The expected result for this query against our sample data is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 2, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 3, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 4, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 5, &quot;name&quot;: &quot;VonKemble&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 6, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 7, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 8, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;similar-users&quot;: [ { &quot;twitter-screenname&quot;: &quot;NilaMilliron_tw&quot;, &quot;twitter-name&quot;: &quot;Nila Milliron&quot; } ] }
+    { &quot;id&quot;: 9, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 10, &quot;name&quot;: &quot;BramHatch&quot;, &quot;similar-users&quot;: [  ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_6_-_Existential_Quantification"></a>Query 6 - Existential Quantification</h3>
+<p>The expressive power of AQL includes support for queries involving &#x201c;some&#x201d; (existentially quantified) and &#x201c;all&#x201d; (universally quantified) query semantics. As an example of an existential AQL query, here we show a query to list the Facebook users who are currently employed. Such employees will have an employment history containing a record with a null end-date value, which leads us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $fbu in dataset FacebookUsers
+    where (some $e in $fbu.employment satisfies is-null($e.end-date))
+    select $fbu;
+</pre></div></div>
+<p>The expected result in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;alias&quot;: &quot;Margarita&quot;, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2, 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Codetechno&quot;, &quot;start-date&quot;: date(&quot;2006-08-06&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 5, &quot;alias&quot;: &quot;Von&quot;, &quot;name&quot;: &quot;VonKemble&quot;, &quot;user-since&quot;: datetime(&quot;2010-01-05T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Kongreen&quot;, &quot;start-date&quot;: date(&quot;2010-11-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 6, &quot;alias&quot;: &quot;Willis&quot;, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;user-since&quot;: datetime(&quot;2005-01-17T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 3, 7 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;jaydax&quot;, &quot;start-date&quot;: date(&quot;2009-05-15&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_7_-_Universal_Quantification"></a>Query 7 - Universal Quantification</h3>
+<p>As an example of a universal AQL query, here we show a query to list the Facebook users who are currently unemployed. Such employees will have an employment history containing no records with null end-date values, leading us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $fbu in dataset FacebookUsers
+    where (every $e in $fbu.employment satisfies not(is-null($e.end-date)))
+    select $fbu;
+</pre></div></div>
+<p>Here is the expected result for our sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 9, &quot;alias&quot;: &quot;Woodrow&quot;, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;user-since&quot;: datetime(&quot;2005-09-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zuncan&quot;, &quot;start-date&quot;: date(&quot;2003-04-22&quot;), &quot;end-date&quot;: date(&quot;2009-12-13&quot;) } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_8_-_Simple_Aggregation"></a>Query 8 - Simple Aggregation</h3>
+<p>Like SQL, the AQL language of AsterixDB provides support for computing aggregates over large amounts of data. As a very simple example, the following AQL query computes the total number of Facebook users:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    count(from $fbu in dataset FacebookUsers select $fbu);
+</pre></div></div>
+<p>In AQL, aggregate functions can be applied to arbitrary subquery results; in this case, the count function is applied to the result of a query that enumerates the Facebook users. The expected result here is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    10
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-A_-_Grouping_and_Aggregation"></a>Query 9-A - Grouping and Aggregation</h3>
+<p>Also like SQL, AQL supports grouped aggregation. For every Twitter user, the following group-by/aggregate query counts the number of tweets sent by that user:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name keeping $t
+    select {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>The <i>from</i> clause incrementally binds $t to tweets, and the <i>group by</i> clause groups the tweets by its issuer&#x2019;s Twitter screen-name. Unlike SQL, where data is tabular&#x2014;flat&#x2014;the data model underlying AQL allows for nesting. Thus, following the <i>group by</i> clause, the <i>select</i> clause in this query sees a sequence of $t groups, with each such group having an associated $uid variable value (i.e., the tweeting user&#x2019;s screen name). In the context of the <i>select</i> clause, due to &#x201c;&#x2026; keeping $t &#x2026;&#x201d;, $uid is bound to the tweeter&#x2019;s id and $t is bound to the <i>set</i> of tweets issued by that tweeter. The <i>select</i> clause constructs a result record containing the tweeter&#x2019;s user id and the count of the items in the associated tweet set. The query result will contain one such record per screen name. This query also illustrates another feature of AQL; notice that each user&#x2019;s screen name is acc
 essed via a path syntax that traverses each tweet&#x2019;s nested record structure.</p>
+<p>Here is the expected result for this query over the sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-B_-_Hash-Based_Grouping_and_Aggregation"></a>Query 9-B - (Hash-Based) Grouping and Aggregation</h3>
+<p>As for joins, AsterixDB has multiple evaluation strategies available for processing grouped aggregate queries. For grouped aggregation, the system knows how to employ both sort-based and hash-based aggregation methods, with sort-based methods being used by default and a hint being available to suggest that a different approach be used in processing a particular AQL query.</p>
+<p>The following query is similar to Query 9-A, but adds a hash-based aggregation hint:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    /*+ hash*/
+    group by $uid := $t.user.screen-name keeping $t
+    select {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>Here is the expected result:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_10_-_Grouping_and_Limits"></a>Query 10 - Grouping and Limits</h3>
+<p>In some use cases it is not necessary to compute the entire answer to a query. In some cases, just having the first <i>N</i> or top <i>N</i> results is sufficient. This is expressible in AQL using the <i>limit</i> clause combined with the <i>order by</i> clause.</p>
+<p>The following AQL query returns the top 3 Twitter users based on who has issued the most tweets:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    from $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name keeping $t
+    with $c := count($t)
+    order by $c desc
+    limit 3
+    select {
+        &quot;user&quot;: $uid,
+        &quot;count&quot;: $c
+    };
+</pre></div></div>
+<p>The expected result for this query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_11_-_Left_Outer_Fuzzy_Join"></a>Query 11 - Left Outer Fuzzy Join</h3>
+<p>As a last example of AQL and its query power, the following query, for each tweet, finds all of the tweets that are similar based on the topics that they refer to:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.3&quot;;
+    from $t in dataset TweetMessages
+    select {
+        &quot;tweet&quot;: $t,
+        &quot;similar-tweets&quot;: from $t2 in dataset TweetMessages
+                where  $t2.referred-topics ~= $t.referred-topics
+                and $t2.tweetid != $t.tweetid
+                select $t2.referred-topics
+    };
+</pre></div></div>
+<p>This query illustrates several things worth knowing in order to write fuzzy queries in AQL. First, as mentioned earlier, AQL offers an operator-based syntax for seeing whether two values are &#x201c;similar&#x201d; to one another or not. Second, recall that the referred-topics field of records of datatype TweetMessageType is a bag of strings. This query sets the context for its similarity join by requesting that Jaccard-based similarity semantics (<a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">http://en.wikipedia.org/wiki/Jaccard_index</a>) be used for the query&#x2019;s similarity operator and that a similarity index of 0.3 be used as its similarity threshold.</p>
+<p>The expected result for this fuzzy join query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;1&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;47.44,80.65&quot;), &quot;send-time&quot;: datetime(&quot;2008-04-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, &quot;message-text&quot;: &quot; love t-mobile its customization is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;10&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;29.15,76.53&quot;), &quot;send-time&quot;: datetime(&quot;2008-01-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;11&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NilaMilliron_tw&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Nila Milliron&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;37.59,68.42&quot;), &quot;send-time&quot;: datetime(&quot;2008-03-09T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; can't stand iphone its platform is terrible&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;samsung&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;12&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;OliJackson_512&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Oli Jackson&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;24.82,94.63&quot;), &quot;send-time&quot;: datetime(&quot;2010-02-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like samsung the voice-command is amazing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;platform&quot; }}, {{ &quot;sprint&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;2&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;32.84,67.14&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;3&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;29.72,75.8&quot;), &quot;send-time&quot;: datetime(&quot;2006-11-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; like motorola the speed is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;39.28,70.48&quot;), &quot;send-time&quot;: datetime(&quot;2011-12-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;sprint&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;5&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;40.09,92.69&quot;), &quot;send-time&quot;: datetime(&quot;2006-08-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; can't stand motorola its speed is terrible:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;6&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;47.51,83.99&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-07T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; like iphone the voice-clarity is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;iphone&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 182, &quot;statuses_count&quot;: 394, &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: 32136 }, &quot;sender-location&quot;: point(&quot;36.21,72.6&quot;), &quot;send-time&quot;: datetime(&quot;2011-08-25T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;platform&quot; }}, {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;8&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;46.05,93.34&quot;), &quot;send-time&quot;: datetime(&quot;2005-10-14T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;36.86,74.62&quot;), &quot;send-time&quot;: datetime(&quot;2012-07-21T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, &quot;message-text&quot;: &quot; love verizon its voicemail-service is awesome&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;

<TRUNCATED>


[09/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/primer.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/primer.html b/docs/0.8.8-incubating/aql/primer.html
new file mode 100644
index 0000000..99239c1
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/primer.html
@@ -0,0 +1,896 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB 101: An ADM and AQL Primer</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AsterixDB 101: An ADM and AQL Primer</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB 101: An ADM and AQL Primer</h1>
+<div class="section">
+<h2><a name="Welcome_to_AsterixDB"></a>Welcome to AsterixDB!</h2>
+<p>This document introduces the main features of AsterixDB&#x2019;s data model (ADM) and query language (AQL) by example. The example is a simple scenario involving (synthetic) sample data modeled after data from the social domain. This document describes a set of sample ADM datasets, together with a set of illustrative AQL queries, to introduce you to the &#x201c;AsterixDB user experience&#x201d;. The complete set of steps required to create and load a handful of sample datasets, along with runnable queries and the expected results for each query, are included.</p>
+<p>This document assumes that you are at least vaguely familiar with AsterixDB and why you might want to use it. Most importantly, it assumes you already have a running instance of AsterixDB and that you know how to query it using AsterixDB&#x2019;s basic web interface. For more information on these topics, you should go through the steps in <a href="../install.html">Installing Asterix Using Managix</a> before reading this document and make sure that you have a running AsterixDB instance ready to go. To get your feet wet, you should probably start with a simple local installation of AsterixDB on your favorite machine, accepting all of the default settings that Managix offers. Later you can graduate to trying AsterixDB on a cluster, its real intended home (since it targets Big Data). (Note: With the exception of specifying the correct locations where you put the source data for this example, there should no changes needed in your ADM or AQL statements to run the examples locally and/
 or to run them on a cluster when you are ready to take that step.)</p>
+<p>As you read through this document, you should try each step for yourself on your own AsterixDB instance. Once you have reached the end, you will be fully armed and dangerous, with all the basic AsterixDB knowledge that you&#x2019;ll need to start down the path of modeling, storing, and querying your own semistructured data.</p>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="ADM:_Modeling_Semistructed_Data_in_AsterixDB"></a>ADM: Modeling Semistructed Data in AsterixDB</h2>
+<p>In this section you will learn all about modeling Big Data using ADM, the data model of the AsterixDB BDMS.</p>
+<div class="section">
+<h3><a name="Dataverses_Datatypes_and_Datasets"></a>Dataverses, Datatypes, and Datasets</h3>
+<p>The top-level organizing concept in the AsterixDB world is the <i>dataverse</i>. A dataverse&#x2014;short for &#x201c;data universe&#x201d;&#x2014;is a place (similar to a database in a relational DBMS) in which to create and manage the types, datasets, functions, and other artifacts for a given AsterixDB application. When you start using an AsterixDB instance for the first time, it starts out &#x201c;empty&#x201d;; it contains no data other than the AsterixDB system catalogs (which live in a special dataverse called the Metadata dataverse). To store your data in AsterixDB, you will first create a dataverse and then you use it for the <i>datatypes</i> and <i>datasets</i> for managing your own data. A datatype tells AsterixDB what you know (or more accurately, what you want it to know) a priori about one of the kinds of data instances that you want AsterixDB to hold for you. A dataset is a collection of data instances of a datatype, and AsterixDB makes sure that the data instances
  that you put in it conform to its specified type. Since AsterixDB targets semistructured data, you can use <i>open</i> datatypes and tell it as little or as much as you wish about your data up front; the more you tell it up front, the less information it will have to store repeatedly in the individual data instances that you give it. Instances of open datatypes are permitted to have additional content, beyond what the datatype says, as long as they at least contain the information prescribed by the datatype definition. Open typing allows data to vary from one instance to another and it leaves wiggle room for application evolution in terms of what might need to be stored in the future. If you want to restrict data instances in a dataset to have only what the datatype says, and nothing extra, you can define a <i>closed</i> datatype for that dataset and AsterixDB will keep users from storing objects that have extra data in them. Datatypes are open by default unless you tell AsterixDB 
 otherwise. Let&#x2019;s put these concepts to work</p>
+<p>Our little sample scenario involves hypothetical information about users of two popular social networks, Facebook and Twitter, and their messages. We&#x2019;ll start by defining a dataverse called &#x201c;TinySocial&#x201d; to hold our datatypes and datasets. The AsterixDB data model (ADM) is essentially a superset of JSON&#x2014;it&#x2019;s what you get by extending JSON with more data types and additional data modeling constructs borrowed from object databases. The following is how we can create the TinySocial dataverse plus a set of ADM types for modeling Twitter users, their Tweets, Facebook users, their users&#x2019; employment information, and their messages. (Note: Keep in mind that this is just a tiny and somewhat silly example intended for illustrating some of the key features of AsterixDB. :-))</p>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse TinySocial if exists;
+    create dataverse TinySocial;
+    use dataverse TinySocial;
+
+    create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64,
+        name: string,
+        followers_count: int64
+    }
+
+    create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+    }
+
+    create type EmploymentType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+    }
+
+    create type FacebookUserType as closed {
+        id: int64,
+        alias: string,
+        name: string,
+        user-since: datetime,
+        friend-ids: {{ int64 }},
+        employment: [EmploymentType]
+    }
+
+    create type FacebookMessageType as closed {
+        message-id: int64,
+        author-id: int64,
+        in-response-to: int64?,
+        sender-location: point?,
+        message: string
+    }
+</pre></div></div>
+<p>The first three lines above tell AsterixDB to drop the old TinySocial dataverse, if one already exists, and then to create a brand new one and make it the focus of the statements that follow. The first type creation statement creates a datatype for holding information about Twitter users. It is a record type with a mix of integer and string data, very much like a (flat) relational tuple. The indicated fields are all mandatory, but because the type is open, additional fields are welcome. The second statement creates a datatype for Twitter messages; this shows how to specify a closed type. Interestingly (based on one of Twitter&#x2019;s APIs), each Twitter message actually embeds an instance of the sending user&#x2019;s information (current as of when the message was sent), so this is an example of a nested record in ADM. Twitter messages can optionally contain the sender&#x2019;s location, which is modeled via the sender-location field of spatial type <i>point</i>; the question ma
 rk following the field type indicates its optionality. An optional field is like a nullable field in SQL&#x2014;it may be present or missing, but when it&#x2019;s present, its data type will conform to the datatype&#x2019;s specification. The send-time field illustrates the use of a temporal primitive type, <i>datetime</i>. Lastly, the referred-topics field illustrates another way that ADM is richer than the relational model; this field holds a bag (a.k.a. an unordered list) of strings. Since the overall datatype definition for Twitter messages says &#x201c;closed&#x201d;, the fields that it lists are the only fields that instances of this type will be allowed to contain. The next two create type statements create a record type for holding information about one component of the employment history of a Facebook user and then a record type for holding the user information itself. The Facebook user type highlights a few additional ADM data model features. Its friend-ids field is a bag 
 of integers, presumably the Facebook user ids for this user&#x2019;s friends, and its employment field is an ordered list of employment records. The final create type statement defines a type for handling the content of a Facebook message in our hypothetical social data storage scenario.</p>
+<p>Before going on, we need to once again emphasize the idea that AsterixDB is aimed at storing and querying not just Big Data, but Big <i>Semistructured</i> Data. This means that most of the fields listed in the create type statements above could have been omitted without changing anything other than the resulting size of stored data instances on disk. AsterixDB stores its information about the fields defined a priori as separate metadata, whereas the information about other fields that are &#x201c;just there&#x201d; in instances of open datatypes is stored with each instance&#x2014;making for more bits on disk and longer times for operations affected by data size (e.g., dataset scans). The only fields that <i>must</i> be specified a priori are the primary key. Indexes can be built on fields that don&#x2019;t belong to the pre-specified part of datatype&#x2019;s schema as long as their type is specified at index create time and and the <i>enforced</i> keyword is provided at the end
  of the index definition. (The <i>enforced</i> keyword asks the system to ensure that the indexed field or fields conform to this specified type in all of the dataset&#x2019;s record instances where they are present.) Additionally, indexed fields may be nested arbitrarily deep within a dataset&#x2019;s records as long as the nesting does not go pass through a list (be it ordered or unordered) along the way.</p></div>
+<div class="section">
+<h3><a name="Creating_Datasets_and_Indexes"></a>Creating Datasets and Indexes</h3>
+<p>Now that we have defined our datatypes, we can move on and create datasets to store the actual data. (If we wanted to, we could even have several named datasets based on any one of these datatypes.) We can do this as follows, utilizing the DDL capabilities of AsterixDB.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create dataset FacebookUsers(FacebookUserType)
+    primary key id;
+
+    create dataset FacebookMessages(FacebookMessageType)
+    primary key message-id;
+
+    create dataset TwitterUsers(TwitterUserType)
+    primary key screen-name;
+
+    create dataset TweetMessages(TweetMessageType)
+    primary key tweetid
+    hints(cardinality=100);
+
+    create index fbUserSinceIdx on FacebookUsers(user-since);
+    create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+    create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    for $ds in dataset Metadata.Dataset return $ds;
+    for $ix in dataset Metadata.Index return $ix;
+</pre></div></div>
+<p>The ADM DDL statements above create four datasets for holding our social data in the TinySocial dataverse: FacebookUsers, FacebookMessages, TwitterUsers, and TweetMessages. The first statement creates the FacebookUsers data set. It specifies that this dataset will store data instances conforming to FacebookUserType and that it has a primary key which is the id field of each instance. The primary key information is used by AsterixDB to uniquely identify instances for the purpose of later lookup and for use in secondary indexes. Each AsterixDB dataset is stored (and indexed) in the form of a B+ tree on primary key; secondary indexes point to their indexed data by primary key. In AsterixDB clusters, the primary key is also used to hash-partition (a.k.a. shard) the dataset across the nodes of the cluster. The next three create dataset statements are similar. The last one illustrates an optional clause for providing useful hints to AsterixDB. In this case, the hint tells AsterixDB tha
 t the dataset definer is anticipating that the TweetMessages dataset will contain roughly 100 objects; knowing this can help AsterixDB to more efficiently manage and query this dataset. (AsterixDB does not yet gather and maintain data statistics; it will currently, abitrarily, assume a cardinality of one million objects per dataset in the absence of such an optional definition-time hint.)</p>
+<p>The create dataset statements above are followed by four more DDL statements, each of which creates a secondary index on a field of one of the datasets. The first one indexes the FacebookUsers dataset on its user-since field. This index will be a B+ tree index; its type is unspecified and <i>btree</i> is the default type. The other three illustrate how you can explicitly specify the desired type of index. In addition to btree, <i>rtree</i> and inverted <i>keyword</i> indexes are supported by AsterixDB. Indexes can also have composite keys, and more advanced text indexing is available as well (ngram(k), where k is the desired gram length).</p></div>
+<div class="section">
+<h3><a name="Querying_the_Metadata_Dataverse"></a>Querying the Metadata Dataverse</h3>
+<p>The last two statements above show how you can use queries in AQL to examine the AsterixDB system catalogs and tell what artifacts you have created. Just as relational DBMSs use their own tables to store their catalogs, AsterixDB uses its own datasets to persist descriptions of its datasets, datatypes, indexes, and so on. Running the first of the two queries above will list all of your newly created datasets, and it will also show you a full list of all the metadata datasets. (You can then explore from there on your own if you are curious) These last two queries also illustrate one other factoid worth knowing: AsterixDB allows queries to span dataverses by allowing the optional use of fully-qualified dataset names (i.e., <i>dataversename.datasetname</i>) to reference datasets that live in a dataverse other than the one that was named in the most recently executed <i>use dataverse</i> directive.</p>
+<p>&#x2014;-</p></div></div>
+<div class="section">
+<h2><a name="Loading_Data_Into_AsterixDB"></a>Loading Data Into AsterixDB</h2>
+<p>Okay, so far so good&#x2014;AsterixDB is now ready for data, so let&#x2019;s give it some data to store Our next task will be to load some sample data into the four datasets that we just defined. Here we will load a tiny set of records, defined in ADM format (a superset of JSON), into each dataset. In the boxes below you can see the actual data instances contained in each of the provided sample files. In order to load this data yourself, you should first store the four corresponding <tt>.adm</tt> files (whose URLs are indicated on top of each box below) into a filesystem directory accessible to your running AsterixDB instance. Take a few minutes to look carefully at each of the sample data sets. This will give you a better sense of the nature of the data that we are about to load and query. We should note that ADM format is a textual serialization of what AsterixDB will actually store; when persisted in AsterixDB, the data format will be binary and the data in the predefined fiel
 ds of the data instances will be stored separately from their associated field name and type metadata.</p>
+<p><a href="../data/twu.adm">Twitter Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:18,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416}
+    {&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159}
+    {&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649}
+    {&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136}
+</pre></div></div>
+<p><a href="../data/twm.adm">Tweet Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;tweetid&quot;:&quot;1&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;47.44,80.65&quot;),&quot;send-time&quot;:datetime(&quot;2008-04-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;customization&quot;}},&quot;message-text&quot;:&quot; love t-mobile its customization is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;2&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;32.84,67.14&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like verizon its shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;3&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;29.72,75.8&quot;),&quot;send-time&quot;:datetime(&quot;2006-11-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; like motorola the speed is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;4&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;39.28,70.48&quot;),&quot;send-time&quot;:datetime(&quot;2011-12-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;sprint&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like sprint the voice-command is mind-blowing:)&quot;}
+    {&quot;tweetid&quot;:&quot;5&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;40.09,92.69&quot;),&quot;send-time&quot;:datetime(&quot;2006-08-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; can't stand motorola its speed is terrible:(&quot;}
+    {&quot;tweetid&quot;:&quot;6&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;47.51,83.99&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-07T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; like iphone the voice-clarity is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;7&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136},&quot;sender-location&quot;:point(&quot;36.21,72.6&quot;),&quot;send-time&quot;:datetime(&quot;2011-08-25T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; like samsung the platform is good&quot;}
+    {&quot;tweetid&quot;:&quot;8&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;46.05,93.34&quot;),&quot;send-time&quot;:datetime(&quot;2005-10-14T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like t-mobile the shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;9&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;36.86,74.62&quot;),&quot;send-time&quot;:datetime(&quot;2012-07-21T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voicemail-service&quot;}},&quot;message-text&quot;:&quot; love verizon its voicemail-service is awesome&quot;}
+    {&quot;tweetid&quot;:&quot;10&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;29.15,76.53&quot;),&quot;send-time&quot;:datetime(&quot;2008-01-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; hate verizon its voice-clarity is OMG:(&quot;}
+    {&quot;tweetid&quot;:&quot;11&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;37.59,68.42&quot;),&quot;send-time&quot;:datetime(&quot;2008-03-09T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; can't stand iphone its platform is terrible&quot;}
+    {&quot;tweetid&quot;:&quot;12&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;OliJackson_512&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Oli Jackson&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;24.82,94.63&quot;),&quot;send-time&quot;:datetime(&quot;2010-02-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like samsung the voice-command is amazing:)&quot;}
+</pre></div></div>
+<p><a href="../data/fbu.adm">Facebook Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;id&quot;:1,&quot;alias&quot;:&quot;Margarita&quot;,&quot;name&quot;:&quot;MargaritaStoddard&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-20T10:10:00&quot;),&quot;friend-ids&quot;:{{2,3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Codetechno&quot;,&quot;start-date&quot;:date(&quot;2006-08-06&quot;)}]}
+    {&quot;id&quot;:2,&quot;alias&quot;:&quot;Isbel&quot;,&quot;name&quot;:&quot;IsbelDull&quot;,&quot;user-since&quot;:datetime(&quot;2011-01-22T10:10:00&quot;),&quot;friend-ids&quot;:{{1,4}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Hexviafind&quot;,&quot;start-date&quot;:date(&quot;2010-04-27&quot;)}]}
+    {&quot;id&quot;:3,&quot;alias&quot;:&quot;Emory&quot;,&quot;name&quot;:&quot;EmoryUnk&quot;,&quot;user-since&quot;:datetime(&quot;2012-07-10T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,8,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;geomedia&quot;,&quot;start-date&quot;:date(&quot;2010-06-17&quot;),&quot;end-date&quot;:date(&quot;2010-01-26&quot;)}]}
+    {&quot;id&quot;:4,&quot;alias&quot;:&quot;Nicholas&quot;,&quot;name&quot;:&quot;NicholasStroh&quot;,&quot;user-since&quot;:datetime(&quot;2010-12-27T10:10:00&quot;),&quot;friend-ids&quot;:{{2}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zamcorporation&quot;,&quot;start-date&quot;:date(&quot;2010-06-08&quot;)}]}
+    {&quot;id&quot;:5,&quot;alias&quot;:&quot;Von&quot;,&quot;name&quot;:&quot;VonKemble&quot;,&quot;user-since&quot;:datetime(&quot;2010-01-05T10:10:00&quot;),&quot;friend-ids&quot;:{{3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Kongreen&quot;,&quot;start-date&quot;:date(&quot;2010-11-27&quot;)}]}
+    {&quot;id&quot;:6,&quot;alias&quot;:&quot;Willis&quot;,&quot;name&quot;:&quot;WillisWynne&quot;,&quot;user-since&quot;:datetime(&quot;2005-01-17T10:10:00&quot;),&quot;friend-ids&quot;:{{1,3,7}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;jaydax&quot;,&quot;start-date&quot;:date(&quot;2009-05-15&quot;)}]}
+    {&quot;id&quot;:7,&quot;alias&quot;:&quot;Suzanna&quot;,&quot;name&quot;:&quot;SuzannaTillson&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-07T10:10:00&quot;),&quot;friend-ids&quot;:{{6}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Labzatron&quot;,&quot;start-date&quot;:date(&quot;2011-04-19&quot;)}]}
+    {&quot;id&quot;:8,&quot;alias&quot;:&quot;Nila&quot;,&quot;name&quot;:&quot;NilaMilliron&quot;,&quot;user-since&quot;:datetime(&quot;2008-01-01T10:10:00&quot;),&quot;friend-ids&quot;:{{3}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Plexlane&quot;,&quot;start-date&quot;:date(&quot;2010-02-28&quot;)}]}
+    {&quot;id&quot;:9,&quot;alias&quot;:&quot;Woodrow&quot;,&quot;name&quot;:&quot;WoodrowNehling&quot;,&quot;user-since&quot;:datetime(&quot;2005-09-20T10:10:00&quot;),&quot;friend-ids&quot;:{{3,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zuncan&quot;,&quot;start-date&quot;:date(&quot;2003-04-22&quot;),&quot;end-date&quot;:date(&quot;2009-12-13&quot;)}]}
+    {&quot;id&quot;:10,&quot;alias&quot;:&quot;Bram&quot;,&quot;name&quot;:&quot;BramHatch&quot;,&quot;user-since&quot;:datetime(&quot;2010-10-16T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;physcane&quot;,&quot;start-date&quot;:date(&quot;2007-06-05&quot;),&quot;end-date&quot;:date(&quot;2011-11-05&quot;)}]}
+</pre></div></div>
+<p><a href="../data/fbm.adm">Facebook Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;message-id&quot;:1,&quot;author-id&quot;:3,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;47.16,77.75&quot;),&quot;message&quot;:&quot; love sprint its shortcut-menu is awesome:)&quot;}
+    {&quot;message-id&quot;:2,&quot;author-id&quot;:1,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;41.66,80.87&quot;),&quot;message&quot;:&quot; dislike iphone its touch-screen is horrible&quot;}
+    {&quot;message-id&quot;:3,&quot;author-id&quot;:2,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;48.09,81.01&quot;),&quot;message&quot;:&quot; like samsung the plan is amazing&quot;}
+    {&quot;message-id&quot;:4,&quot;author-id&quot;:1,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;37.73,97.04&quot;),&quot;message&quot;:&quot; can't stand at&amp;t the network is horrible:(&quot;}
+    {&quot;message-id&quot;:5,&quot;author-id&quot;:6,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;34.7,90.76&quot;),&quot;message&quot;:&quot; love sprint the customization is mind-blowing&quot;}
+    {&quot;message-id&quot;:6,&quot;author-id&quot;:2,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;31.5,75.56&quot;),&quot;message&quot;:&quot; like t-mobile its platform is mind-blowing&quot;}
+    {&quot;message-id&quot;:7,&quot;author-id&quot;:5,&quot;in-response-to&quot;:15,&quot;sender-location&quot;:point(&quot;32.91,85.05&quot;),&quot;message&quot;:&quot; dislike sprint the speed is horrible&quot;}
+    {&quot;message-id&quot;:8,&quot;author-id&quot;:1,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;40.33,80.87&quot;),&quot;message&quot;:&quot; like verizon the 3G is awesome:)&quot;}
+    {&quot;message-id&quot;:9,&quot;author-id&quot;:3,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;34.45,96.48&quot;),&quot;message&quot;:&quot; love verizon its wireless is good&quot;}
+    {&quot;message-id&quot;:10,&quot;author-id&quot;:1,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;42.5,70.01&quot;),&quot;message&quot;:&quot; can't stand motorola the touch-screen is terrible&quot;}
+    {&quot;message-id&quot;:11,&quot;author-id&quot;:1,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;38.97,77.49&quot;),&quot;message&quot;:&quot; can't stand at&amp;t its plan is terrible&quot;}
+    {&quot;message-id&quot;:12,&quot;author-id&quot;:10,&quot;in-response-to&quot;:6,&quot;sender-location&quot;:point(&quot;42.26,77.76&quot;),&quot;message&quot;:&quot; can't stand t-mobile its voicemail-service is OMG:(&quot;}
+    {&quot;message-id&quot;:13,&quot;author-id&quot;:10,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;42.77,78.92&quot;),&quot;message&quot;:&quot; dislike iphone the voice-command is bad:(&quot;}
+    {&quot;message-id&quot;:14,&quot;author-id&quot;:9,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;41.33,85.28&quot;),&quot;message&quot;:&quot; love at&amp;t its 3G is good:)&quot;}
+    {&quot;message-id&quot;:15,&quot;author-id&quot;:7,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;44.47,67.11&quot;),&quot;message&quot;:&quot; like iphone the voicemail-service is awesome&quot;}
+</pre></div></div>
+<p>It&#x2019;s loading time! We can use AQL <i>load</i> statements to populate our datasets with the sample records shown above. The following shows how loading can be done for data stored in <tt>.adm</tt> files in your local filesystem. <i>Note:</i> You <i>MUST</i> replace the <tt>&lt;Host Name&gt;</tt> and <tt>&lt;Absolute File Path&gt;</tt> placeholders in each load statement below with valid values based on the host IP address (or host name) for the machine and directory that you have downloaded the provided <tt>.adm</tt> files to. As you do so, be very, very careful to retain the two slashes in the load statements, i.e., do not delete the two slashes that appear in front of the absolute path to your <tt>.adm</tt> files. (This will lead to a three-slash character sequence at the start of each load statement&#x2019;s file input path specification.)</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    load dataset FacebookUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+
+    load dataset FacebookMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+
+    load dataset TwitterUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+
+    load dataset TweetMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="AQL:_Querying_Your_AsterixDB_Data"></a>AQL: Querying Your AsterixDB Data</h2>
+<p>Congratulations! You now have sample social data stored (and indexed) in AsterixDB. (You are part of an elite and adventurous group of individuals. :-)) Now that you have successfully loaded the provided sample data into the datasets that we defined, you can start running queries against them.</p>
+<p>The query language for AsterixDB is AQL&#x2014;the Asterix Query Language. AQL is loosely based on XQuery, the language developed and standardized in the early to mid 2000&#x2019;s by the World Wide Web Consortium (W3C) for querying semistructured data stored in their XML format. We have tossed all of the &#x201c;XML cruft&#x201d; out of their language but retained many of its core ideas. We did this because its design was developed over a period of years by a diverse committee of smart and experienced language designers, including &#x201c;SQL people&#x201d;, &#x201c;functional programming people&#x201d;, and &#x201c;XML people&#x201d;, all of whom were focused on how to design a new query language that operates well over semistructured data. (We decided to stand on their shoulders instead of starting from scratch and revisiting many of the same issues.) Note that AQL is not SQL and not based on SQL: In other words, AsterixDB is fully &#x201c;NoSQL compliant&#x201d;. :-)</p>
+<p>In this section we introduce AQL via a set of example queries, along with their expected results, based on the data above, to help you get started. Many of the most important features of AQL are presented in this set of representative queries. You can find more details in the document on the <a href="datamodel.html">Asterix Data Model (ADM)</a>, in the <a href="manual.html">AQL Reference Manual</a>, and a complete list of built-in functions is available in the <a href="functions.html">Asterix Functions</a> document.</p>
+<p>AQL is an expression language. Even the expression 1+1 is a valid AQL query that evaluates to 2. (Try it for yourself! Okay, maybe that&#x2019;s <i>not</i> the best use of a 512-node shared-nothing compute cluster.) Most useful AQL queries will be based on the <i>FLWOR</i> (pronounced &#x201c;flower&#x201d;) expression structure that AQL has borrowed from XQuery ((<a class="externalLink" href="http://en.wikipedia.org/wiki/FLWOR))">http://en.wikipedia.org/wiki/FLWOR))</a>. The FLWOR expression syntax supports both the incremental binding (<i>for</i>) of variables to ADM data instances in a dataset (or in the result of any AQL expression, actually) and the full binding (<i>let</i>) of variables to entire intermediate results in a fashion similar to temporary views in the SQL world. FLWOR is an acronym that is short for <i>for</i>-<i>let</i>-<i>where</i>-<i>order by</i>-<i>return</i>, naming five of the most frequently used clauses from the syntax of a full AQL query. AQL also inclu
 des <i>group by</i> and <i>limit</i> clauses, as you will see shortly. Roughly speaking, for SQL afficiandos, the <i>for</i> clause in AQL is like the <i>from</i> clause in SQL, the <i>return</i> clause in AQL is like the <i>select</i> clause in SQL (but appears at the end instead of the beginning of a query), the <i>let</i> clause in AQL is like SQL&#x2019;s <i>with</i> clause, and the <i>where</i> and <i>order by</i> clauses in both languages are similar.</p>
+<p>Enough talk! Let&#x2019;s go ahead and try writing some queries and see about learning AQL by example.</p>
+<div class="section">
+<h3><a name="Query_0-A_-_Exact-Match_Lookup"></a>Query 0-A - Exact-Match Lookup</h3>
+<p>For our first query, let&#x2019;s find a Facebook user based on his or her user id. Suppose the user we want is the user whose id is 8:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    where $user.id = 8
+    return $user;
+</pre></div></div>
+<p>The query&#x2019;s <i>for</i> clause binds the variable <tt>$user</tt> incrementally to the data instances residing in the dataset named FacebookUsers. Its <i>where</i> clause selects only those bindings having a user id of interest, filtering out the rest. The <i>return</i> clause returns the (entire) data instance for each binding that satisfies the predicate. Since this dataset is indexed on user id (its primary key), this query will be done via a quick index lookup.</p>
+<p>The expected result for our sample data is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_0-B_-_Range_Scan"></a>Query 0-B - Range Scan</h3>
+<p>AQL, like SQL, supports a variety of different predicates. For example, for our next query, let&#x2019;s find the Facebook users whose ids are in the range between 2 and 4:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    where $user.id &gt;= 2 and $user.id &lt;= 4
+    return $user;
+</pre></div></div>
+<p>This query&#x2019;s expected result, also evaluable using the primary index on user id, is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_1_-_Other_Query_Filters"></a>Query 1 - Other Query Filters</h3>
+<p>AQL can do range queries on any data type that supports the appropriate set of comparators. As an example, this next query retrieves the Facebook users who joined between July 22, 2010 and July 29, 2012:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    where $user.user-since &gt;= datetime('2010-07-22T00:00:00')
+      and $user.user-since &lt;= datetime('2012-07-29T23:59:59')
+    return $user;
+</pre></div></div>
+<p>The expected result for this query, also an indexable query, is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-A_-_Equijoin"></a>Query 2-A - Equijoin</h3>
+<p>In addition to simply binding variables to data instances and returning them &#x201c;whole&#x201d;, an AQL query can construct new ADM instances to return based on combinations of its variable bindings. This gives AQL the power to do joins much like those done using multi-table <i>from</i> clauses in SQL. For example, suppose we wanted a list of all Facebook users paired with their associated messages, with the list enumerating the author name and the message text associated with each Facebook message. We could do this as follows in AQL:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    for $message in dataset FacebookMessages
+    where $message.author-id = $user.id
+    return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The result of this query is a sequence of new ADM instances, one for each author/message pair. Each instance in the result will be an ADM record containing two fields, &#x201c;uname&#x201d; and &#x201c;message&#x201d;, containing the user&#x2019;s name and the message text, respectively, for each author/message pair. (Note that &#x201c;uname&#x201d; and &#x201c;message&#x201d; are both simple AQL expressions themselves&#x2014;so in the most general case, even the resulting field names can be computed as part of the query, making AQL a very powerful tool for slicing and dicing semistructured data.)</p>
+<p>The expected result of this example AQL join query for our sample data set is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-B_-_Index_join"></a>Query 2-B - Index join</h3>
+<p>By default, AsterixDB evaluates equijoin queries using hash-based join methods that work well for doing ad hoc joins of very large data sets (<a class="externalLink" href="http://en.wikipedia.org/wiki/Hash_join">http://en.wikipedia.org/wiki/Hash_join</a>). On a cluster, hash partitioning is employed as AsterixDB&#x2019;s divide-and-conquer strategy for computing large parallel joins. AsterixDB includes other join methods, but in the absence of data statistics and selectivity estimates, it doesn&#x2019;t (yet) have the know-how to intelligently choose among its alternatives. We therefore asked ourselves the classic question&#x2014;WWOD?&#x2014;What Would Oracle Do?&#x2014;and in the interim, AQL includes a clunky (but useful) hint-based mechanism for addressing the occasional need to suggest to AsterixDB which join method it should use for a particular AQL query.</p>
+<p>The following query is similar to Query 2-A but includes a suggestion to AsterixDB that it should consider employing an index-based nested-loop join technique to process the query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    for $message in dataset FacebookMessages
+    where $message.author-id /*+ indexnl */  = $user.id
+    return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The expected result is (of course) the same as before, modulo the order of the instances. Result ordering is (intentionally) undefined in AQL in the absence of an <i>order by</i> clause. The query result for our sample data in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+</pre></div></div>
+<p>(It is worth knowing, with respect to influencing AsterixDB&#x2019;s query evaluation, that nested <i>for</i> clauses&#x2014;a.k.a. joins&#x2014; are currently evaluated with the &#x201c;outer&#x201d; clause probing the data of the &#x201c;inner&#x201d; clause.)</p></div>
+<div class="section">
+<h3><a name="Query_3_-_Nested_Outer_Join"></a>Query 3 - Nested Outer Join</h3>
+<p>In order to support joins between tables with missing/dangling join tuples, the designers of SQL ended up shoe-horning a subset of the relational algebra into SQL&#x2019;s <i>from</i> clause syntax&#x2014;and providing a variety of join types there for users to choose from. Left outer joins are particularly important in SQL, e.g., to print a summary of customers and orders, grouped by customer, without omitting those customers who haven&#x2019;t placed any orders yet.</p>
+<p>The AQL language supports nesting, both of queries and of query results, and the combination allows for an arguably cleaner/more natural approach to such queries. As an example, supposed we wanted, for each Facebook user, to produce a record that has his/her name plus a list of the messages written by that user. In SQL, this would involve a left outer join between users and messages, grouping by user, and having the user name repeated along side each message. In AQL, this sort of use case can be handled (more naturally) as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    return {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: for $message in dataset FacebookMessages
+            where $message.author-id = $user.id
+            return $message.message
+    };
+</pre></div></div>
+<p>This AQL query binds the variable <tt>$user</tt> to the data instances in FacebookUsers; for each user, it constructs a result record containing a &#x201c;uname&#x201d; field with the user&#x2019;s name and a &#x201c;messages&#x201d; field with a nested collection of all messages for that user. The nested collection for each user is specified by using a correlated subquery. (Note: While it looks like nested loops could be involved in computing the result, AsterixDB recogizes the equivalence of such a query to an outerjoin, and it will use an efficient hash-based strategy when actually computing the query&#x2019;s result.)</p>
+<p>Here is this example query&#x2019;s expected output:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;messages&quot;: [ &quot; dislike iphone its touch-screen is horrible&quot;, &quot; can't stand at&amp;t the network is horrible:(&quot;, &quot; like verizon the 3G is awesome:)&quot;, &quot; can't stand motorola the touch-screen is terrible&quot;, &quot; can't stand at&amp;t its plan is terrible&quot; ] }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;messages&quot;: [ &quot; like samsung the plan is amazing&quot;, &quot; like t-mobile its platform is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;messages&quot;: [ &quot; love sprint its shortcut-menu is awesome:)&quot;, &quot; love verizon its wireless is good&quot; ] }
+    { &quot;uname&quot;: &quot;NicholasStroh&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;messages&quot;: [ &quot; dislike sprint the speed is horrible&quot; ] }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;messages&quot;: [ &quot; love sprint the customization is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;messages&quot;: [ &quot; like iphone the voicemail-service is awesome&quot; ] }
+    { &quot;uname&quot;: &quot;NilaMilliron&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;messages&quot;: [ &quot; love at&amp;t its 3G is good:)&quot; ] }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;messages&quot;: [ &quot; dislike iphone the voice-command is bad:(&quot;, &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_4_-_Theta_Join"></a>Query 4 - Theta Join</h3>
+<p>Not all joins are expressible as equijoins and computable using equijoin-oriented algorithms. The join predicates for some use cases involve predicates with functions; AsterixDB supports the expression of such queries and will still evaluate them as best it can using nested loop based techniques (and broadcast joins in the parallel case).</p>
+<p>As an example of such a use case, suppose that we wanted, for each tweet T, to find all of the other tweets that originated from within a circle of radius of 1 surrounding tweet T&#x2019;s location. In AQL, this can be specified in a manner similar to the previous query using one of the built-in functions on the spatial data type instead of id equality in the correlated query&#x2019;s <i>where</i> clause:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    return {
+    &quot;message&quot;: $t.message-text,
+    &quot;nearby-messages&quot;: for $t2 in dataset TweetMessages
+                where spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1
+                return { &quot;msgtxt&quot;:$t2.message-text}
+    };
+</pre></div></div>
+<p>Here is the expected result for this query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;message&quot;: &quot; love t-mobile its customization is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love t-mobile its customization is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; }, { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand iphone its platform is terrible&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand iphone its platform is terrible&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the voice-command is amazing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the voice-command is amazing:)&quot; } ] }
+    { &quot;message&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; like motorola the speed is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand motorola its speed is terrible:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand motorola its speed is terrible:(&quot; } ] }
+    { &quot;message&quot;: &quot; like iphone the voice-clarity is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like iphone the voice-clarity is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the platform is good&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the platform is good&quot; } ] }
+    { &quot;message&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; love verizon its voicemail-service is awesome&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love verizon its voicemail-service is awesome&quot; } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_5_-_Fuzzy_Join"></a>Query 5 - Fuzzy Join</h3>
+<p>As another example of a non-equijoin use case, we could ask AsterixDB to find, for each Facebook user, all Twitter users with names &#x201c;similar&#x201d; to their name. AsterixDB supports a variety of &#x201c;fuzzy match&#x201d; functions for use with textual and set-based data. As one example, we could choose to use edit distance with a threshold of 3 as the definition of name similarity, in which case we could write the following query using AQL&#x2019;s operator-based syntax (~=) for testing whether or not two values are similar:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+
+    for $fbu in dataset FacebookUsers
+    return {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: for $t in dataset TweetMessages
+                let $tu := $t.user
+                where $tu.name ~= $fbu.name
+                return {
+                &quot;twitter-screenname&quot;: $tu.screen-name,
+                &quot;twitter-name&quot;: $tu.name
+                }
+    };
+</pre></div></div>
+<p>The expected result for this query against our sample data is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 2, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 3, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 4, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 5, &quot;name&quot;: &quot;VonKemble&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 6, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 7, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 8, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;similar-users&quot;: [ { &quot;twitter-screenname&quot;: &quot;NilaMilliron_tw&quot;, &quot;twitter-name&quot;: &quot;Nila Milliron&quot; } ] }
+    { &quot;id&quot;: 9, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 10, &quot;name&quot;: &quot;BramHatch&quot;, &quot;similar-users&quot;: [  ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_6_-_Existential_Quantification"></a>Query 6 - Existential Quantification</h3>
+<p>The expressive power of AQL includes support for queries involving &#x201c;some&#x201d; (existentially quantified) and &#x201c;all&#x201d; (universally quantified) query semantics. As an example of an existential AQL query, here we show a query to list the Facebook users who are currently employed. Such employees will have an employment history containing a record with a null end-date value, which leads us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $fbu in dataset FacebookUsers
+    where (some $e in $fbu.employment satisfies is-null($e.end-date))
+    return $fbu;
+</pre></div></div>
+<p>The expected result in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;alias&quot;: &quot;Margarita&quot;, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2, 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Codetechno&quot;, &quot;start-date&quot;: date(&quot;2006-08-06&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 5, &quot;alias&quot;: &quot;Von&quot;, &quot;name&quot;: &quot;VonKemble&quot;, &quot;user-since&quot;: datetime(&quot;2010-01-05T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Kongreen&quot;, &quot;start-date&quot;: date(&quot;2010-11-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 6, &quot;alias&quot;: &quot;Willis&quot;, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;user-since&quot;: datetime(&quot;2005-01-17T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 3, 7 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;jaydax&quot;, &quot;start-date&quot;: date(&quot;2009-05-15&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_7_-_Universal_Quantification"></a>Query 7 - Universal Quantification</h3>
+<p>As an example of a universal AQL query, here we show a query to list the Facebook users who are currently unemployed. Such employees will have an employment history containing no records with null end-date values, leading us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $fbu in dataset FacebookUsers
+    where (every $e in $fbu.employment satisfies not(is-null($e.end-date)))
+    return $fbu;
+</pre></div></div>
+<p>Here is the expected result for our sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 9, &quot;alias&quot;: &quot;Woodrow&quot;, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;user-since&quot;: datetime(&quot;2005-09-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zuncan&quot;, &quot;start-date&quot;: date(&quot;2003-04-22&quot;), &quot;end-date&quot;: date(&quot;2009-12-13&quot;) } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_8_-_Simple_Aggregation"></a>Query 8 - Simple Aggregation</h3>
+<p>Like SQL, the AQL language of AsterixDB provides support for computing aggregates over large amounts of data. As a very simple example, the following AQL query computes the total number of Facebook users:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    count(for $fbu in dataset FacebookUsers return $fbu);
+</pre></div></div>
+<p>In AQL, aggregate functions can be applied to arbitrary subquery results; in this case, the count function is applied to the result of a query that enumerates the Facebook users. The expected result here is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    10
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-A_-_Grouping_and_Aggregation"></a>Query 9-A - Grouping and Aggregation</h3>
+<p>Also like SQL, AQL supports grouped aggregation. For every Twitter user, the following group-by/aggregate query counts the number of tweets sent by that user:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name with $t
+    return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>The <i>for</i> clause incrementally binds $t to tweets, and the <i>group by</i> clause groups the tweets by its issuer&#x2019;s Twitter screen-name. Unlike SQL, where data is tabular&#x2014;flat&#x2014;the data model underlying AQL allows for nesting. Thus, following the <i>group by</i> clause, the <i>return</i> clause in this query sees a sequence of $t groups, with each such group having an associated $uid variable value (i.e., the tweeting user&#x2019;s screen name). In the context of the return clause, due to &#x201c;&#x2026; with $t &#x2026;&#x201d;, $uid is bound to the tweeter&#x2019;s id and $t is bound to the <i>set</i> of tweets issued by that tweeter. The return clause constructs a result record containing the tweeter&#x2019;s user id and the count of the items in the associated tweet set. The query result will contain one such record per screen name. This query also illustrates another feature of AQL; notice that each user&#x2019;s screen name is accessed via a path s
 yntax that traverses each tweet&#x2019;s nested record structure.</p>
+<p>Here is the expected result for this query over the sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-B_-_Hash-Based_Grouping_and_Aggregation"></a>Query 9-B - (Hash-Based) Grouping and Aggregation</h3>
+<p>As for joins, AsterixDB has multiple evaluation strategies available for processing grouped aggregate queries. For grouped aggregation, the system knows how to employ both sort-based and hash-based aggregation methods, with sort-based methods being used by default and a hint being available to suggest that a different approach be used in processing a particular AQL query.</p>
+<p>The following query is similar to Query 9-A, but adds a hash-based aggregation hint:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    /*+ hash*/
+    group by $uid := $t.user.screen-name with $t
+    return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>Here is the expected result:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_10_-_Grouping_and_Limits"></a>Query 10 - Grouping and Limits</h3>
+<p>In some use cases it is not necessary to compute the entire answer to a query. In some cases, just having the first <i>N</i> or top <i>N</i> results is sufficient. This is expressible in AQL using the <i>limit</i> clause combined with the <i>order by</i> clause.</p>
+<p>The following AQL query returns the top 3 Twitter users based on who has issued the most tweets:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name with $t
+    let $c := count($t)
+    order by $c desc
+    limit 3
+    return {
+        &quot;user&quot;: $uid,
+        &quot;count&quot;: $c
+    };
+</pre></div></div>
+<p>The expected result for this query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_11_-_Left_Outer_Fuzzy_Join"></a>Query 11 - Left Outer Fuzzy Join</h3>
+<p>As a last example of AQL and its query power, the following query, for each tweet, finds all of the tweets that are similar based on the topics that they refer to:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.3&quot;;
+
+    for $t in dataset TweetMessages
+    return {
+        &quot;tweet&quot;: $t,
+        &quot;similar-tweets&quot;: for $t2 in dataset TweetMessages
+                where  $t2.referred-topics ~= $t.referred-topics
+                and $t2.tweetid != $t.tweetid
+                return $t2.referred-topics
+    };
+</pre></div></div>
+<p>This query illustrates several things worth knowing in order to write fuzzy queries in AQL. First, as mentioned earlier, AQL offers an operator-based syntax for seeing whether two values are &#x201c;similar&#x201d; to one another or not. Second, recall that the referred-topics field of records of datatype TweetMessageType is a bag of strings. This query sets the context for its similarity join by requesting that Jaccard-based similarity semantics (<a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">http://en.wikipedia.org/wiki/Jaccard_index</a>) be used for the query&#x2019;s similarity operator and that a similarity index of 0.3 be used as its similarity threshold.</p>
+<p>The expected result for this fuzzy join query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;1&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;47.44,80.65&quot;), &quot;send-time&quot;: datetime(&quot;2008-04-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, &quot;message-text&quot;: &quot; love t-mobile its customization is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;10&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;29.15,76.53&quot;), &quot;send-time&quot;: datetime(&quot;2008-01-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;11&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NilaMilliron_tw&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Nila Milliron&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;37.59,68.42&quot;), &quot;send-time&quot;: datetime(&quot;2008-03-09T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; can't stand iphone its platform is terrible&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;samsung&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;12&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;OliJackson_512&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Oli Jackson&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;24.82,94.63&quot;), &quot;send-time&quot;: datetime(&quot;2010-02-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like samsung the voice-command is amazing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;platform&quot; }}, {{ &quot;sprint&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;2&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;32.84,67.14&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;3&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;29.72,75.8&quot;), &quot;send-time&quot;: datetime(&quot;2006-11-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; like motorola the speed is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;39.28,70.48&quot;), &quot;send-time&quot;: datetime(&quot;2011-12-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;sprint&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;5&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;40.09,92.69&quot;), &quot;send-time&quot;: datetime(&quot;2006-08-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; can't stand motorola its speed is terrible:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;6&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;47.51,83.99&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-07T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; like iphone the voice-clarity is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;iphone&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 182, &quot;statuses_count&quot;: 394, &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: 32136 }, &quot;sender-location&quot;: point(&quot;36.21,72.6&quot;), &quot;send-time&quot;: datetime(&quot;2011-08-25T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;platform&quot; }}, {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;8&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;46.05,93.34&quot;), &quot;send-time&quot;: datetime(&quot;2005-10-14T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;36.86,74.62&quot;), &quot;send-time&quot;: datetime(&quot;2012-07-21T10:10:00.000Z&quot

<TRUNCATED>


[28/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/functions.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/functions.html b/content/docs/0.8.8-incubating/aql/functions.html
new file mode 100644
index 0000000..5e74ac3
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/functions.html
@@ -0,0 +1,5111 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Asterix: Using Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Functions</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Asterix: Using Functions</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#NumericFunctions">Numeric Functions</a></li>
+  
+<li><a href="#StringFunctions">String Functions</a></li>
+  
+<li><a href="#AggregateFunctions">Aggregate Functions</a></li>
+  
+<li><a href="#SpatialFunctions">Spatial Functions</a></li>
+  
+<li><a href="#SimilarityFunctions">Similarity Functions</a></li>
+  
+<li><a href="#TokenizingFunctions">Tokenizing Functions</a></li>
+  
+<li><a href="#TemporalFunctions">Temporal Functions</a></li>
+  
+<li><a href="#RecordFunctions">Record Functions</a></li>
+  
+<li><a href="#OtherFunctions">Other Functions</a></li>
+</ul>
+<p>Asterix provides various classes of functions to support operations on numeric, string, spatial, and temporal data. This document explains how to use these functions.</p></div>
+<div class="section">
+<h2><a name="Numeric_Functions_Back_to_TOC"></a><a name="NumericFunctions" id="NumericFunctions">Numeric Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="abs"></a>abs</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>abs(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the absolute value of the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The absolute value of the argument with the same type as the input argument, or <tt>null</tt> if the argument is a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := abs(2013)
+let $v2 := abs(-4036)
+let $v3 := abs(0)
+let $v4 := abs(float(&quot;-2013.5&quot;))
+let $v5 := abs(double(&quot;-2013.593823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: 4036, &quot;v3&quot;: 0, &quot;v4&quot;: 2013.5f, &quot;v5&quot;: 2013.5938237483274d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="ceiling"></a>ceiling</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ceiling(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the smallest (closest to negative infinity) number with no fractional part that is not less than the value of the argument. If the argument is already equal to mathematical integer, then the result is the same as the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The ceiling value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := ceiling(2013)
+let $v2 := ceiling(-4036)
+let $v3 := ceiling(0.3)
+let $v4 := ceiling(float(&quot;-2013.2&quot;))
+let $v5 := ceiling(double(&quot;-2013.893823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 1.0d, &quot;v4&quot;: -2013.0f, &quot;v5&quot;: -2013.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>floor(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the largest (closest to positive infinity) number with no fractional part that is not greater than the value. If the argument is already equal to mathematical integer, then the result is the same as the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The floor value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := floor(2013)
+let $v2 := floor(-4036)
+let $v3 := floor(0.8)
+let $v4 := floor(float(&quot;-2013.2&quot;))
+let $v5 := floor(double(&quot;-2013.893823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 0.0d, &quot;v4&quot;: -2014.0f, &quot;v5&quot;: -2014.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="round"></a>round</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>round(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the number with no fractional part that is closest (and also closest to positive infinity) to the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The rounded value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := round(2013)
+let $v2 := round(-4036)
+let $v3 := round(0.8)
+let $v4 := round(float(&quot;-2013.256&quot;))
+let $v5 := round(double(&quot;-2013.893823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 1.0d, &quot;v4&quot;: -2013.0f, &quot;v5&quot;: -2014.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="round-half-to-even"></a>round-half-to-even</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>round-half-to-even(numeric_expression, [precision])
+</pre></div></div></li>
+  
+<li>
+<p>Computes the closest numeric value to <tt>numeric_expression</tt> that is a multiple of ten to the power of minus <tt>precision</tt>. <tt>precision</tt> is optional and by default value <tt>0</tt> is used.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+    
+<li><tt>precision</tt>: An optional integer field representing the number of digits in the fraction of the the result</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The rounded value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := round-half-to-even(2013)
+let $v2 := round-half-to-even(-4036)
+let $v3 := round-half-to-even(0.8)
+let $v4 := round-half-to-even(float(&quot;-2013.256&quot;))
+let $v5 := round-half-to-even(double(&quot;-2013.893823748327284&quot;))
+let $v6 := round-half-to-even(double(&quot;-2013.893823748327284&quot;), 2)
+let $v7 := round-half-to-even(2013, 4)
+let $v8 := round-half-to-even(float(&quot;-2013.256&quot;), 5)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5, &quot;v6&quot;: $v6, &quot;v7&quot;: $v7, &quot;v8&quot;: $v8 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 1.0d, &quot;v4&quot;: -2013.0f, &quot;v5&quot;: -2014.0d, &quot;v6&quot;: -2013.89d, &quot;v7&quot;: 2013, &quot;v8&quot;: -2013.256f }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="String_Functions_Back_to_TOC"></a><a name="StringFunctions" id="StringFunctions">String Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="string-to-codepoint"></a>string-to-codepoint</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-to-codepoint(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts the string <tt>string_expression</tt> to its code-based representation.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that will be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> of the code points for the string <tt>string_expression</tt>.</li>
+  </ul></li>
+</ul></div>
+<div class="section">
+<h3><a name="codepoint-to-string"></a>codepoint-to-string</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>codepoint-to-string(list_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts the ordered code-based representation <tt>list_expression</tt> to the corresponding string.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression</tt> : An <tt>OrderedList</tt> of code-points.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> representation of <tt>list_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $s := &quot;Hello ASTERIX!&quot;
+let $l := string-to-codepoint($s)
+let $ss := codepoint-to-string($l)
+return {&quot;codes&quot;: $l, &quot;string&quot;: $ss}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;codes&quot;: [ 72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33 ], &quot;string&quot;: &quot;Hello ASTERIX!&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="contains"></a>contains</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>contains(string_expression, substring_to_contain)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> contains the string <tt>substring_to_contain</tt></p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the given substring.</li>
+    
+<li><tt>substring_to_contain</tt> : A target <tt>string</tt> that might be contained.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt> value, <tt>true</tt> if <tt>string_expression</tt> contains <tt>substring_to_contain</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where contains($i.message, &quot;phone&quot;)
+return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;mid&quot;: 2, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+{ &quot;mid&quot;: 13, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+{ &quot;mid&quot;: 15, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="like"></a>like</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>like(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> contains the string pattern <tt>string_pattern</tt>. Compared to the <tt>contains</tt> function, the <tt>like</tt> function also supports regular expressions.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the pattern or <tt>null</tt>.</li>
+    
+<li><tt>string_pattern</tt> : A pattern <tt>string</tt> that might be contained or <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt> value, <tt>true</tt> if <tt>string_expression</tt> contains the pattern <tt>string_pattern</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where like($i.message, &quot;%at&amp;t%&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; can't stand at&amp;t the network is horrible:(&quot;
+&quot; can't stand at&amp;t its plan is terrible&quot;
+&quot; love at&amp;t its 3G is good:)&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="starts-with"></a>starts-with</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>starts-with(string_expression, substring_to_start_with)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> starts with the string <tt>substring_to_start_with</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might start with the given string.</li>
+    
+<li><tt>substring_to_start_with</tt> : A <tt>string</tt> that might be contained as the starting substring.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt>, returns <tt>true</tt> if <tt>string_expression</tt> starts with the string <tt>substring_to_start_with</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where starts-with($i.message, &quot; like&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; like samsung the plan is amazing&quot;
+&quot; like t-mobile its platform is mind-blowing&quot;
+&quot; like verizon the 3G is awesome:)&quot;
+&quot; like iphone the voicemail-service is awesome&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="ends-with"></a>ends-with</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ends-with(string_expression, substring_to_end_with)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> ends with the string <tt>substring_to_end_with</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might end with the given string.</li>
+    
+<li><tt>substring_to_end_with</tt> : A <tt>string</tt> that might be contained as the ending substring.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt>, returns <tt>true</tt> if <tt>string_expression</tt> ends with the string <tt>substring_to_end_with</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where ends-with($i.message, &quot;:)&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; love sprint its shortcut-menu is awesome:)&quot;
+&quot; like verizon the 3G is awesome:)&quot;
+&quot; love at&amp;t its 3G is good:)&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string-concat"></a>string-concat</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-concat(list_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Concatenates a list of strings <tt>list_expression</tt> into a single string.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression</tt> : An <tt>OrderedList</tt> or <tt>UnorderedList</tt> of <tt>string</tt>s (could be <tt>null</tt>) to be concatenated.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns the concatenated <tt>string</tt> value.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $i := &quot;ASTERIX&quot;
+let $j := &quot; &quot;
+let $k := &quot;ROCKS!&quot;
+return string-concat([$i, $j, $k])
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;ASTERIX ROCKS!&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string-join"></a>string-join</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-join(list_expression, string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Joins a list of strings <tt>list_expression</tt> with the given separator <tt>string_expression</tt> into a single string.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression</tt> : An <tt>OrderedList</tt> or <tt>UnorderedList</tt> of strings (could be <tt>null</tt>) to be joined.</li>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> as the separator.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns the joined <tt>String</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := [&quot;ASTERIX&quot;, &quot;ROCKS~&quot;]
+return string-join($i, &quot;!! &quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;ASTERIX!! ROCKS~&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="lowercase"></a>lowercase</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>lowercase(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts a given string <tt>string_expression</tt> to its lowercase form.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> as the lowercase form of the given <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := &quot;ASTERIX&quot;
+return lowercase($i)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>asterix
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="uppercase"></a>uppercase</h3>
+
+<ul>
+  
+<li>Syntax:</li>
+</ul>
+<p>uppercase(string_expression)</p>
+
+<ul>
+  
+<li>Converts a given string <tt>string_expression</tt> to its uppercase form.</li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> as the uppercase form of the given <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := &quot;asterix&quot;
+return uppercase($i)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ASTERIX
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="uppercase"></a>uppercase</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>uppercase(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts a given string <tt>string_expression</tt> to its uppercase form.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> as the uppercase form of the given <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := &quot;asterix&quot;
+return uppercase($i)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ASTERIX
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="matches"></a>matches</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>matches(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the strings <tt>string_expression</tt> matches the given pattern <tt>string_pattern</tt> (A Java regular expression pattern).</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the pattern.</li>
+    
+<li><tt>string_pattern</tt> : A pattern <tt>string</tt> to be matched.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt>, returns <tt>true</tt> if <tt>string_expression</tt> matches the pattern <tt>string_pattern</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where matches($i.message, &quot;dislike iphone&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; dislike iphone its touch-screen is horrible&quot;
+&quot; dislike iphone the voice-command is bad:(&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="replace"></a>replace</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>replace(string_expression, string_pattern, string_replacement[, string_flags])
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> matches the given pattern <tt>string_pattern</tt>, and replace the matched pattern <tt>string_pattern</tt> with the new pattern <tt>string_replacement</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the pattern.</li>
+    
+<li><tt>string_pattern</tt> : A pattern <tt>string</tt> to be matched.</li>
+    
+<li><tt>string_replacement</tt> : A pattern <tt>string</tt> to be used as the replacement.</li>
+    
+<li><tt>string_flag</tt> : (Optional) A <tt>string</tt> with flags to be used during replace.</li>
+    
+<li>The following modes are enabled with these flags: dotall (s), multiline (m), case-insenitive (i), and comments and whitespace (x).</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> that is obtained after the replacements.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where matches($i.message, &quot; like iphone&quot;)
+return replace($i.message, &quot; like iphone&quot;, &quot;like android&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;like android the voicemail-service is awesome&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string-length"></a>string-length</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-length(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the length of the string <tt>string_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> or <tt>null</tt> that represents the string to be checked.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> that represents the length of <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+return {&quot;mid&quot;: $i.message-id, &quot;message-len&quot;: string-length($i.message)}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;mid&quot;: 1, &quot;message-len&quot;: 43 }
+{ &quot;mid&quot;: 2, &quot;message-len&quot;: 44 }
+{ &quot;mid&quot;: 3, &quot;message-len&quot;: 33 }
+{ &quot;mid&quot;: 4, &quot;message-len&quot;: 43 }
+{ &quot;mid&quot;: 5, &quot;message-len&quot;: 46 }
+{ &quot;mid&quot;: 6, &quot;message-len&quot;: 43 }
+{ &quot;mid&quot;: 7, &quot;message-len&quot;: 37 }
+{ &quot;mid&quot;: 8, &quot;message-len&quot;: 33 }
+{ &quot;mid&quot;: 9, &quot;message-len&quot;: 34 }
+{ &quot;mid&quot;: 10, &quot;message-len&quot;: 50 }
+{ &quot;mid&quot;: 11, &quot;message-len&quot;: 38 }
+{ &quot;mid&quot;: 12, &quot;message-len&quot;: 52 }
+{ &quot;mid&quot;: 13, &quot;message-len&quot;: 42 }
+{ &quot;mid&quot;: 14, &quot;message-len&quot;: 27 }
+{ &quot;mid&quot;: 15, &quot;message-len&quot;: 45 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substring"></a>substring</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring(string_expression, offset[, length])
+</pre></div></div></li>
+  
+<li>
+<p>Returns the substring from the given string <tt>string_expression</tt> based on the given start offset <tt>offset</tt> with the optional <tt>length</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be extracted.</li>
+    
+<li><tt>offset</tt> : An <tt>int64</tt> as the starting offset of the substring in <tt>string_expression</tt>.</li>
+    
+<li><tt>length</tt> : (Optional) An <tt>int64</tt> as the length of the substring.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> that represents the substring.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where string-length($i.message) &gt; 50
+return substring($i.message, 50)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;G:(&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substring-before"></a>substring-before</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring-before(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the substring from the given string <tt>string_expression</tt> before the given pattern <tt>string_pattern</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be extracted.</li>
+    
+<li><tt>string_pattern</tt> : A <tt>string</tt> pattern to be searched.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> that represents the substring.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where contains($i.message, &quot;iphone&quot;)
+return substring-before($i.message, &quot;iphone&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; dislike &quot;
+&quot; dislike &quot;
+&quot; like &quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substring-after"></a>substring-after</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring-after(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the substring from the given string <tt>string_expression</tt> after the given pattern <tt>string_pattern</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be extracted.</li>
+    
+<li><tt>string_pattern</tt> : A <tt>string</tt> pattern to be searched.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> that represents the substring.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where contains($i.message, &quot;iphone&quot;)
+return substring-after($i.message, &quot;iphone&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; its touch-screen is horrible&quot;
+&quot; the voice-command is bad:(&quot;
+&quot; the voicemail-service is awesome&quot;
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Aggregate_Functions_Back_to_TOC"></a><a name="AggregateFunctions" id="AggregateFunctions">Aggregate Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="count"></a>count</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>count(list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the number of items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be counted, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> value representing the number of items in the given list. <tt>0i64</tt> is returned if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l1 := ['hello', 'world', 1, 2, 3]
+let $l2 := for $i in dataset TwitterUsers return $i
+return {&quot;count1&quot;: count($l1), &quot;count2&quot;: count($l2)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;count1&quot;: 5i64, &quot;count2&quot;: 4i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="avg"></a>avg</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>avg(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the average value of the items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>double</tt> value representing the average of the numbers in the given list. <tt>null</tt> is returned if the input is <tt>null</tt>, or the input list contains <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l := for $i in dataset TwitterUsers return $i.friends_count
+return {&quot;avg_friend_count&quot;: avg($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;avg_friend_count&quot;: 191.5d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sum"></a>sum</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sum(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the sum of the items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The sum of the numbers in the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. <tt>null</tt> is returned if the input is <tt>null</tt>, or the input list contains <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l := for $i in dataset TwitterUsers return $i.friends_count
+return {&quot;sum_friend_count&quot;: sum($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;sum_friend_count&quot;: 766 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="minmax"></a>min/max</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>min(num_list), max(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the min/max value of numeric items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be compared, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The min/max value of the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. <tt>null</tt> is returned if the input is <tt>null</tt>, or the input list contains <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l := for $i in dataset TwitterUsers return $i. friends_count
+return {&quot;min_friend_count&quot;: min($l), &quot;max_friend_count&quot;: max($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;min_friend_count&quot;: 18, &quot;max_friend_count&quot;: 445 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-count"></a>sql-count</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-count(list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the number of non-null items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be counted, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> value representing the number of non-null items in the given list. The value <tt>0i64</tt> is returned if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p></li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>    let $l1 := ['hello', 'world', 1, 2, 3, null]
+    return {&quot;count&quot;: sql-count($l1)}
+</pre></div></div>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;count&quot;: 5i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-avg"></a>sql-avg</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-avg(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the average value of the non-null items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> value representing the average of the non-null numbers in the given list. The <tt>null</tt> value is returned if the input is <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $l := [1.2, 2.3, 3.4, 0, null]
+return {&quot;avg&quot;: sql-avg($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;avg&quot;: 1.725d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-sum"></a>sql-sum</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-sum(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the sum of the non-null items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The sum of the non-null numbers in the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. The value <tt>null</tt> is returned if the input is <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $l := [1.2, 2.3, 3.4, 0, null]
+return {&quot;sum&quot;: sql-sum($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;sum&quot;: 6.9d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-minmax"></a>sql-min/max</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-min(num_list), sql-max(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the min/max value of the non-null numeric items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be compared, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The min/max value of the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. The value <tt>null</tt> is returned if the input is <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $l := [1.2, 2.3, 3.4, 0, null]
+return {&quot;min&quot;: sql-min($l), &quot;max&quot;: sql-max($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;min&quot;: 0.0d, &quot;max&quot;: 3.4d }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Spatial_Functions_Back_to_TOC"></a><a name="SpatialFunctions" id="SpatialFunctions">Spatial Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="create-point"></a>create-point</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-point(x, y)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>point</tt> using an <tt>x</tt> and <tt>y</tt> value.</p></li>
+  
+<li>Arguments:</li>
+  
+<li><tt>x</tt> : A <tt>double</tt> that represents the x-coordinate.</li>
+  
+<li><tt>y</tt> : A <tt>double</tt> that represents the y-coordinate.</li>
+  
+<li>Return Value:</li>
+  
+<li>A <tt>point</tt> representing the ordered pair (<tt>x</tt>, <tt>y</tt>).</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-point(30.0,70.0)
+return {&quot;point&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: point(&quot;30.0,70.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-line"></a>create-line</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-line(point_expression1, point_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>line</tt> using <tt>point_expression1</tt> and <tt>point_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt> that represents the start point of the line.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt> that represents the end point of the line.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A spatial <tt>line</tt> created using the points provided in <tt>point_expression1</tt> and <tt>point_expression2</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-line(create-point(30.0,70.0), create-point(50.0,90.0))
+return {&quot;line&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;line&quot;: line(&quot;30.0,70.0 50.0,90.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-rectangle"></a>create-rectangle</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-rectangle(point_expression1, point_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>rectangle</tt> using <tt>point_expression1</tt> and <tt>point_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt> that represents the lower-left point of the rectangle.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt> that represents the upper-right point of the rectangle.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A spatial <tt>rectangle</tt> created using the points provided in <tt>point_expression1</tt> and <tt>point_expression2</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-rectangle(create-point(30.0,70.0), create-point(50.0,90.0))
+return {&quot;rectangle&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;rectangle&quot;: rectangle(&quot;30.0,70.0 50.0,90.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-circle"></a>create-circle</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-circle(point_expression, radius)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>circle</tt> using <tt>point_expression</tt> and <tt>radius</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression</tt> : A <tt>point</tt> that represents the center of the circle.</li>
+    
+<li><tt>radius</tt> : A <tt>double</tt> that represents the radius of the circle.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A spatial <tt>circle</tt> created using the center point and the radius provided in <tt>point_expression</tt> and <tt>radius</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-circle(create-point(30.0,70.0), 5.0)
+return {&quot;circle&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;circle&quot;: circle(&quot;30.0,70.0 5.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-polygon"></a>create-polygon</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-polygon(list_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>polygon</tt> using the double values provided in the argument <tt>list_expression</tt>. Each two consecutive double values represent a point starting from the first double value in the list. Note that at least six double values should be specified, meaning a total of three points.</p></li>
+  
+<li>Arguments:</li>
+  
+<li><tt>list_expression</tt> : An OrderedList of doubles representing the points of the polygon.</li>
+  
+<li>Return Value:</li>
+  
+<li>A <tt>polygon</tt>, represents a spatial simple polygon created using the points provided in <tt>list_expression</tt>.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-polygon([1.0,1.0,2.0,2.0,3.0,3.0,4.0,4.0])
+return {&quot;polygon&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;polygon&quot;: polygon(&quot;1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="get-xget-y"></a>get-x/get-y</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>get-x(point_expression) or get-y(point_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the x or y coordinates of a point <tt>point_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression</tt> : A <tt>point</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> representing the x or y coordinates of the point <tt>point_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $point := create-point(2.3,5.0)
+return {&quot;x-coordinate&quot;: get-x($point), &quot;y-coordinate&quot;: get-y($point)}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;x-coordinate&quot;: 2.3d, &quot;y-coordinate&quot;: 5.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="get-points"></a>get-points</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>get-points(spatial_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns an ordered list of the points forming the spatial object <tt>spatial_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>spatial_expression</tt> : A <tt>point</tt>, <tt>line</tt>, <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> of the points forming the spatial object <tt>spatial_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $line := create-line(create-point(100.6,99.4), create-point(-72.0,-76.9))
+let $rectangle := create-rectangle(create-point(9.2,49.0), create-point(77.8,111.1))
+let $polygon := create-polygon([1.0,1.0,2.0,2.0,3.0,3.0,4.0,4.0])
+let $line_list := get-points($line)
+let $rectangle_list := get-points($rectangle)
+let $polygon_list := get-points($polygon)
+return {&quot;line-first-point&quot;: $line_list[0], &quot;line-second-point&quot;: $line_list[1], &quot;rectangle-left-bottom-point&quot;: $rectangle_list[0], &quot;rectangle-top-upper-point&quot;: $rectangle_list[1], &quot;polygon-first-point&quot;: $polygon_list[0], &quot;polygon-second-point&quot;: $polygon_list[1], &quot;polygon-third-point&quot;: $polygon_list[2], &quot;polygon-forth-point&quot;: $polygon_list[3]}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;line-first-point&quot;: point(&quot;100.6,99.4&quot;), &quot;line-second-point&quot;: point(&quot;-72.0,-76.9&quot;), &quot;rectangle-left-bottom-point&quot;: point(&quot;9.2,49.0&quot;), &quot;rectangle-top-upper-point&quot;: point(&quot;77.8,111.1&quot;), &quot;polygon-first-point&quot;: point(&quot;1.0,1.0&quot;), &quot;polygon-second-point&quot;: point(&quot;2.0,2.0&quot;), &quot;polygon-third-point&quot;: point(&quot;3.0,3.0&quot;), &quot;polygon-forth-point&quot;: point(&quot;4.0,4.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="get-centerget-radius"></a>get-center/get-radius</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>get-center(circle_expression) or get-radius(circle_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the center and the radius of a circle <tt>circle_expression</tt>, respectively.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>circle_expression</tt> : A <tt>circle</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>point</tt> or <tt>double</tt>, represent the center or radius of the circle <tt>circle_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $circle := create-circle(create-point(6.0,3.0), 1.0)
+return {&quot;circle-radius&quot;: get-radius($circle), &quot;circle-center&quot;: get-center($circle)}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;circle-radius&quot;: 1.0d, &quot;circle-center&quot;: point(&quot;6.0,3.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-distance"></a>spatial-distance</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-distance(point_expression1, point_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the Euclidean distance between <tt>point_expression1</tt> and <tt>point_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt>.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> as the Euclidean distance between <tt>point_expression1</tt> and <tt>point_expression2</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+let $d :=  spatial-distance($t.sender-location, create-point(30.0,70.0))
+return {&quot;point&quot;: $t.sender-location, &quot;distance&quot;: $d}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: point(&quot;47.44,80.65&quot;), &quot;distance&quot;: 20.434678857275934d }
+{ &quot;point&quot;: point(&quot;29.15,76.53&quot;), &quot;distance&quot;: 6.585089217315132d }
+{ &quot;point&quot;: point(&quot;37.59,68.42&quot;), &quot;distance&quot;: 7.752709203884797d }
+{ &quot;point&quot;: point(&quot;24.82,94.63&quot;), &quot;distance&quot;: 25.168816023007512d }
+{ &quot;point&quot;: point(&quot;32.84,67.14&quot;), &quot;distance&quot;: 4.030533463451212d }
+{ &quot;point&quot;: point(&quot;29.72,75.8&quot;), &quot;distance&quot;: 5.806754687430835d }
+{ &quot;point&quot;: point(&quot;39.28,70.48&quot;), &quot;distance&quot;: 9.292405501268227d }
+{ &quot;point&quot;: point(&quot;40.09,92.69&quot;), &quot;distance&quot;: 24.832321679617472d }
+{ &quot;point&quot;: point(&quot;47.51,83.99&quot;), &quot;distance&quot;: 22.41250097601782d }
+{ &quot;point&quot;: point(&quot;36.21,72.6&quot;), &quot;distance&quot;: 6.73231758015024d }
+{ &quot;point&quot;: point(&quot;46.05,93.34&quot;), &quot;distance&quot;: 28.325926286707734d }
+{ &quot;point&quot;: point(&quot;36.86,74.62&quot;), &quot;distance&quot;: 8.270671073135482d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-area"></a>spatial-area</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-area(spatial_2d_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the spatial area of <tt>spatial_2d_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>spatial_2d_expression</tt> : A <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> representing the area of <tt>spatial_2d_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $circleArea := spatial-area(create-circle(create-point(0.0,0.0), 5.0))
+return {&quot;Area&quot;:$circleArea}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;Area&quot;: 78.53981625d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-intersect"></a>spatial-intersect</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-intersect(spatial_expression1, spatial_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether <tt>@arg1</tt> and <tt>@arg2</tt> spatially intersect each other.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>spatial_expression1</tt> : A <tt>point</tt>, <tt>line</tt>, <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+    
+<li><tt>spatial_expression2</tt> : A <tt>point</tt>, <tt>line</tt>, <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt> representing whether <tt>spatial_expression1</tt> and <tt>spatial_expression2</tt> spatially overlap with each other.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+where spatial-intersect($t.sender-location, create-rectangle(create-point(30.0,70.0), create-point(40.0,80.0)))
+return $t
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;39.28,70.48&quot;), &quot;send-time&quot;: datetime(&quot;2011-12-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;sprint&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }
+{ &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 182, &quot;statuses_count&quot;: 394, &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: 32136 }, &quot;sender-location&quot;: point(&quot;36.21,72.6&quot;), &quot;send-time&quot;: datetime(&quot;2011-08-25T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }
+{ &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;36.86,74.62&quot;), &quot;send-time&quot;: datetime(&quot;2012-07-21T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, &quot;message-text&quot;: &quot; love verizon its voicemail-service is awesome&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-cell"></a>spatial-cell</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-cell(point_expression1, point_expression2, x_increment, y_increment)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the grid cell that <tt>point_expression1</tt> belongs to.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt> representing the point of interest that its grid cell will be returned.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt> representing the origin of the grid.</li>
+    
+<li><tt>x_increment</tt> : A <tt>double</tt>, represents X increments.</li>
+    
+<li><tt>y_increment</tt> : A <tt>double</tt>, represents Y increments.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>rectangle</tt> representing the grid cell that <tt>point_expression1</tt> belongs to.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+group by $c :=  spatial-cell($t.sender-location, create-point(20.0,50.0), 5.5, 6.0) with $t
+let $num :=  count($t)
+return { &quot;cell&quot;: $c, &quot;count&quot;: $num}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;cell&quot;: rectangle(&quot;20.0,92.0 25.5,98.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;25.5,74.0 31.0,80.0&quot;), &quot;count&quot;: 2i64 }
+{ &quot;cell&quot;: rectangle(&quot;31.0,62.0 36.5,68.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;31.0,68.0 36.5,74.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;36.5,68.0 42.0,74.0&quot;), &quot;count&quot;: 2i64 }
+{ &quot;cell&quot;: rectangle(&quot;36.5,74.0 42.0,80.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;36.5,92.0 42.0,98.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;42.0,80.0 47.5,86.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;42.0,92.0 47.5,98.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;47.5,80.0 53.0,86.0&quot;), &quot;count&quot;: 1i64 }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Similarity_Functions_Back_to_TOC"></a><a name="SimilarityFunctions" id="SimilarityFunctions">Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports queries with different similarity functions, including <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> and <a class="externalLink" href="https://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a>.</p>
+<div class="section">
+<h3><a name="edit-distance"></a>edit-distance</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>edit-distance(expression1, expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the edit distance of <tt>expression1</tt> and <tt>expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>expression1</tt> : A <tt>string</tt> or a homogeneous <tt>OrderedList</tt> of a comparable item type.</li>
+    
+<li><tt>expression2</tt> : The same type as <tt>expression1</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> that represents the edit distance between <tt>expression1</tt> and <tt>expression2</tt>.</li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+where $ed &lt;= 2
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ]
+}
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="edit-distance-check"></a>edit-distance-check</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>edit-distance-check(expression1, expression2, threshold)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether <tt>expression1</tt> and <tt>expression2</tt> have an <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> within a given threshold. The &#x201c;check&#x201d; version of edit distance is faster than the &#x201c;non-check&#x201d; version because the former can detect whether two items satisfy a given threshold using early-termination techniques, as opposed to computing their real distance. Although possible, it is not necessary for the user to write queries using the &#x201c;check&#x201d; versions explicitly, since a rewrite rule can perform an appropriate transformation from a &#x201c;non-check&#x201d; version to a &#x201c;check&#x201d; version.</p></li>
+  
+<li>
+<p>Arguments:</p>
+  
+<ul>
+    
+<li><tt>expression1</tt> : A <tt>string</tt> or a homogeneous <tt>OrderedList</tt> of a comparable item type.</li>
+    
+<li><tt>expression2</tt> : The same type as <tt>expression1</tt>.</li>
+    
+<li><tt>threshold</tt> : An <tt>int64</tt> that represents the distance threshold.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> with two items:
+    
+<ul>
+      
+<li>The first item contains a <tt>boolean</tt> value representing whether <tt>expression1</tt> and <tt>expression2</tt> are similar.</li>
+      
+<li>The second item contains an <tt>int64</tt> that represents the edit distance of <tt>expression1</tt> and <tt>expression2</tt> if it is within the threshold, or 0 otherwise.</li>
+    </ul></li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
+where $ed[0]
+return $ed[1]
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>2
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="edit-distance-contains"></a>edit-distance-contains</h3>
+
+<ul>
+  
+<li>Syntax:</li>
+</ul>
+<p>edit-distance-contains(expression1, expression2, threshold)</p>
+
+<ul>
+  
+<li>
+<p>Checks whether <tt>expression1</tt> contains <tt>expression2</tt> with an <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> within a given threshold.</p></li>
+  
+<li>
+<p>Arguments:</p>
+  
+<ul>
+    
+<li><tt>expression1</tt> : A <tt>string</tt> or a homogeneous <tt>OrderedList</tt> of a comparable item type.</li>
+    
+<li><tt>expression2</tt> : The same type as <tt>expression1</tt>.</li>
+    
+<li><tt>threshold</tt> : An <tt>int32</tt> that represents the distance threshold.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> with two items:
+    
+<ul>
+      
+<li>The first item contains a <tt>boolean</tt> value representing whether <tt>expression1</tt> can contain <tt>expression2</tt>.</li>
+      
+<li>The second item contains an <tt>int32</tt> that represents the required edit distance for <tt>expression1</tt> to contain <tt>expression2</tt> if the first item is true.</li>
+    </ul></li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $i := edit-distance-contains(&quot;happy&quot;,&quot;hapr&quot;,2)
+return $i;
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ true, 1 ]
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="similarity-jaccard"></a>similarity-jaccard</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>similarity-jaccard(list_expression1, list_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard similarity</a> of <tt>list_expression1</tt> and <tt>list_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression1</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+    
+<li><tt>list_expression2</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>float</tt> that represents the Jaccard similarity of <tt>list_expression1</tt> and <tt>list_expression2</tt>.</li>
+  </ul></li>
+  
+<li>Note: A <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">keyword index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+where $sim &gt;= 0.6f
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ]
+}
+{
+&quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ]
+}
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="similarity-jaccard-check"></a>similarity-jaccard-check</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>similarity-jaccard-check(list_expression1, list_expression2, threshold)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether <tt>list_expression1</tt> and <tt>list_expression2</tt> have a <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard similarity</a> greater than or equal to threshold. Again, the &#x201c;check&#x201d; version of Jaccard is faster than the &#x201c;non-check&#x201d; version.</p></li>
+  
+<li>
+<p>Arguments:</p>
+  
+<ul>
+    
+<li><tt>list_expression1</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+    
+<li><tt>list_expression2</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+    
+<li><tt>threshold</tt> : A <tt>float</tt> that represents the similarity threshold.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> with two items:</li>
+    
+<li>The first item contains a <tt>boolean</tt> value representing whether <tt>list_expression1</tt> and <tt>list_expression2</tt> are similar.</li>
+    
+<li>The second item contains a <tt>float</tt> that represents the Jaccard similarity of <tt>list_expression1</tt> and <tt>list_expression2</tt> if it is greater than or equal to the threshold, or 0 otherwise.</li>
+  </ul></li>
+  
+<li>Note: A <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">keyword index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
+where $sim[0]
+return $sim[1]
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>0.75f
+1.0f
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Similarity_Operator_"></a>Similarity Operator ~=</h3>
+
+<ul>
+  
+<li>&#x201c;<tt>~=</tt>&#x201d; is syntactic sugar for expressing a similarity condition with a given similarity threshold.</li>
+  
+<li>The similarity function and threshold for &#x201c;<tt>~=</tt>&#x201d; are controlled via &#x201c;set&#x201d; directives.</li>
+  
+<li>The &#x201c;<tt>~=</tt>&#x201d; operator returns a <tt>boolean</tt> value that represents whether the operands are similar.</li>
+  
+<li>
+<p>Example for Jaccard similarity:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+set simfunction &quot;jaccard&quot;;
+set simthreshold &quot;0.6f&quot;;
+
+for $user in dataset('FacebookUsers')
+where $user.friend-ids ~= [1,5,9,10]
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ]
+}
+{
+&quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ]
+}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example for edit-distance similarity:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+set simfunction &quot;edit-distance&quot;;
+set simthreshold &quot;2&quot;;
+
+for $user in dataset('FacebookUsers')
+where $user.name ~= &quot;Suzanna Tilson&quot;
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected output is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ]
+}
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Tokenizing_Functions_Back_to_TOC"></a><a name="TokenizingFunctions" id="TokenizingFunctions">Tokenizing Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="word-tokens"></a>word-tokens</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>word-tokens(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns a list of word tokens of <tt>string_expression</tt> using non-alphanumeric characters as delimiters.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that will be tokenized.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> of <tt>string</tt> word tokens.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+let $tokens := word-tokens($t.message-text)
+where $t.send-time &gt;= datetime('2012-01-01T00:00:00')
+return {
+&quot;tweetid&quot;: $t.tweetid,
+&quot;word-tokens&quot;: $tokens
+}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;tweetid&quot;: &quot;9&quot;, &quot;word-tokens&quot;: [ &quot;love&quot;, &quot;verizon&quot;, &quot;its&quot;, &quot;voicemail&quot;, &quot;service&quot;, &quot;is&quot;, &quot;awesome&quot; ] }
+</pre></div></div></li>
+</ul>
+<!-- ### hashed-word-tokens ###
+ * Syntax:
+
+        hashed-word-tokens(string_expression)
+
+ * Returns a list of hashed word tokens of `string_expression`.
+ * Arguments:
+    * `string_expression` : A `string` that will be tokenized.
+ * Return Value:
+   * An `OrderedList` of `int32` hashed tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := hashed-word-tokens($t.message-text)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "hashed-word-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        { "tweetid": "9", "hashed-word-tokens": [ -1217719622, -447857469, -1884722688, -325178649, 210976949, 285049676, 1916743959 ] }
+
+
+### counthashed-word-tokens ###
+ * Syntax:
+
+        counthashed-word-tokens(string_expression)
+
+ * Returns a list of hashed word tokens of `string_expression`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+ * Return Value:
+    * An `OrderedList` of `Int32` hashed tokens.
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := counthashed-word-tokens($t.message-text)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "counthashed-word-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        { "tweetid": "9", "counthashed-word-tokens": [ -1217719622, -447857469, -1884722688, -325178649, 210976949, 285049676, 1916743959 ] }
+
+
+### gram-tokens ###
+ * Syntax:
+
+        gram-tokens(string_expression, gram_length, boolean_expression)
+
+ * Returns a list of gram tokens of `string_expression`, which can be obtained by scanning the characters using a sliding window of a fixed length.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+    * `gram_length` : An `Int32` as the length of grams.
+   * `boolean_expression` : A `Boolean` value to indicate whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+ * Return Value:
+    * An `OrderedList` of String gram tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := gram-tokens($t.message-text, 3, true)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "gram-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        {
+        "tweetid": "9",
+        "gram-tokens": [ "## ", "# l", " lo", "lov", "ove", "ve ", "e v", " ve", "ver", "eri", "riz", "izo", "zon", "on ", "n i", " it", "its", "ts ", "s v", " vo", "voi", "oic", "ice",
+        "cem", "ema", "mai", "ail", "il-", "l-s", "-se", "ser", "erv", "rvi", "vic", "ice", "ce ", "e i", " is", "is ", "s a", " aw", "awe", "wes", "eso", "som", "ome", "me$", "e$$" ]
+        }
+
+
+### hashed-gram-tokens ###
+ * Syntax:
+
+        hashed-gram-tokens(string_expression, gram_length, boolean_expression)
+
+ * Returns a list of hashed gram tokens of `string_expression`.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+    * `gram_length` : An `Int32` as the length of grams.
+    * `boolean_expression` : A `Boolean` to indicate whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+ * Return Value:
+    * An `OrderedList` of `Int32` hashed gram tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := hashed-gram-tokens($t.message-text, 3, true)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "hashed-gram-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        {
+        "tweetid": "9",
+        "hashed-gram-tokens": [ 40557178, -2002241593, 161665899, -856104603, -500544946, 693410611, 395674299, -1015235909, 1115608337, 1187999872, -31006095, -219180466, -1676061637,
+        1040194153, -1339307841, -1527110163, -1884722688, -179148713, -431014627, -1789789823, -1209719926, 684519765, -486734513, 1734740619, -1971673751, -932421915, -2064668066,
+        -937135958, -790946468, -69070309, 1561601454, 26169001, -160734571, 1330043462, -486734513, -18796768, -470303314, 113421364, 1615760212, 1688217556, 1223719184, 536568131,
+        1682609873, 2935161, -414769471, -1027490137, 1602276102, 1050490461 ]
+        }
+
+
+### counthashed-gram-tokens ###
+ * Syntax:
+
+        counthashed-gram-tokens(string_expression, gram_length, boolean_expression)
+
+ * Returns a list of hashed gram tokens of `string_expression`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+    * `gram_length` : An `Int32`, length of grams to generate.
+    * `boolean_expression` : A `Boolean`, whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+ * Return Value:
+    * An `OrderedList` of `Int32` hashed gram tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := counthashed-gram-tokens($t.message-text, 3, true)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "counthashed-gram-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        {
+        "tweetid": "9",
+        "counthashed-gram-tokens": [ 40557178, -2002241593, 161665899, -856104603, -500544946, 693410611, 395674299, -1015235909, 1115608337, 1187999872, -31006095, -219180466, -1676061637,
+        1040194153, -1339307841, -1527110163, -1884722688, -179148713, -431014627, -1789789823, -1209719926, 684519765, -486734513, 1734740619, -1971673751, -932421915, -2064668066, -937135958,
+        -790946468, -69070309, 1561601454, 26169

<TRUNCATED>


[06/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/css/print.css
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/css/print.css b/docs/0.8.8-incubating/css/print.css
new file mode 100644
index 0000000..1cd02d9
--- /dev/null
+++ b/docs/0.8.8-incubating/css/print.css
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Id: print.css 1201871 2011-11-14 20:18:24Z simonetripodi $ */
+
+#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {display: none !important;}
+#bodyColumn, body.docs div.docs {margin: 0 !important;border: none !important}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/css/site.css
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/css/site.css b/docs/0.8.8-incubating/css/site.css
new file mode 100644
index 0000000..055e7e2
--- /dev/null
+++ b/docs/0.8.8-incubating/css/site.css
@@ -0,0 +1 @@
+/* You can override this file with your own styles */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/csv.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/csv.html b/docs/0.8.8-incubating/csv.html
new file mode 100644
index 0000000..fb2bdb8
--- /dev/null
+++ b/docs/0.8.8-incubating/csv.html
@@ -0,0 +1,416 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; CSV Support in AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>CSV Support in AsterixDB</h1>
+<div class="section">
+<h2><a name="Introduction_-_Defining_a_datatype_for_CSV"></a>Introduction - Defining a datatype for CSV</h2>
+<p>AsterixDB supports the CSV format for both data input and query result output. In both cases, the structure of the CSV data must be defined using a named ADM record datatype. The CSV format, limitations, and MIME type are defined by <a class="externalLink" href="https://tools.ietf.org/html/rfc4180">RFC 4180</a>.</p>
+<p>CSV is not as expressive as the full Asterix Data Model, meaning that not all data which can be represented in ADM can also be represented as CSV. So the form of this datatype is limited. First, obviously it may not contain any nested records or lists, as CSV has no way to represent nested data structures. All fields in the record type must be primitive. Second, the set of supported primitive types is limited to numerics (<tt>int8</tt>, <tt>int16</tt>, <tt>int32</tt>, <tt>int64</tt>, <tt>float</tt>, <tt>double</tt>) and <tt>string</tt>. On output, a few additional primitive types (<tt>boolean</tt>, datetime types) are supported and will be represented as strings.</p>
+<p>For the purposes of this document, we will use the following dataverse and datatype definitions:</p>
+
+<div class="source">
+<div class="source">
+<pre>drop dataverse csv if exists;
+create dataverse csv;
+use dataverse csv;
+
+create type &quot;csv_type&quot; as closed {
+    &quot;id&quot;: int32,
+    &quot;money&quot;: float,
+    &quot;name&quot;: string
+};
+
+create dataset &quot;csv_set&quot; (&quot;csv_type&quot;) primary key &quot;id&quot;;
+</pre></div></div>
+<p>Note: There is no explicit restriction against using an open datatype for CSV purposes, and you may have optional fields in the datatype (eg., <tt>id: int32?</tt>). However, the CSV format itself is rigid, so using either of these datatype features introduces possible failure modes on output which will be discussed below.</p></div>
+<div class="section">
+<h2><a name="CSV_Input"></a>CSV Input</h2>
+<p>CSV data may be loaded into a dataset using the normal &#x201c;load dataset&#x201d; mechanisms, utilizing the builtin &#x201c;delimited-text&#x201d; format. See <a href="aql/externaldata.html">Accessing External Data</a> for more details. Note that comma is the default value for the &#x201c;delimiter&#x201d; parameter, so it does not need to be explicitly specified.</p>
+<p>In this case, the datatype used to interpret the CSV data is the datatype associated with the dataset being loaded. So, to load a file that we have stored locally on the NC into our example dataset:</p>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse csv;
+
+load dataset &quot;csv_set&quot; using localfs
+((&quot;path&quot;=&quot;127.0.0.1:///tmp/my_sample.csv&quot;),
+ (&quot;format&quot;=&quot;delimited-text&quot;));
+</pre></div></div>
+<p>So, if the file <tt>/tmp/my_sample.csv</tt> contained</p>
+
+<div class="source">
+<div class="source">
+<pre>1,18.50,&quot;Peter Krabnitz&quot;
+2,74.50,&quot;Jesse Stevens&quot;
+</pre></div></div>
+<p>then the preceding query would load it into the dataset <tt>csv_set</tt>.</p>
+<p>If your CSV file has a header (that is, the first line contains a set of field names, rather than actual data), you can instruct Asterix to ignore this header by adding the parameter <tt>&quot;header&quot;=&quot;true&quot;</tt>, eg.</p>
+
+<div class="source">
+<div class="source">
+<pre>load dataset &quot;csv_set&quot; using localfs
+((&quot;path&quot;=&quot;127.0.0.1:///tmp/my_header_sample.csv&quot;),
+ (&quot;format&quot;=&quot;delimited-text&quot;),
+ (&quot;header&quot;=&quot;true&quot;));
+</pre></div></div>
+<p>CSV data may also be loaded from HDFS; see <a href="aql/externaldata.html">Accessing External Data</a> for details. However please note that CSV files on HDFS cannot have headers. Attempting to specify &#x201c;header&#x201d;=&#x201c;true&#x201d; when reading from HDFS could result in non-header lines of data being skipped as well.</p></div>
+<div class="section">
+<h2><a name="CSV_Output"></a>CSV Output</h2>
+<p>Any query may be rendered as CSV when using AsterixDB&#x2019;s HTTP interface. To do so, there are two steps required: specify the record type which defines the schema of your CSV, and request that Asterix use the CSV output format.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Output_Record_Type"></a>Output Record Type</h4>
+<p>Background: The result of any AQL query is an unordered list of <i>instances</i>, where each <i>instance</i> is an instance of an AQL datatype. When requesting CSV output, there are some restrictions on the legal datatypes in this unordered list due to the limited expressability of CSV:</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>Each instance must be of a record type.</li>
+  
+<li>Each instance must be of the <i>same</i> record type.</li>
+  
+<li>The record type must conform to the content and type restrictions mentioned in the introduction.</li>
+</ol>
+<p>While it would be possible to structure your query to cast all result instances to a given type, it is not necessary. AQL offers a built-in feature which will automatically cast all top-level instances in the result to a specified named ADM record type. To enable this feature, use a <tt>set</tt> statement prior to the query to set the parameter <tt>output-record-type</tt> to the name of an ADM type. This type must have already been defined in the current dataverse.</p>
+<p>For example, the following request will ensure that all result instances are cast to the <tt>csv_type</tt> type declared earlier:</p>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse csv;
+set output-record-type &quot;csv_type&quot;;
+
+for $n in dataset &quot;csv_set&quot; return $n;
+</pre></div></div>
+<p>In this case the casting is redundant since by definition every value in <tt>csv_set</tt> is already of type <tt>csv_type</tt>. But consider a more complex query where the result values are created by joining fields from different underlying datasets, etc.</p>
+<p>Two notes about <tt>output-record-type</tt>:</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>This feature is not strictly related to CSV; it may be used with any output formats (in which case, any record datatype may be specified, not subject to the limitations specified in the introduction of this page).</li>
+  
+<li>When the CSV output format is requested, <tt>output-record-type</tt> is in fact required, not optional. This is because the type is used to determine the field names for the CSV header and to ensure that the ordering of fields in the output is consistent (which is obviously vital for the CSV to make any sense).</li>
+</ol></div>
+<div class="section">
+<h4><a name="Request_the_CSV_Output_Format"></a>Request the CSV Output Format</h4>
+<p>When sending requests to the Asterix HTTP API, Asterix decides what format to use for rendering the results in one of two ways:</p>
+
+<ul>
+  
+<li>
+<p>A HTTP query parameter named &#x201c;output&#x201d;, which must be set to one of  the following values: <tt>JSON</tt>, <tt>CSV</tt>, or <tt>ADM</tt>.</p></li>
+  
+<li>
+<p>Based on the <a class="externalLink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1"><tt>Accept</tt> HTTP header</a></p></li>
+</ul>
+<p>By default, Asterix will produce JSON output. To select CSV output, pass the parameter <tt>output=CSV</tt>, or set the <tt>Accept</tt> header on your request to the MIME type <tt>text/csv</tt>. The details of how to accomplish this will of course depend on what tools you are using to contact the HTTP API. Here is an example from a Unix shell prompt using the command-line utility &#x201c;curl&#x201d; and specifying the &quot;output query parameter:</p>
+
+<div class="source">
+<div class="source">
+<pre>curl -G &quot;http://localhost:19002/query&quot; \
+    --data-urlencode 'output=CSV' \
+    --data-urlencode 'query=use dataverse csv;
+          set output-record-type &quot;csv_type&quot;;
+          for $n in dataset csv_set return $n;'
+</pre></div></div>
+<p>Alternately, the same query using the <tt>Accept</tt> header:</p>
+
+<div class="source">
+<div class="source">
+<pre>curl -G -H &quot;Accept: text/csv&quot; &quot;http://localhost:19002/query&quot; \
+    --data-urlencode 'query=use dataverse csv;
+          set output-record-type &quot;csv_type&quot;;
+          for $n in dataset csv_set return $n;'
+</pre></div></div>
+<p>Similarly, a trivial Java program to execute the above sample query and selecting CSV output via the <tt>Accept</tt> header would be:</p>
+
+<div class="source">
+<div class="source">
+<pre>import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class AsterixExample {
+    public static void main(String[] args) throws Exception {
+        String query = &quot;use dataverse csv; &quot; +
+            &quot;set output-record-type \&quot;csv_type\&quot;;&quot; +
+            &quot;for $n in dataset csv_set return $n&quot;;
+        URL asterix = new URL(&quot;http://localhost:19002/query?query=&quot; +
+                              URLEncoder.encode(query, &quot;UTF-8&quot;));
+        HttpURLConnection conn = (HttpURLConnection) asterix.openConnection();
+        conn.setRequestProperty(&quot;Accept&quot;, &quot;text/csv&quot;);
+        BufferedReader result = new BufferedReader
+            (new InputStreamReader(conn.getInputStream()));
+        String line;
+        while ((line = result.readLine()) != null) {
+            System.out.println(line);
+        }
+        result.close();
+    }
+}
+</pre></div></div>
+<p>For either of the above examples, the output would be:</p>
+
+<div class="source">
+<div class="source">
+<pre>1,18.5,&quot;Peter Krabnitz&quot;
+2,74.5,&quot;Jesse Stevens&quot;
+</pre></div></div>
+<p>assuming you had already run the previous examples to create the dataverse and populate the dataset.</p></div>
+<div class="section">
+<h4><a name="Outputting_CSV_with_a_Header"></a>Outputting CSV with a Header</h4>
+<p>By default, AsterixDB will produce CSV results with no header line. If you want a header, you may explicitly request it in one of two ways:</p>
+
+<ul>
+  
+<li>
+<p>By passing the HTTP query parameter &#x201c;header&#x201d; with the value &#x201c;present&#x201d;</p></li>
+  
+<li>
+<p>By specifying the MIME type {{text/csv; header=present}} in your HTTP Accept: header. This is consistent with RFC 4180.</p></li>
+</ul></div>
+<div class="section">
+<h4><a name="Issues_with_open_datatypes_and_optional_fields"></a>Issues with open datatypes and optional fields</h4>
+<p>As mentioned earlier, CSV is a rigid format. It cannot express records with different numbers of fields, which ADM allows through both open datatypes and optional fields.</p>
+<p>If your output record type contains optional fields, this will not result in any errors. If the output data of a query does not contain values for an optional field, this will be represented in CSV as <tt>null</tt>.</p>
+<p>If your output record type is open, this will also not result in any errors. If the output data of a query contains any open fields, the corresponding rows in the resulting CSV will contain more comma-separated values than the others. On each such row, the data from the closed fields in the type will be output first in the normal order, followed by the data from the open fields in an arbitrary order.</p>
+<p>According to RFC 4180 this is not strictly valid CSV (Section 2, rule 4, &#x201c;Each line <i>should</i> contain the same number of fields throughout the file&#x201d;). Hence it will likely not be handled consistently by all CSV processors. Some may throw a parsing error. If you attempt to load this data into AsterixDB later using <tt>load dataset</tt>, the extra fields will be silently ignored. For this reason it is recommended that you use only closed datatypes as output record types. AsterixDB allows to use an open record type only to support cases where the type already exists for other parts of your application.</p></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/data/fbm.adm
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/data/fbm.adm b/docs/0.8.8-incubating/data/fbm.adm
new file mode 100644
index 0000000..58d7f08
--- /dev/null
+++ b/docs/0.8.8-incubating/data/fbm.adm
@@ -0,0 +1,15 @@
+{"message-id":1,"author-id":3,"in-response-to":2,"sender-location":point("47.16,77.75"),"message":" love sprint its shortcut-menu is awesome:)"}
+{"message-id":2,"author-id":1,"in-response-to":4,"sender-location":point("41.66,80.87"),"message":" dislike iphone its touch-screen is horrible"}
+{"message-id":3,"author-id":2,"in-response-to":4,"sender-location":point("48.09,81.01"),"message":" like samsung the plan is amazing"}
+{"message-id":4,"author-id":1,"in-response-to":2,"sender-location":point("37.73,97.04"),"message":" can't stand at&t the network is horrible:("}
+{"message-id":5,"author-id":6,"in-response-to":2,"sender-location":point("34.7,90.76"),"message":" love sprint the customization is mind-blowing"}
+{"message-id":6,"author-id":2,"in-response-to":1,"sender-location":point("31.5,75.56"),"message":" like t-mobile its platform is mind-blowing"}
+{"message-id":7,"author-id":5,"in-response-to":15,"sender-location":point("32.91,85.05"),"message":" dislike sprint the speed is horrible"}
+{"message-id":8,"author-id":1,"in-response-to":11,"sender-location":point("40.33,80.87"),"message":" like verizon the 3G is awesome:)"}
+{"message-id":9,"author-id":3,"in-response-to":12,"sender-location":point("34.45,96.48"),"message":" love verizon its wireless is good"}
+{"message-id":10,"author-id":1,"in-response-to":12,"sender-location":point("42.5,70.01"),"message":" can't stand motorola the touch-screen is terrible"}
+{"message-id":11,"author-id":1,"in-response-to":1,"sender-location":point("38.97,77.49"),"message":" can't stand at&t its plan is terrible"}
+{"message-id":12,"author-id":10,"in-response-to":6,"sender-location":point("42.26,77.76"),"message":" can't stand t-mobile its voicemail-service is OMG:("}
+{"message-id":13,"author-id":10,"in-response-to":4,"sender-location":point("42.77,78.92"),"message":" dislike iphone the voice-command is bad:("}
+{"message-id":14,"author-id":9,"in-response-to":12,"sender-location":point("41.33,85.28"),"message":" love at&t its 3G is good:)"}
+{"message-id":15,"author-id":7,"in-response-to":11,"sender-location":point("44.47,67.11"),"message":" like iphone the voicemail-service is awesome"}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/data/fbu.adm
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/data/fbu.adm b/docs/0.8.8-incubating/data/fbu.adm
new file mode 100644
index 0000000..7e99ea4
--- /dev/null
+++ b/docs/0.8.8-incubating/data/fbu.adm
@@ -0,0 +1,10 @@
+{"id":1,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}
+{"id":2,"alias":"Isbel","name":"IsbelDull","user-since":datetime("2011-01-22T10:10:00"),"friend-ids":{{1,4}},"employment":[{"organization-name":"Hexviafind","start-date":date("2010-04-27")}]}
+{"id":3,"alias":"Emory","name":"EmoryUnk","user-since":datetime("2012-07-10T10:10:00"),"friend-ids":{{1,5,8,9}},"employment":[{"organization-name":"geomedia","start-date":date("2010-06-17"),"end-date":date("2010-01-26")}]}
+{"id":4,"alias":"Nicholas","name":"NicholasStroh","user-since":datetime("2010-12-27T10:10:00"),"friend-ids":{{2}},"employment":[{"organization-name":"Zamcorporation","start-date":date("2010-06-08")}]}
+{"id":5,"alias":"Von","name":"VonKemble","user-since":datetime("2010-01-05T10:10:00"),"friend-ids":{{3,6,10}},"employment":[{"organization-name":"Kongreen","start-date":date("2010-11-27")}]}
+{"id":6,"alias":"Willis","name":"WillisWynne","user-since":datetime("2005-01-17T10:10:00"),"friend-ids":{{1,3,7}},"employment":[{"organization-name":"jaydax","start-date":date("2009-05-15")}]}
+{"id":7,"alias":"Suzanna","name":"SuzannaTillson","user-since":datetime("2012-08-07T10:10:00"),"friend-ids":{{6}},"employment":[{"organization-name":"Labzatron","start-date":date("2011-04-19")}]}
+{"id":8,"alias":"Nila","name":"NilaMilliron","user-since":datetime("2008-01-01T10:10:00"),"friend-ids":{{3}},"employment":[{"organization-name":"Plexlane","start-date":date("2010-02-28")}]}
+{"id":9,"alias":"Woodrow","name":"WoodrowNehling","user-since":datetime("2005-09-20T10:10:00"),"friend-ids":{{3,10}},"employment":[{"organization-name":"Zuncan","start-date":date("2003-04-22"),"end-date":date("2009-12-13")}]}
+{"id":10,"alias":"Bram","name":"BramHatch","user-since":datetime("2010-10-16T10:10:00"),"friend-ids":{{1,5,9}},"employment":[{"organization-name":"physcane","start-date":date("2007-06-05"),"end-date":date("2011-11-05")}]}


[12/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/js-sdk.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/js-sdk.html b/docs/0.8.8-incubating/aql/js-sdk.html
new file mode 100644
index 0000000..61c58e3
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/js-sdk.html
@@ -0,0 +1,958 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Javascript SDK</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AsterixDB Javascript SDK</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB Javascript SDK</h1>
+<div class="section">
+<h2><a name="Obtaining_and_Including"></a>Obtaining and Including</h2>
+<p><a class="externalLink" href="http://asterixdb.ics.uci.edu/download/bindings/asterix-sdk-stable.js">Download</a> the javascript SDK and include it like any other javascript library by adding the following line in the appropriate HTML file:</p>
+
+<div class="source">
+<div class="source">
+<pre>&lt;script src=&quot;path/to/asterix-sdk-stable.js&quot;&gt;&lt;/script&gt;
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Interactive_Demos"></a>Interactive Demos</h2>
+<p>There are two interactive demos that are available for download. Both of the demos illustrate how the javascript API would be used in an application:</p>
+
+<ul>
+  
+<li><a class="externalLink" href="http://asterixdb.ics.uci.edu/download/demos/tweetbook-demo.zip">Tweetbook Demo</a>: a contrived geo-spatial  application dealing with artificial Tweets allowing spatial, temporal, and  keyword-based filtering.</li>
+  
+<li><a class="externalLink" href="http://asterixdb.ics.uci.edu/download/demos/admaql101-demo.zip">ADM/AQL 101 Demo</a>: an interactive version of  all of the examples that are provided in the following section.</li>
+</ul></div>
+<div class="section">
+<h2><a name="The_javascript_SDK:_by_example"></a>The javascript SDK: by example</h2>
+<p>In this section, we explore how to form AQL queries using the javascript SDK. The queries from <a href="primer.html">AsterixDB 101: An ADM and AQL Primer</a> are used as examples here. For each AQL statement, the equivalent javascript expression is shown below it, followed by the results of executing the query.</p>
+<div class="section">
+<h3><a name="Query_0-A_-_Exact-Match_Lookup"></a>Query 0-A - Exact-Match Lookup</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.id = 8
+return $user;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression0a = new FLWOGRExpression()
+    .ForClause(&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause(new AExpression(&quot;$user.id = 8&quot;))
+    .ReturnClause(&quot;$user&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 8 } , &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: { datetime: 1199182200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: { date: 1267315200000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_0-B_-_Range_Scan"></a>Query 0-B - Range Scan</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.id &gt;= 2 and $user.id &lt;= 4
+return $user;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression0b = new FLWOGRExpression()
+    .ForClause(&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause().and(new AExpression(&quot;$user.id &gt;= 2&quot;), new AExpression(&quot;$user.id &lt;= 4&quot;))
+    .ReturnClause(&quot;$user&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 2 } , &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: { datetime: 1295691000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 4 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: { date: 1272326400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: { datetime: 1341915000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 8 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: { date: 1276732800000}, &quot;end-date&quot;: { date: 1264464000000} } ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: { datetime: 1293444600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: { date: 1275955200000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_1_-_Other_Query_Filters"></a>Query 1 - Other Query Filters</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.user-since &gt;= datetime('2010-07-22T00:00:00')
+and $user.user-since &lt;= datetime('2012-07-29T23:59:59')
+return $user;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression1 = new FLWOGRExpression()
+    .ForClause(&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause().and(
+       new AExpression(&quot;$user.user-since &gt;= datetime('2010-07-22T00:00:00')&quot;),
+       new AExpression(&quot;$user.user-since &lt;= datetime('2012-07-29T23:59:59')&quot;)
+    ).ReturnClause(&quot;$user&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 2 } , &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: { datetime: 1295691000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 4 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: { date: 1272326400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 10 } , &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: { datetime: 1287223800000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: { date: 1181001600000}, &quot;end-date&quot;: { date: 1320451200000} } ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: { datetime: 1341915000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 8 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: { date: 1276732800000}, &quot;end-date&quot;: { date: 1264464000000} } ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: { datetime: 1293444600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: { date: 1275955200000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_2-A_-_Equijoin"></a>Query 2-A - Equijoin</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+for $message in dataset FacebookMessages
+where $message.author-id = $user.id
+return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression2a = new FLWOGRExpression()
+    .ForClause (&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ForClause (&quot;$message&quot;, new AExpression(&quot;dataset FacebookMessages&quot;))
+    .WhereClause(new AExpression(&quot;$message.author-id = $user.id&quot;))
+    .ReturnClause({
+       &quot;uname&quot; : &quot;$user.name&quot;,
+       &quot;message&quot; : &quot;$message.message&quot;
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+{ &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+{ &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_2-B_-_Index_join"></a>Query 2-B - Index join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+for $message in dataset FacebookMessages
+where $message.author-id /*+ indexnl */  = $user.id
+return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression2b = new FLWOGRExpression()
+    .ForClause (&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ForClause (&quot;$message&quot;, new AExpression(&quot;dataset FacebookMessages&quot;))
+    .WhereClause(new AExpression(&quot;$message.author-id /*+ indexnl */  = $user.id&quot;))
+    .ReturnClause({
+       &quot;uname&quot; : &quot;$user.name&quot;,
+       &quot;message&quot; : &quot;$message.message&quot;
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+{ &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+{ &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+{ &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_3_-_Nested_Outer_Join"></a>Query 3 - Nested Outer Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+return {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: for $message in dataset FacebookMessages
+                where $message.author-id = $user.id
+                return $message.message
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression3messages = new FLWOGRExpression()
+    .ForClause(&quot;$message&quot;, new AExpression(&quot;dataset FacebookMessages&quot;))
+    .WhereClause(new AExpression(&quot;$message.author-id = $user.id&quot;))
+    .ReturnClause(&quot;$message.message&quot;);
+
+var expression3 = new FLWOGRExpression()
+    .ForClause (&quot;$user&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ReturnClause({
+        &quot;uname&quot;: &quot;$user.name&quot;,
+        &quot;messages&quot; : expression3messages
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;messages&quot;: { orderedlist: [&quot; dislike iphone its touch-screen is horrible&quot;, &quot; like verizon the 3G is awesome:)&quot;, &quot; can't stand motorola the touch-screen is terrible&quot;, &quot; can't stand at&amp;t the network is horrible:(&quot;, &quot; can't stand at&amp;t its plan is terrible&quot; ]} }
+{ &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;messages&quot;: { orderedlist: [&quot; like samsung the plan is amazing&quot;, &quot; like t-mobile its platform is mind-blowing&quot; ]} }
+{ &quot;uname&quot;: &quot;NilaMilliron&quot;, &quot;messages&quot;: { orderedlist: [ ]} }
+{ &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;messages&quot;: { orderedlist: [&quot; love at&amp;t its 3G is good:)&quot; ]} }
+{ &quot;uname&quot;: &quot;BramHatch&quot;, &quot;messages&quot;: { orderedlist: [&quot; dislike iphone the voice-command is bad:(&quot;, &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; ]} }
+{ &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;messages&quot;: { orderedlist: [&quot; love sprint its shortcut-menu is awesome:)&quot;, &quot; love verizon its wireless is good&quot; ]} }
+{ &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;messages&quot;: { orderedlist: [&quot; love sprint the customization is mind-blowing&quot; ]} }
+{ &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;messages&quot;: { orderedlist: [&quot; like iphone the voicemail-service is awesome&quot; ]} }
+{ &quot;uname&quot;: &quot;NicholasStroh&quot;, &quot;messages&quot;: { orderedlist: [ ]} }
+{ &quot;uname&quot;: &quot;VonKemble&quot;, &quot;messages&quot;: { orderedlist: [&quot; dislike sprint the speed is horrible&quot; ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_4_-_Theta_Join"></a>Query 4 - Theta Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+return {
+    &quot;message&quot;: $t.message-text,
+    &quot;nearby-messages&quot;: for $t2 in dataset TweetMessages
+                       where spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1
+                       return { &quot;msgtxt&quot;:$t2.message-text}
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression4messages = new FLWOGRExpression()
+    .ForClause( &quot;$t2&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .WhereClause( new AExpression(&quot;spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1&quot;))
+    .ReturnClause({ &quot;msgtxt&quot; : &quot;$t2.message-text&quot; });
+
+var expression4 = new FLWOGRExpression()
+    .ForClause( &quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .ReturnClause({
+        &quot;message&quot; : &quot;$t.message-text&quot;,
+        &quot;nearby-messages&quot; : expression4messages
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;message&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like iphone the voice-clarity is good:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like iphone the voice-clarity is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like samsung the platform is good&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like samsung the platform is good&quot; } ]} }
+{ &quot;message&quot;: &quot; love t-mobile its customization is good:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; love t-mobile its customization is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like samsung the voice-command is amazing:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like samsung the voice-command is amazing:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like motorola the speed is good:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ]} }
+{ &quot;message&quot;: &quot; love verizon its voicemail-service is awesome&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; love verizon its voicemail-service is awesome&quot; } ]} }
+{ &quot;message&quot;: &quot; can't stand motorola its speed is terrible:(&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; can't stand motorola its speed is terrible:(&quot; } ]} }
+{ &quot;message&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; } ]} }
+{ &quot;message&quot;: &quot; can't stand iphone its platform is terrible&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; can't stand iphone its platform is terrible&quot; } ]} }
+{ &quot;message&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; } ]} }
+{ &quot;message&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot;, &quot;nearby-messages&quot;: { orderedlist: [{ &quot;msgtxt&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_5_-_Fuzzy_Join"></a>Query 5 - Fuzzy Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+<p>use dataverse TinySocial;</p>
+
+<div class="source">
+<div class="source">
+<pre>set simfunction &quot;edit-distance&quot;;
+set simthreshold &quot;3&quot;;
+
+for $fbu in dataset FacebookUsers
+return {
+    &quot;id&quot;: $fbu.id,
+    &quot;name&quot;: $fbu.name,
+    &quot;similar-users&quot;: for $t in dataset TweetMessages
+                     let $tu := $t.user
+                     where $tu.name ~= $fbu.name
+                    return {
+                        &quot;twitter-screenname&quot;: $tu.screen-name,
+                        &quot;twitter-name&quot;: $tu.name
+                    }
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var similarUsersExpression = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .LetClause (&quot;$tu&quot;, new AExpression(&quot;$t.user&quot;))
+    .WhereClause(new AExpression(&quot;$tu.name ~= $fbu.name&quot;))
+    .ReturnClause({
+        &quot;twitter-screenname&quot;: &quot;$tu.screen-name&quot;,
+        &quot;twitter-name&quot;: &quot;$tu.name&quot;
+    });
+
+var expression5 = new FLWOGRExpression()
+    .ForClause (&quot;$fbu&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .ReturnClause(
+        {
+            &quot;id&quot; : &quot;$fbu.id&quot;,
+            &quot;name&quot; : &quot;$fbu.name&quot;,
+            &quot;similar-users&quot; : similarUsersExpression
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 1 } , &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 2 } , &quot;name&quot;: &quot;IsbelDull&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 8 } , &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;similar-users&quot;: { orderedlist: [{ &quot;twitter-screenname&quot;: &quot;NilaMilliron_tw&quot;, &quot;twitter-name&quot;: &quot;Nila Milliron&quot; } ]} }
+{ &quot;id&quot;: { int32: 9 } , &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 10 } , &quot;name&quot;: &quot;BramHatch&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 6 } , &quot;name&quot;: &quot;WillisWynne&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 7 } , &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+{ &quot;id&quot;: { int32: 5 } , &quot;name&quot;: &quot;VonKemble&quot;, &quot;similar-users&quot;: { orderedlist: [ ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_6_-_Existential_Quantification"></a>Query 6 - Existential Quantification</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $fbu in dataset FacebookUsers
+where (some $e in $fbu.employment satisfies is-null($e.end-date))
+return $fbu;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression6 = new FLWOGRExpression()
+    .ForClause (&quot;$fbu&quot;, new AQLClause().set(&quot;dataset FacebookUsers&quot;))
+    .WhereClause(
+        new QuantifiedExpression (
+            &quot;some&quot; ,
+            {&quot;$e&quot; : new AExpression(&quot;$fbu.employment&quot;) },
+            new FunctionExpression(&quot;is-null&quot;, new AExpression(&quot;$e.end-date&quot;))
+        )
+    )
+    .ReturnClause(&quot;$fbu&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 1 } , &quot;alias&quot;: &quot;Margarita&quot;, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;user-since&quot;: { datetime: 1345457400000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } , { int32: 3 } , { int32: 6 } , { int32: 10 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Codetechno&quot;, &quot;start-date&quot;: { date: 1154822400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 2 } , &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: { datetime: 1295691000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 4 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: { date: 1272326400000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 8 } , &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: { datetime: 1199182200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: { date: 1267315200000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 6 } , &quot;alias&quot;: &quot;Willis&quot;, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;user-since&quot;: { datetime: 1105956600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 3 } , { int32: 7 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;jaydax&quot;, &quot;start-date&quot;: { date: 1242345600000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 7 } , &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: { datetime: 1344334200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 6 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: { date: 1303171200000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 4 } , &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: { datetime: 1293444600000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 2 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: { date: 1275955200000}, &quot;end-date&quot;: null } ]} }
+{ &quot;id&quot;: { int32: 5 } , &quot;alias&quot;: &quot;Von&quot;, &quot;name&quot;: &quot;VonKemble&quot;, &quot;user-since&quot;: { datetime: 1262686200000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } , { int32: 6 } , { int32: 10 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Kongreen&quot;, &quot;start-date&quot;: { date: 1290816000000}, &quot;end-date&quot;: null } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_7_-_Universal_Quantification"></a>Query 7 - Universal Quantification</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $fbu in dataset FacebookUsers
+where (every $e in $fbu.employment satisfies not(is-null($e.end-date)))
+return $fbu;
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression7 = new FLWOGRExpression()
+    .ForClause(&quot;$fbu&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+    .WhereClause(
+        new QuantifiedExpression (
+            &quot;every&quot; ,
+            {&quot;$e&quot; : new AExpression(&quot;$fbu.employment&quot;) },
+            new FunctionExpression(&quot;not&quot;, new FunctionExpression(&quot;is-null&quot;, new AExpression(&quot;$e.end-date&quot;)))
+        )
+    )
+    .ReturnClause(&quot;$fbu&quot;);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;id&quot;: { int32: 9 } , &quot;alias&quot;: &quot;Woodrow&quot;, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;user-since&quot;: { datetime: 1127211000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 3 } , { int32: 10 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;Zuncan&quot;, &quot;start-date&quot;: { date: 1050969600000}, &quot;end-date&quot;: { date: 1260662400000} } ]} }
+{ &quot;id&quot;: { int32: 10 } , &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: { datetime: 1287223800000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: { date: 1181001600000}, &quot;end-date&quot;: { date: 1320451200000} } ]} }
+{ &quot;id&quot;: { int32: 3 } , &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: { datetime: 1341915000000}, &quot;friend-ids&quot;: { unorderedlist: [{ int32: 1 } , { int32: 5 } , { int32: 8 } , { int32: 9 } ]}, &quot;employment&quot;: { orderedlist: [{ &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: { date: 1276732800000}, &quot;end-date&quot;: { date: 1264464000000} } ]} }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_8_-_Simple_Aggregation"></a>Query 8 - Simple Aggregation</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+count(for $fbu in dataset FacebookUsers return $fbu);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression8 = new FunctionExpression(
+    &quot;count&quot;,
+    new FLWOGRExpression()
+        .ForClause(&quot;$fbu&quot;, new AExpression(&quot;dataset FacebookUsers&quot;))
+        .ReturnClause(&quot;$fbu&quot;)
+);
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ int64: 10 }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_9-A_-_Grouping_and_Aggregation"></a>Query 9-A - Grouping and Aggregation</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+group by $uid := $t.user.screen-name with $t
+return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression9a = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .GroupClause(&quot;$uid&quot;, new AExpression(&quot;$t.user.screen-name&quot;), &quot;with&quot;, &quot;$t&quot;)
+    .ReturnClause(
+        {
+            &quot;user&quot; : &quot;$uid&quot;,
+            &quot;count&quot; : new FunctionExpression(&quot;count&quot;, new AExpression(&quot;$t&quot;))
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: { int64: 3 } }
+{ &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: { int64: 6 } }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_9-B_-_Hash-Based_Grouping_and_Aggregation"></a>Query 9-B - (Hash-Based) Grouping and Aggregation</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+/*+ hash*/
+group by $uid := $t.user.screen-name with $t
+return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression9b = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .AQLClause(&quot;/*+ hash*/&quot;)
+    .GroupClause(&quot;$uid&quot;, new AExpression(&quot;$t.user.screen-name&quot;), &quot;with&quot;, &quot;$t&quot;)
+    .ReturnClause(
+        {
+            &quot;user&quot; : &quot;$uid&quot;,
+            &quot;count&quot; : new FunctionExpression(&quot;count&quot;, new AExpression(&quot;$t&quot;))
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: { int64: 3 } }
+{ &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: { int64: 1 } }
+{ &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: { int64: 6 } }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_10_-_Grouping_and_Limits"></a>Query 10 - Grouping and Limits</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset TweetMessages
+group by $uid := $t.user.screen-name with $t
+let $c := count($t)
+order by $c desc
+limit 3
+return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: $c
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression10 = new FLWOGRExpression()
+    .ForClause(&quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .GroupClause(&quot;$uid&quot;, new AExpression(&quot;$t.user.screen-name&quot;), &quot;with&quot;, &quot;$t&quot;)
+    .LetClause(&quot;$c&quot;, new FunctionExpression(&quot;count&quot;, new AExpression(&quot;$t&quot;)))
+    .OrderbyClause( new AExpression(&quot;$c&quot;), &quot;desc&quot; )
+    .LimitClause(new AExpression(&quot;3&quot;))
+    .ReturnClause(
+        {
+            &quot;user&quot; : &quot;$uid&quot;,
+            &quot;count&quot; : &quot;$c&quot;
+        }
+    );
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: { int64: 6 } }
+{ &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: { int64: 3 } }
+{ &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: { int64: 1 } }
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h3><a name="Query_11_-_Left_Outer_Fuzzy_Join"></a>Query 11 - Left Outer Fuzzy Join</h3>
+<div class="section">
+<div class="section">
+<div class="section">
+<h6><a name="AQL"></a>AQL</h6>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+set simfunction &quot;jaccard&quot;;
+set simthreshold &quot;0.3&quot;;
+
+for $t in dataset TweetMessages
+return {
+    &quot;tweet&quot;: $t,
+    &quot;similar-tweets&quot;: for $t2 in dataset TweetMessages
+    where  $t2.referred-topics ~= $t.referred-topics
+    and $t2.tweetid != $t.tweetid
+    return $t2.referred-topics
+};
+</pre></div></div></div>
+<div class="section">
+<h6><a name="JS"></a>JS</h6>
+
+<div class="source">
+<div class="source">
+<pre>var expression11 = new FLWOGRExpression()
+    .ForClause( &quot;$t&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+    .ReturnClause({
+        &quot;tweet&quot;         : new AExpression(&quot;$t&quot;),
+        &quot;similar-tweets&quot;: new FLWOGRExpression()
+                            .ForClause( &quot;$t2&quot;, new AExpression(&quot;dataset TweetMessages&quot;))
+                            .WhereClause().and(
+                                new AExpression(&quot;$t2.referred-topics ~= $t.referred-topics&quot;),
+                                new AExpression(&quot;$t2.tweetid != $t.tweetid&quot;)
+                             )
+                            .ReturnClause(&quot;$t2.referred-topics&quot;)
+    });
+</pre></div></div></div>
+<div class="section">
+<h6><a name="Results"></a>Results</h6>
+
+<div class="source">
+<div class="source">
+<pre>{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;10&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 121 } , &quot;statuses_count&quot;: { int32: 362 } , &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: { int32: 17159 } }, &quot;sender-location&quot;: { point: [29.15, 76.53]}, &quot;send-time&quot;: { datetime: 1201342200000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, &quot;message-text&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;iphone&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;voicemail-service&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;6&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 121 } , &quot;statuses_count&quot;: { int32: 362 } , &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: { int32: 17159 } }, &quot;sender-location&quot;: { point: [47.51, 83.99]}, &quot;send-time&quot;: { datetime: 1273227000000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;iphone&quot;, &quot;voice-clarity&quot; ]}, &quot;message-text&quot;: &quot; like iphone the voice-clarity is good:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;iphone&quot;, &quot;platform&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 182 } , &quot;statuses_count&quot;: { int32: 394 } , &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: { int32: 32136 } }, &quot;sender-location&quot;: { point: [36.21, 72.6]}, &quot;send-time&quot;: { datetime: 1314267000000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;samsung&quot;, &quot;platform&quot; ]}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;iphone&quot;, &quot;platform&quot; ]}, { unorderedlist: [&quot;samsung&quot;, &quot;voice-command&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;1&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [47.44, 80.65]}, &quot;send-time&quot;: { datetime: 1209204600000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;t-mobile&quot;, &quot;customization&quot; ]}, &quot;message-text&quot;: &quot; love t-mobile its customization is good:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;t-mobile&quot;, &quot;shortcut-menu&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;12&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;OliJackson_512&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 445 } , &quot;statuses_count&quot;: { int32: 164 } , &quot;name&quot;: &quot;Oli Jackson&quot;, &quot;followers_count&quot;: { int32: 22649 } }, &quot;sender-location&quot;: { point: [24.82, 94.63]}, &quot;send-time&quot;: { datetime: 1266055800000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;samsung&quot;, &quot;voice-command&quot; ]}, &quot;message-text&quot;: &quot; like samsung the voice-command is amazing:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;samsung&quot;, &quot;platform&quot; ]}, { unorderedlist: [&quot;sprint&quot;, &quot;voice-command&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;3&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [29.72, 75.8]}, &quot;send-time&quot;: { datetime: 1162635000000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]}, &quot;message-text&quot;: &quot; like motorola the speed is good:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [36.86, 74.62]}, &quot;send-time&quot;: { datetime: 1342865400000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;verizon&quot;, &quot;voicemail-service&quot; ]}, &quot;message-text&quot;: &quot; love verizon its voicemail-service is awesome&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;5&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [40.09, 92.69]}, &quot;send-time&quot;: { datetime: 1154686200000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]}, &quot;message-text&quot;: &quot; can't stand motorola its speed is terrible:(&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;motorola&quot;, &quot;speed&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;8&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [46.05, 93.34]}, &quot;send-time&quot;: { datetime: 1129284600000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;t-mobile&quot;, &quot;shortcut-menu&quot; ]}, &quot;message-text&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]}, { unorderedlist: [&quot;t-mobile&quot;, &quot;customization&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;11&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NilaMilliron_tw&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 445 } , &quot;statuses_count&quot;: { int32: 164 } , &quot;name&quot;: &quot;Nila Milliron&quot;, &quot;followers_count&quot;: { int32: 22649 } }, &quot;sender-location&quot;: { point: [37.59, 68.42]}, &quot;send-time&quot;: { datetime: 1205057400000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;iphone&quot;, &quot;platform&quot; ]}, &quot;message-text&quot;: &quot; can't stand iphone its platform is terrible&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;iphone&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;samsung&quot;, &quot;platform&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;2&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 121 } , &quot;statuses_count&quot;: { int32: 362 } , &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: { int32: 17159 } }, &quot;sender-location&quot;: { point: [32.84, 67.14]}, &quot;send-time&quot;: { datetime: 1273745400000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;verizon&quot;, &quot;shortcut-menu&quot; ]}, &quot;message-text&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;t-mobile&quot;, &quot;shortcut-menu&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;voice-clarity&quot; ]}, { unorderedlist: [&quot;verizon&quot;, &quot;voicemail-service&quot; ]} ]} }
+{ &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: { int32: 39339 } , &quot;statuses_count&quot;: { int32: 473 } , &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: { int32: 49416 } }, &quot;sender-location&quot;: { point: [39.28, 70.48]}, &quot;send-time&quot;: { datetime: 1324894200000}, &quot;referred-topics&quot;: { unorderedlist: [&quot;sprint&quot;, &quot;voice-command&quot; ]}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }, &quot;similar-tweets&quot;: { orderedlist: [{ unorderedlist: [&quot;samsung&quot;, &quot;voice-command&quot; ]} ]} }
+</pre></div></div></div></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[02/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js b/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js
new file mode 100644
index 0000000..677e611
--- /dev/null
+++ b/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js
@@ -0,0 +1,21 @@
+/*!
+ * jQuery JavaScript Library v1.8.0
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Thu Aug 09 2012 16:24:48 GMT-0400 (Eastern Daylight Time)
+ */
+(function(a2,aB){var x,af,o=a2.document,aI=a2.location,d=a2.navigator,bg=a2.jQuery,I=a2.$,am=Array.prototype.push,a4=Array.prototype.slice,aK=Array.prototype.indexOf,A=Object.prototype.toString,V=Object.prototype.hasOwnProperty,aN=String.prototype.trim,bG=function(e,bZ){return new bG.fn.init(e,bZ,x)},bx=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,aa=/\S/,aV=/\s+/,D=aa.test("\xA0")?(/^[\s\xA0]+|[\s\xA0]+$/g):/^\s+|\s+$/g,bo=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bf=/^[\],:{}\s]*$/,bi=/(?:^|:|,)(?:\s*\[)+/g,bD=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,a0=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,bP=/^-ms-/,aU=/-([\da-z])/gi,N=function(e,bZ){return(bZ+"").toUpperCase()},aF=function(){if(o.addEventListener){o.removeEventListener("DOMContentLoaded",aF,false);bG.ready()}else{if(o.readyState==="complete"){o.detachEvent("onreadystatechange",aF);bG.ready()}}},Z={};bG.fn=bG.prototype={constructor:bG,init:function(e,b2,b1){var b0,b3,b
 Z,b4;if(!e){return this}if(e.nodeType){this.context=this[0]=e;this.length=1;return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b0=[null,e,null]}else{b0=bo.exec(e)}if(b0&&(b0[1]||!b2)){if(b0[1]){b2=b2 instanceof bG?b2[0]:b2;b4=(b2&&b2.nodeType?b2.ownerDocument||b2:o);e=bG.parseHTML(b0[1],b4,true);if(a.test(b0[1])&&bG.isPlainObject(b2)){this.attr.call(e,b2,true)}return bG.merge(this,e)}else{b3=o.getElementById(b0[2]);if(b3&&b3.parentNode){if(b3.id!==b0[2]){return b1.find(e)}this.length=1;this[0]=b3}this.context=o;this.selector=e;return this}}else{if(!b2||b2.jquery){return(b2||b1).find(e)}else{return this.constructor(b2).find(e)}}}else{if(bG.isFunction(e)){return b1.ready(e)}}if(e.selector!==aB){this.selector=e.selector;this.context=e.context}return bG.makeArray(e,this)},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return a4.call(this)},get:function(e){return e==null?this.toArray():(e<0?this[t
 his.length+e]:this[e])},pushStack:function(bZ,b1,e){var b0=bG.merge(this.constructor(),bZ);b0.prevObject=this;b0.context=this.context;if(b1==="find"){b0.selector=this.selector+(this.selector?" ":"")+e}else{if(b1){b0.selector=this.selector+"."+b1+"("+e+")"}}return b0},each:function(bZ,e){return bG.each(this,bZ,e)},ready:function(e){bG.ready.promise().done(e);return this},eq:function(e){e=+e;return e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(a4.apply(this,arguments),"slice",a4.call(arguments).join(","))},map:function(e){return this.pushStack(bG.map(this,function(b0,bZ){return e.call(b0,bZ,b0)}))},end:function(){return this.prevObject||this.constructor(null)},push:am,sort:[].sort,splice:[].splice};bG.fn.init.prototype=bG.fn;bG.extend=bG.fn.extend=function(){var b7,b0,e,bZ,b4,b5,b3=arguments[0]||{},b2=1,b1=arguments.length,b6=false;if(typeof b3==="boolean"){b6=b3;b3=arguments[1]||{
 };b2=2}if(typeof b3!=="object"&&!bG.isFunction(b3)){b3={}}if(b1===b2){b3=this;--b2}for(;b2<b1;b2++){if((b7=arguments[b2])!=null){for(b0 in b7){e=b3[b0];bZ=b7[b0];if(b3===bZ){continue}if(b6&&bZ&&(bG.isPlainObject(bZ)||(b4=bG.isArray(bZ)))){if(b4){b4=false;b5=e&&bG.isArray(e)?e:[]}else{b5=e&&bG.isPlainObject(e)?e:{}}b3[b0]=bG.extend(b6,b5,bZ)}else{if(bZ!==aB){b3[b0]=bZ}}}}}return b3};bG.extend({noConflict:function(e){if(a2.$===bG){a2.$=I}if(e&&a2.jQuery===bG){a2.jQuery=bg}return bG},isReady:false,readyWait:1,holdReady:function(e){if(e){bG.readyWait++}else{bG.ready(true)}},ready:function(e){if(e===true?--bG.readyWait:bG.isReady){return}if(!o.body){return setTimeout(bG.ready,1)}bG.isReady=true;if(e!==true&&--bG.readyWait>0){return}af.resolveWith(o,[bG]);if(bG.fn.trigger){bG(o).trigger("ready").off("ready")}},isFunction:function(e){return bG.type(e)==="function"},isArray:Array.isArray||function(e){return bG.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:fu
 nction(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):Z[A.call(e)]||"object"},isPlainObject:function(b1){if(!b1||bG.type(b1)!=="object"||b1.nodeType||bG.isWindow(b1)){return false}try{if(b1.constructor&&!V.call(b1,"constructor")&&!V.call(b1.constructor.prototype,"isPrototypeOf")){return false}}catch(b0){return false}var bZ;for(bZ in b1){}return bZ===aB||V.call(b1,bZ)},isEmptyObject:function(bZ){var e;for(e in bZ){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(b1,b0,e){var bZ;if(!b1||typeof b1!=="string"){return null}if(typeof b0==="boolean"){e=b0;b0=0}b0=b0||o;if((bZ=a.exec(b1))){return[b0.createElement(bZ[1])]}bZ=bG.buildFragment([b1],b0,e?null:[]);return bG.merge([],(bZ.cacheable?bG.clone(bZ.fragment):bZ.fragment).childNodes)},parseJSON:function(e){if(!e||typeof e!=="string"){return null}e=bG.trim(e);if(a2.JSON&&a2.JSON.parse){return a2.JSON.parse(e)}if(bf.test(e.replace(bD,"@").replace(a0,"]").replace(bi
 ,""))){return(new Function("return "+e))()}bG.error("Invalid JSON: "+e)},parseXML:function(b1){var bZ,b0;if(!b1||typeof b1!=="string"){return null}try{if(a2.DOMParser){b0=new DOMParser();bZ=b0.parseFromString(b1,"text/xml")}else{bZ=new ActiveXObject("Microsoft.XMLDOM");bZ.async="false";bZ.loadXML(b1)}}catch(b2){bZ=aB}if(!bZ||!bZ.documentElement||bZ.getElementsByTagName("parsererror").length){bG.error("Invalid XML: "+b1)}return bZ},noop:function(){},globalEval:function(e){if(e&&aa.test(e)){(a2.execScript||function(bZ){a2["eval"].call(a2,bZ)})(e)}},camelCase:function(e){return e.replace(bP,"ms-").replace(aU,N)},nodeName:function(bZ,e){return bZ.nodeName&&bZ.nodeName.toUpperCase()===e.toUpperCase()},each:function(b3,b4,b0){var bZ,b1=0,b2=b3.length,e=b2===aB||bG.isFunction(b3);if(b0){if(e){for(bZ in b3){if(b4.apply(b3[bZ],b0)===false){break}}}else{for(;b1<b2;){if(b4.apply(b3[b1++],b0)===false){break}}}}else{if(e){for(bZ in b3){if(b4.call(b3[bZ],bZ,b3[bZ])===false){break}}}else{for(;b1<b
 2;){if(b4.call(b3[b1],b1,b3[b1++])===false){break}}}}return b3},trim:aN?function(e){return e==null?"":aN.call(e)}:function(e){return e==null?"":e.toString().replace(D,"")},makeArray:function(e,b0){var b1,bZ=b0||[];if(e!=null){b1=bG.type(e);if(e.length==null||b1==="string"||b1==="function"||b1==="regexp"||bG.isWindow(e)){am.call(bZ,e)}else{bG.merge(bZ,e)}}return bZ},inArray:function(b1,bZ,b0){var e;if(bZ){if(aK){return aK.call(bZ,b1,b0)}e=bZ.length;b0=b0?b0<0?Math.max(0,e+b0):b0:0;for(;b0<e;b0++){if(b0 in bZ&&bZ[b0]===b1){return b0}}}return -1},merge:function(b2,b0){var e=b0.length,b1=b2.length,bZ=0;if(typeof e==="number"){for(;bZ<e;bZ++){b2[b1++]=b0[bZ]}}else{while(b0[bZ]!==aB){b2[b1++]=b0[bZ++]}}b2.length=b1;return b2},grep:function(bZ,b4,e){var b3,b0=[],b1=0,b2=bZ.length;e=!!e;for(;b1<b2;b1++){b3=!!b4(bZ[b1],b1);if(e!==b3){b0.push(bZ[b1])}}return b0},map:function(e,b5,b6){var b3,b4,b2=[],b0=0,bZ=e.length,b1=e instanceof bG||bZ!==aB&&typeof bZ==="number"&&((bZ>0&&e[0]&&e[bZ-1])||bZ
 ===0||bG.isArray(e));if(b1){for(;b0<bZ;b0++){b3=b5(e[b0],b0,b6);if(b3!=null){b2[b2.length]=b3}}}else{for(b4 in e){b3=b5(e[b4],b4,b6);if(b3!=null){b2[b2.length]=b3}}}return b2.concat.apply([],b2)},guid:1,proxy:function(b2,b1){var b0,e,bZ;if(typeof b1==="string"){b0=b2[b1];b1=b2;b2=b0}if(!bG.isFunction(b2)){return aB}e=a4.call(arguments,2);bZ=function(){return b2.apply(b1,e.concat(a4.call(arguments)))};bZ.guid=b2.guid=b2.guid||bZ.guid||bG.guid++;return bZ},access:function(e,b4,b7,b5,b2,b8,b6){var b0,b3=b7==null,b1=0,bZ=e.length;if(b7&&typeof b7==="object"){for(b1 in b7){bG.access(e,b4,b1,b7[b1],1,b8,b5)}b2=1}else{if(b5!==aB){b0=b6===aB&&bG.isFunction(b5);if(b3){if(b0){b0=b4;b4=function(ca,b9,cb){return b0.call(bG(ca),cb)}}else{b4.call(e,b5);b4=null}}if(b4){for(;b1<bZ;b1++){b4(e[b1],b7,b0?b5.call(e[b1],b1,b4(e[b1],b7)):b5,b6)}}b2=1}}return b2?e:b3?b4.call(e):bZ?b4(e[0],b7):b8},now:function(){return(new Date()).getTime()}});bG.ready.promise=function(b2){if(!af){af=bG.Deferred();if(o.rea
 dyState==="complete"||(o.readyState!=="loading"&&o.addEventListener)){setTimeout(bG.ready,1)}else{if(o.addEventListener){o.addEventListener("DOMContentLoaded",aF,false);a2.addEventListener("load",bG.ready,false)}else{o.attachEvent("onreadystatechange",aF);a2.attachEvent("onload",bG.ready);var b1=false;try{b1=a2.frameElement==null&&o.documentElement}catch(b0){}if(b1&&b1.doScroll){(function bZ(){if(!bG.isReady){try{b1.doScroll("left")}catch(b3){return setTimeout(bZ,50)}bG.ready()}})()}}}}return af.promise(b2)};bG.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(bZ,e){Z["[object "+e+"]"]=e.toLowerCase()});x=bG(o);var bU={};function ac(bZ){var e=bU[bZ]={};bG.each(bZ.split(aV),function(b1,b0){e[b0]=true});return e}bG.Callbacks=function(b8){b8=typeof b8==="string"?(bU[b8]||ac(b8)):bG.extend({},b8);var b1,e,b2,b0,b3,b4,b5=[],b6=!b8.once&&[],bZ=function(b9){b1=b8.memory&&b9;e=true;b4=b0||0;b0=0;b3=b5.length;b2=true;for(;b5&&b4<b3;b4++){if(b5[b4].apply(b9[0]
 ,b9[1])===false&&b8.stopOnFalse){b1=false;break}}b2=false;if(b5){if(b6){if(b6.length){bZ(b6.shift())}}else{if(b1){b5=[]}else{b7.disable()}}}},b7={add:function(){if(b5){var ca=b5.length;(function b9(cb){bG.each(cb,function(cd,cc){if(bG.isFunction(cc)&&(!b8.unique||!b7.has(cc))){b5.push(cc)}else{if(cc&&cc.length){b9(cc)}}})})(arguments);if(b2){b3=b5.length}else{if(b1){b0=ca;bZ(b1)}}}return this},remove:function(){if(b5){bG.each(arguments,function(cb,b9){var ca;while((ca=bG.inArray(b9,b5,ca))>-1){b5.splice(ca,1);if(b2){if(ca<=b3){b3--}if(ca<=b4){b4--}}}})}return this},has:function(b9){return bG.inArray(b9,b5)>-1},empty:function(){b5=[];return this},disable:function(){b5=b6=b1=aB;return this},disabled:function(){return !b5},lock:function(){b6=aB;if(!b1){b7.disable()}return this},locked:function(){return !b6},fireWith:function(ca,b9){b9=b9||[];b9=[ca,b9.slice?b9.slice():b9];if(b5&&(!e||b6)){if(b2){b6.push(b9)}else{bZ(b9)}}return this},fire:function(){b7.fireWith(this,arguments);return th
 is},fired:function(){return !!e}};return b7};bG.extend({Deferred:function(b0){var bZ=[["resolve","done",bG.Callbacks("once memory"),"resolved"],["reject","fail",bG.Callbacks("once memory"),"rejected"],["notify","progress",bG.Callbacks("memory")]],b1="pending",b2={state:function(){return b1},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var b3=arguments;return bG.Deferred(function(b4){bG.each(bZ,function(b6,b5){var b8=b5[0],b7=b3[b6];e[b5[1]](bG.isFunction(b7)?function(){var b9=b7.apply(this,arguments);if(b9&&bG.isFunction(b9.promise)){b9.promise().done(b4.resolve).fail(b4.reject).progress(b4.notify)}else{b4[b8+"With"](this===e?b4:this,[b9])}}:b4[b8])});b3=null}).promise()},promise:function(b3){return typeof b3==="object"?bG.extend(b3,b2):b2}},e={};b2.pipe=b2.then;bG.each(bZ,function(b4,b3){var b6=b3[2],b5=b3[3];b2[b3[1]]=b6.add;if(b5){b6.add(function(){b1=b5},bZ[b4^1][2].disable,bZ[2][2].lock)}e[b3[0]]=b6.fire;e[b3[0]+"With"]=b6.fireWith});b2.promi
 se(e);if(b0){b0.call(e,e)}return e},when:function(b2){var b0=0,b4=a4.call(arguments),e=b4.length,bZ=e!==1||(b2&&bG.isFunction(b2.promise))?e:0,b7=bZ===1?b2:bG.Deferred(),b1=function(b9,ca,b8){return function(cb){ca[b9]=this;b8[b9]=arguments.length>1?a4.call(arguments):cb;if(b8===b6){b7.notifyWith(ca,b8)}else{if(!(--bZ)){b7.resolveWith(ca,b8)}}}},b6,b3,b5;if(e>1){b6=new Array(e);b3=new Array(e);b5=new Array(e);for(;b0<e;b0++){if(b4[b0]&&bG.isFunction(b4[b0].promise)){b4[b0].promise().done(b1(b0,b5,b4)).fail(b7.reject).progress(b1(b0,b3,b6))}else{--bZ}}}if(!bZ){b7.resolveWith(b5,b4)}return b7.promise()}});bG.support=(function(){var cb,ca,b8,b9,b2,b7,b6,b4,b3,b1,bZ,b0=o.createElement("div");b0.setAttribute("className","t");b0.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";ca=b0.getElementsByTagName("*");b8=b0.getElementsByTagName("a")[0];b8.style.cssText="top:1px;float:left;opacity:.5";if(!ca||!ca.length||!b8){return{}}b9=o.createElement("select");b2=b9.
 appendChild(o.createElement("option"));b7=b0.getElementsByTagName("input")[0];cb={leadingWhitespace:(b0.firstChild.nodeType===3),tbody:!b0.getElementsByTagName("tbody").length,htmlSerialize:!!b0.getElementsByTagName("link").length,style:/top/.test(b8.getAttribute("style")),hrefNormalized:(b8.getAttribute("href")==="/a"),opacity:/^0.5/.test(b8.style.opacity),cssFloat:!!b8.style.cssFloat,checkOn:(b7.value==="on"),optSelected:b2.selected,getSetAttribute:b0.className!=="t",enctype:!!o.createElement("form").enctype,html5Clone:o.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",boxModel:(o.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};b7.checked=true;cb.noCloneChecked=b7.cloneNode(true).checked;b9.disabled=true;cb.optDisabled=!b2.disabled;try{delete b0.test}catch(b5){cb.deleteExp
 ando=false}if(!b0.addEventListener&&b0.attachEvent&&b0.fireEvent){b0.attachEvent("onclick",bZ=function(){cb.noCloneEvent=false});b0.cloneNode(true).fireEvent("onclick");b0.detachEvent("onclick",bZ)}b7=o.createElement("input");b7.value="t";b7.setAttribute("type","radio");cb.radioValue=b7.value==="t";b7.setAttribute("checked","checked");b7.setAttribute("name","t");b0.appendChild(b7);b6=o.createDocumentFragment();b6.appendChild(b0.lastChild);cb.checkClone=b6.cloneNode(true).cloneNode(true).lastChild.checked;cb.appendChecked=b7.checked;b6.removeChild(b7);b6.appendChild(b0);if(b0.attachEvent){for(b3 in {submit:true,change:true,focusin:true}){b4="on"+b3;b1=(b4 in b0);if(!b1){b0.setAttribute(b4,"return;");b1=(typeof b0[b4]==="function")}cb[b3+"Bubbles"]=b1}}bG(function(){var cc,cg,ce,cf,cd="padding:0;margin:0;border:0;display:block;overflow:hidden;",e=o.getElementsByTagName("body")[0];if(!e){return}cc=o.createElement("div");cc.style.cssText="visibility:hidden;border:0;width:0;height:0;posi
 tion:static;top:0;margin-top:1px";e.insertBefore(cc,e.firstChild);cg=o.createElement("div");cc.appendChild(cg);cg.innerHTML="<table><tr><td></td><td>t</td></tr></table>";ce=cg.getElementsByTagName("td");ce[0].style.cssText="padding:0;margin:0;border:0;display:none";b1=(ce[0].offsetHeight===0);ce[0].style.display="";ce[1].style.display="none";cb.reliableHiddenOffsets=b1&&(ce[0].offsetHeight===0);cg.innerHTML="";cg.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";cb.boxSizing=(cg.offsetWidth===4);cb.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a2.getComputedStyle){cb.pixelPosition=(a2.getComputedStyle(cg,null)||{}).top!=="1%";cb.boxSizingReliable=(a2.getComputedStyle(cg,null)||{width:"4px"}).width==="4px";cf=o.createElement("div");cf.style.cssText=cg.style.cssText=cd;cf.style.marginRight=cf.style.width="0";cg.style.width="1px";cg.appendChild(cf)
 ;cb.reliableMarginRight=!parseFloat((a2.getComputedStyle(cf,null)||{}).marginRight)}if(typeof cg.style.zoom!=="undefined"){cg.innerHTML="";cg.style.cssText=cd+"width:1px;padding:1px;display:inline;zoom:1";cb.inlineBlockNeedsLayout=(cg.offsetWidth===3);cg.style.display="block";cg.style.overflow="visible";cg.innerHTML="<div></div>";cg.firstChild.style.width="5px";cb.shrinkWrapBlocks=(cg.offsetWidth!==3);cc.style.zoom=1}e.removeChild(cc);cc=cg=ce=cf=null});b6.removeChild(b0);ca=b8=b9=b2=b7=b6=b0=null;return cb})();var bt=/^(?:\{.*\}|\[.*\])$/,aL=/([A-Z])/g;bG.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(bG.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?bG.cache[e[bG.expando]]:e[bG.expando];return !!e&&!O(e)},data:function(b1,bZ,b3,b2){if(!bG.acceptData(b1)){return}var b4,b6,b7=bG.expando,b5=typeof bZ==="string",b8=b1.nodeType,e=b8?bG.cache:b1,b0=b8?b1[b7]:b1[b7]&&
 b7;if((!b0||!e[b0]||(!b2&&!e[b0].data))&&b5&&b3===aB){return}if(!b0){if(b8){b1[b7]=b0=bG.deletedIds.pop()||++bG.uuid}else{b0=b7}}if(!e[b0]){e[b0]={};if(!b8){e[b0].toJSON=bG.noop}}if(typeof bZ==="object"||typeof bZ==="function"){if(b2){e[b0]=bG.extend(e[b0],bZ)}else{e[b0].data=bG.extend(e[b0].data,bZ)}}b4=e[b0];if(!b2){if(!b4.data){b4.data={}}b4=b4.data}if(b3!==aB){b4[bG.camelCase(bZ)]=b3}if(b5){b6=b4[bZ];if(b6==null){b6=b4[bG.camelCase(bZ)]}}else{b6=b4}return b6},removeData:function(b1,bZ,b2){if(!bG.acceptData(b1)){return}var b5,b4,b3,b6=b1.nodeType,e=b6?bG.cache:b1,b0=b6?b1[bG.expando]:bG.expando;if(!e[b0]){return}if(bZ){b5=b2?e[b0]:e[b0].data;if(b5){if(!bG.isArray(bZ)){if(bZ in b5){bZ=[bZ]}else{bZ=bG.camelCase(bZ);if(bZ in b5){bZ=[bZ]}else{bZ=bZ.split(" ")}}}for(b4=0,b3=bZ.length;b4<b3;b4++){delete b5[bZ[b4]]}if(!(b2?O:bG.isEmptyObject)(b5)){return}}}if(!b2){delete e[b0].data;if(!O(e[b0])){return}}if(b6){bG.cleanData([b1],true)}else{if(bG.support.deleteExpando||e!=e.window){delete
  e[b0]}else{e[b0]=null}}},_data:function(bZ,e,b0){return bG.data(bZ,e,b0,true)},acceptData:function(bZ){var e=bZ.nodeName&&bG.noData[bZ.nodeName.toLowerCase()];return !e||e!==true&&bZ.getAttribute("classid")===e}});bG.fn.extend({data:function(b7,b6){var b2,bZ,b5,e,b1,b0=this[0],b4=0,b3=null;if(b7===aB){if(this.length){b3=bG.data(b0);if(b0.nodeType===1&&!bG._data(b0,"parsedAttrs")){b5=b0.attributes;for(b1=b5.length;b4<b1;b4++){e=b5[b4].name;if(e.indexOf("data-")===0){e=bG.camelCase(e.substring(5));bv(b0,e,b3[e])}}bG._data(b0,"parsedAttrs",true)}}return b3}if(typeof b7==="object"){return this.each(function(){bG.data(this,b7)})}b2=b7.split(".",2);b2[1]=b2[1]?"."+b2[1]:"";bZ=b2[1]+"!";return bG.access(this,function(b8){if(b8===aB){b3=this.triggerHandler("getData"+bZ,[b2[0]]);if(b3===aB&&b0){b3=bG.data(b0,b7);b3=bv(b0,b7,b3)}return b3===aB&&b2[1]?this.data(b2[0]):b3}b2[1]=b8;this.each(function(){var b9=bG(this);b9.triggerHandler("setData"+bZ,b2);bG.data(this,b7,b8);b9.triggerHandler("cha
 ngeData"+bZ,b2)})},null,b6,arguments.length>1,null,false)},removeData:function(e){return this.each(function(){bG.removeData(this,e)})}});function bv(b1,b0,b2){if(b2===aB&&b1.nodeType===1){var bZ="data-"+b0.replace(aL,"-$1").toLowerCase();b2=b1.getAttribute(bZ);if(typeof b2==="string"){try{b2=b2==="true"?true:b2==="false"?false:b2==="null"?null:+b2+""===b2?+b2:bt.test(b2)?bG.parseJSON(b2):b2}catch(b3){}bG.data(b1,b0,b2)}else{b2=aB}}return b2}function O(bZ){var e;for(e in bZ){if(e==="data"&&bG.isEmptyObject(bZ[e])){continue}if(e!=="toJSON"){return false}}return true}bG.extend({queue:function(b0,bZ,b1){var e;if(b0){bZ=(bZ||"fx")+"queue";e=bG._data(b0,bZ);if(b1){if(!e||bG.isArray(b1)){e=bG._data(b0,bZ,bG.makeArray(b1))}else{e.push(b1)}}return e||[]}},dequeue:function(b3,b2){b2=b2||"fx";var bZ=bG.queue(b3,b2),b1=bZ.shift(),e=bG._queueHooks(b3,b2),b0=function(){bG.dequeue(b3,b2)};if(b1==="inprogress"){b1=bZ.shift()}if(b1){if(b2==="fx"){bZ.unshift("inprogress")}delete e.stop;b1.call(b3,b0,
 e)}if(!bZ.length&&e){e.empty.fire()}},_queueHooks:function(b0,bZ){var e=bZ+"queueHooks";return bG._data(b0,e)||bG._data(b0,e,{empty:bG.Callbacks("once memory").add(function(){bG.removeData(b0,bZ+"queue",true);bG.removeData(b0,e,true)})})}});bG.fn.extend({queue:function(e,bZ){var b0=2;if(typeof e!=="string"){bZ=e;e="fx";b0--}if(arguments.length<b0){return bG.queue(this[0],e)}return bZ===aB?this:this.each(function(){var b1=bG.queue(this,e,bZ);bG._queueHooks(this,e);if(e==="fx"&&b1[0]!=="inprogress"){bG.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){bG.dequeue(this,e)})},delay:function(bZ,e){bZ=bG.fx?bG.fx.speeds[bZ]||bZ:bZ;e=e||"fx";return this.queue(e,function(b1,b0){var b2=setTimeout(b1,bZ);b0.stop=function(){clearTimeout(b2)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(b0,b4){var bZ,b1=1,b5=bG.Deferred(),b3=this,e=this.length,b2=function(){if(!(--b1)){b5.resolveWith(b3,[b3])}};if(typeof b0!=="string"){b4=b0;b0=aB}b0=b0||"fx";while(
 e--){if((bZ=bG._data(b3[e],b0+"queueHooks"))&&bZ.empty){b1++;bZ.empty.add(b2)}}b2();return b5.promise(b4)}});var a7,bV,n,bJ=/[\t\r\n]/g,ai=/\r/g,j=/^(?:button|input)$/i,aA=/^(?:button|input|object|select|textarea)$/i,E=/^a(?:rea|)$/i,M=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,bL=bG.support.getSetAttribute;bG.fn.extend({attr:function(e,bZ){return bG.access(this,bG.attr,e,bZ,arguments.length>1)},removeAttr:function(e){return this.each(function(){bG.removeAttr(this,e)})},prop:function(e,bZ){return bG.access(this,bG.prop,e,bZ,arguments.length>1)},removeProp:function(e){e=bG.propFix[e]||e;return this.each(function(){try{this[e]=aB;delete this[e]}catch(bZ){}})},addClass:function(b2){var b4,b0,bZ,b1,b3,b5,e;if(bG.isFunction(b2)){return this.each(function(b6){bG(this).addClass(b2.call(this,b6,this.className))})}if(b2&&typeof b2==="string"){b4=b2.split(aV);for(b0=0,bZ=this.length;b0<bZ;b0++){b1=this[b0];if(b
 1.nodeType===1){if(!b1.className&&b4.length===1){b1.className=b2}else{b3=" "+b1.className+" ";for(b5=0,e=b4.length;b5<e;b5++){if(!~b3.indexOf(" "+b4[b5]+" ")){b3+=b4[b5]+" "}}b1.className=bG.trim(b3)}}}}return this},removeClass:function(b4){var b1,b2,b3,b5,bZ,b0,e;if(bG.isFunction(b4)){return this.each(function(b6){bG(this).removeClass(b4.call(this,b6,this.className))})}if((b4&&typeof b4==="string")||b4===aB){b1=(b4||"").split(aV);for(b0=0,e=this.length;b0<e;b0++){b3=this[b0];if(b3.nodeType===1&&b3.className){b2=(" "+b3.className+" ").replace(bJ," ");for(b5=0,bZ=b1.length;b5<bZ;b5++){while(b2.indexOf(" "+b1[b5]+" ")>-1){b2=b2.replace(" "+b1[b5]+" "," ")}}b3.className=b4?bG.trim(b2):""}}}return this},toggleClass:function(b1,bZ){var b0=typeof b1,e=typeof bZ==="boolean";if(bG.isFunction(b1)){return this.each(function(b2){bG(this).toggleClass(b1.call(this,b2,this.className,bZ),bZ)})}return this.each(function(){if(b0==="string"){var b4,b3=0,b2=bG(this),b5=bZ,b6=b1.split(aV);while((b4=b6[
 b3++])){b5=e?b5:!b2.hasClass(b4);b2[b5?"addClass":"removeClass"](b4)}}else{if(b0==="undefined"||b0==="boolean"){if(this.className){bG._data(this,"__className__",this.className)}this.className=this.className||b1===false?"":bG._data(this,"__className__")||""}}})},hasClass:function(e){var b1=" "+e+" ",b0=0,bZ=this.length;for(;b0<bZ;b0++){if(this[b0].nodeType===1&&(" "+this[b0].className+" ").replace(bJ," ").indexOf(b1)>-1){return true}}return false},val:function(b1){var e,bZ,b2,b0=this[0];if(!arguments.length){if(b0){e=bG.valHooks[b0.type]||bG.valHooks[b0.nodeName.toLowerCase()];if(e&&"get" in e&&(bZ=e.get(b0,"value"))!==aB){return bZ}bZ=b0.value;return typeof bZ==="string"?bZ.replace(ai,""):bZ==null?"":bZ}return}b2=bG.isFunction(b1);return this.each(function(b4){var b5,b3=bG(this);if(this.nodeType!==1){return}if(b2){b5=b1.call(this,b4,b3.val())}else{b5=b1}if(b5==null){b5=""}else{if(typeof b5==="number"){b5+=""}else{if(bG.isArray(b5)){b5=bG.map(b5,function(b6){return b6==null?"":b6+""}
 )}}}e=bG.valHooks[this.type]||bG.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b5,"value")===aB){this.value=b5}})}});bG.extend({valHooks:{option:{get:function(e){var bZ=e.attributes.value;return !bZ||bZ.specified?e.value:e.text}},select:{get:function(e){var b4,bZ,b3,b1,b2=e.selectedIndex,b5=[],b6=e.options,b0=e.type==="select-one";if(b2<0){return null}bZ=b0?b2:0;b3=b0?b2+1:b6.length;for(;bZ<b3;bZ++){b1=b6[bZ];if(b1.selected&&(bG.support.optDisabled?!b1.disabled:b1.getAttribute("disabled")===null)&&(!b1.parentNode.disabled||!bG.nodeName(b1.parentNode,"optgroup"))){b4=bG(b1).val();if(b0){return b4}b5.push(b4)}}if(b0&&!b5.length&&b6.length){return bG(b6[b2]).val()}return b5},set:function(bZ,b0){var e=bG.makeArray(b0);bG(bZ).find("option").each(function(){this.selected=bG.inArray(bG(this).val(),e)>=0});if(!e.length){bZ.selectedIndex=-1}return e}}},attrFn:{},attr:function(b4,b1,b5,b3){var b0,e,b2,bZ=b4.nodeType;if(!b4||bZ===3||bZ===8||bZ===2){return}if(b3&&bG.isF
 unction(bG.fn[b1])){return bG(b4)[b1](b5)}if(typeof b4.getAttribute==="undefined"){return bG.prop(b4,b1,b5)}b2=bZ!==1||!bG.isXMLDoc(b4);if(b2){b1=b1.toLowerCase();e=bG.attrHooks[b1]||(M.test(b1)?bV:a7)}if(b5!==aB){if(b5===null){bG.removeAttr(b4,b1);return}else{if(e&&"set" in e&&b2&&(b0=e.set(b4,b5,b1))!==aB){return b0}else{b4.setAttribute(b1,""+b5);return b5}}}else{if(e&&"get" in e&&b2&&(b0=e.get(b4,b1))!==null){return b0}else{b0=b4.getAttribute(b1);return b0===null?aB:b0}}},removeAttr:function(b1,b3){var b2,b4,bZ,e,b0=0;if(b3&&b1.nodeType===1){b4=b3.split(aV);for(;b0<b4.length;b0++){bZ=b4[b0];if(bZ){b2=bG.propFix[bZ]||bZ;e=M.test(bZ);if(!e){bG.attr(b1,bZ,"")}b1.removeAttribute(bL?bZ:b2);if(e&&b2 in b1){b1[b2]=false}}}}},attrHooks:{type:{set:function(e,bZ){if(j.test(e.nodeName)&&e.parentNode){bG.error("type property can't be changed")}else{if(!bG.support.radioValue&&bZ==="radio"&&bG.nodeName(e,"input")){var b0=e.value;e.setAttribute("type",bZ);if(b0){e.value=b0}return bZ}}}},value:{
 get:function(bZ,e){if(a7&&bG.nodeName(bZ,"button")){return a7.get(bZ,e)}return e in bZ?bZ.value:null},set:function(bZ,b0,e){if(a7&&bG.nodeName(bZ,"button")){return a7.set(bZ,b0,e)}bZ.value=b0}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(b3,b1,b4){var b0,e,b2,bZ=b3.nodeType;if(!b3||bZ===3||bZ===8||bZ===2){return}b2=bZ!==1||!bG.isXMLDoc(b3);if(b2){b1=bG.propFix[b1]||b1;e=bG.propHooks[b1]}if(b4!==aB){if(e&&"set" in e&&(b0=e.set(b3,b4,b1))!==aB){return b0}else{return(b3[b1]=b4)}}else{if(e&&"get" in e&&(b0=e.get(b3,b1))!==null){return b0}else{return b3[b1]}}},propHooks:{tabIndex:{get:function(bZ){var e=bZ.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):aA.test(bZ.nodeName)||E.test(bZ.nodeName)&&bZ.href?0:aB}}}});bV={get:func
 tion(bZ,e){var b1,b0=bG.prop(bZ,e);return b0===true||typeof b0!=="boolean"&&(b1=bZ.getAttributeNode(e))&&b1.nodeValue!==false?e.toLowerCase():aB},set:function(bZ,b1,e){var b0;if(b1===false){bG.removeAttr(bZ,e)}else{b0=bG.propFix[e]||e;if(b0 in bZ){bZ[b0]=true}bZ.setAttribute(e,e.toLowerCase())}return e}};if(!bL){n={name:true,id:true,coords:true};a7=bG.valHooks.button={get:function(b0,bZ){var e;e=b0.getAttributeNode(bZ);return e&&(n[bZ]?e.value!=="":e.specified)?e.value:aB},set:function(b0,b1,bZ){var e=b0.getAttributeNode(bZ);if(!e){e=o.createAttribute(bZ);b0.setAttributeNode(e)}return(e.value=b1+"")}};bG.each(["width","height"],function(bZ,e){bG.attrHooks[e]=bG.extend(bG.attrHooks[e],{set:function(b0,b1){if(b1===""){b0.setAttribute(e,"auto");return b1}}})});bG.attrHooks.contenteditable={get:a7.get,set:function(bZ,b0,e){if(b0===""){b0="false"}a7.set(bZ,b0,e)}}}if(!bG.support.hrefNormalized){bG.each(["href","src","width","height"],function(bZ,e){bG.attrHooks[e]=bG.extend(bG.attrHooks[
 e],{get:function(b1){var b0=b1.getAttribute(e,2);return b0===null?aB:b0}})})}if(!bG.support.style){bG.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||aB},set:function(e,bZ){return(e.style.cssText=""+bZ)}}}if(!bG.support.optSelected){bG.propHooks.selected=bG.extend(bG.propHooks.selected,{get:function(bZ){var e=bZ.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!bG.support.enctype){bG.propFix.enctype="encoding"}if(!bG.support.checkOn){bG.each(["radio","checkbox"],function(){bG.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}bG.each(["radio","checkbox"],function(){bG.valHooks[this]=bG.extend(bG.valHooks[this],{set:function(e,bZ){if(bG.isArray(bZ)){return(e.checked=bG.inArray(bG(e).val(),bZ)>=0)}}})});var bE=/^(?:textarea|input|select)$/i,br=/^([^\.]*|)(?:\.(.+)|)$/,ba=/(?:^|\s)hover(\.\S+|)\b/,a3=/^key/,bK=/^(?:mouse|contextmenu)|click/,by=/^(?:focusinfocus|focusoutblur)$/,aq=f
 unction(e){return bG.event.special.hover?e:e.replace(ba,"mouseenter$1 mouseleave$1")};bG.event={add:function(b1,b5,cc,b3,b2){var b6,b4,cd,cb,ca,b8,e,b9,bZ,b0,b7;if(b1.nodeType===3||b1.nodeType===8||!b5||!cc||!(b6=bG._data(b1))){return}if(cc.handler){bZ=cc;cc=bZ.handler;b2=bZ.selector}if(!cc.guid){cc.guid=bG.guid++}cd=b6.events;if(!cd){b6.events=cd={}}b4=b6.handle;if(!b4){b6.handle=b4=function(ce){return typeof bG!=="undefined"&&(!ce||bG.event.triggered!==ce.type)?bG.event.dispatch.apply(b4.elem,arguments):aB};b4.elem=b1}b5=bG.trim(aq(b5)).split(" ");for(cb=0;cb<b5.length;cb++){ca=br.exec(b5[cb])||[];b8=ca[1];e=(ca[2]||"").split(".").sort();b7=bG.event.special[b8]||{};b8=(b2?b7.delegateType:b7.bindType)||b8;b7=bG.event.special[b8]||{};b9=bG.extend({type:b8,origType:ca[1],data:b3,handler:cc,guid:cc.guid,selector:b2,namespace:e.join(".")},bZ);b0=cd[b8];if(!b0){b0=cd[b8]=[];b0.delegateCount=0;if(!b7.setup||b7.setup.call(b1,b3,e,b4)===false){if(b1.addEventListener){b1.addEventListener(b8
 ,b4,false)}else{if(b1.attachEvent){b1.attachEvent("on"+b8,b4)}}}}if(b7.add){b7.add.call(b1,b9);if(!b9.handler.guid){b9.handler.guid=cc.guid}}if(b2){b0.splice(b0.delegateCount++,0,b9)}else{b0.push(b9)}bG.event.global[b8]=true}b1=null},global:{},remove:function(b1,b6,cc,b2,b5){var cd,ce,b9,b0,bZ,b3,b4,cb,b8,e,ca,b7=bG.hasData(b1)&&bG._data(b1);if(!b7||!(cb=b7.events)){return}b6=bG.trim(aq(b6||"")).split(" ");for(cd=0;cd<b6.length;cd++){ce=br.exec(b6[cd])||[];b9=b0=ce[1];bZ=ce[2];if(!b9){for(b9 in cb){bG.event.remove(b1,b9+b6[cd],cc,b2,true)}continue}b8=bG.event.special[b9]||{};b9=(b2?b8.delegateType:b8.bindType)||b9;e=cb[b9]||[];b3=e.length;bZ=bZ?new RegExp("(^|\\.)"+bZ.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(b4=0;b4<e.length;b4++){ca=e[b4];if((b5||b0===ca.origType)&&(!cc||cc.guid===ca.guid)&&(!bZ||bZ.test(ca.namespace))&&(!b2||b2===ca.selector||b2==="**"&&ca.selector)){e.splice(b4--,1);if(ca.selector){e.delegateCount--}if(b8.remove){b8.remove.call(b1,ca)}}}if(e.le
 ngth===0&&b3!==e.length){if(!b8.teardown||b8.teardown.call(b1,bZ,b7.handle)===false){bG.removeEvent(b1,b9,b7.handle)}delete cb[b9]}}if(bG.isEmptyObject(cb)){delete b7.handle;bG.removeData(b1,"events",true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bZ,b6,b4,cd){if(b4&&(b4.nodeType===3||b4.nodeType===8)){return}var e,b1,b7,cb,b3,b2,b9,b8,b5,cc,ca=bZ.type||bZ,b0=[];if(by.test(ca+bG.event.triggered)){return}if(ca.indexOf("!")>=0){ca=ca.slice(0,-1);b1=true}if(ca.indexOf(".")>=0){b0=ca.split(".");ca=b0.shift();b0.sort()}if((!b4||bG.event.customEvent[ca])&&!bG.event.global[ca]){return}bZ=typeof bZ==="object"?bZ[bG.expando]?bZ:new bG.Event(ca,bZ):new bG.Event(ca);bZ.type=ca;bZ.isTrigger=true;bZ.exclusive=b1;bZ.namespace=b0.join(".");bZ.namespace_re=bZ.namespace?new RegExp("(^|\\.)"+b0.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b2=ca.indexOf(":")<0?"on"+ca:"";if(!b4){e=bG.cache;for(b7 in e){if(e[b7].events&&e[b7].events[ca]){bG.event.trigger(bZ,b6,e[b7].handle.ele
 m,true)}}return}bZ.result=aB;if(!bZ.target){bZ.target=b4}b6=b6!=null?bG.makeArray(b6):[];b6.unshift(bZ);b9=bG.event.special[ca]||{};if(b9.trigger&&b9.trigger.apply(b4,b6)===false){return}b5=[[b4,b9.bindType||ca]];if(!cd&&!b9.noBubble&&!bG.isWindow(b4)){cc=b9.delegateType||ca;cb=by.test(cc+ca)?b4:b4.parentNode;for(b3=b4;cb;cb=cb.parentNode){b5.push([cb,cc]);b3=cb}if(b3===(b4.ownerDocument||o)){b5.push([b3.defaultView||b3.parentWindow||a2,cc])}}for(b7=0;b7<b5.length&&!bZ.isPropagationStopped();b7++){cb=b5[b7][0];bZ.type=b5[b7][1];b8=(bG._data(cb,"events")||{})[bZ.type]&&bG._data(cb,"handle");if(b8){b8.apply(cb,b6)}b8=b2&&cb[b2];if(b8&&bG.acceptData(cb)&&b8.apply(cb,b6)===false){bZ.preventDefault()}}bZ.type=ca;if(!cd&&!bZ.isDefaultPrevented()){if((!b9._default||b9._default.apply(b4.ownerDocument,b6)===false)&&!(ca==="click"&&bG.nodeName(b4,"a"))&&bG.acceptData(b4)){if(b2&&b4[ca]&&((ca!=="focus"&&ca!=="blur")||bZ.target.offsetWidth!==0)&&!bG.isWindow(b4)){b3=b4[b2];if(b3){b4[b2]=null}bG
 .event.triggered=ca;b4[ca]();bG.event.triggered=aB;if(b3){b4[b2]=b3}}}}return bZ.result},dispatch:function(cb){cb=bG.event.fix(cb||a2.event);var cd,ca,b2,b4,ce,cc,b5,b0,e,b9,cf,b7=((bG._data(this,"events")||{})[cb.type]||[]),b6=b7.delegateCount,b1=[].slice.call(arguments),b8=!cb.exclusive&&!cb.namespace,b3=bG.event.special[cb.type]||{},bZ=[];b1[0]=cb;cb.delegateTarget=this;if(b3.preDispatch&&b3.preDispatch.call(this,cb)===false){return}if(b6&&!(cb.button&&cb.type==="click")){b4=bG(this);b4.context=this;for(b2=cb.target;b2!=this;b2=b2.parentNode||this){if(b2.disabled!==true||cb.type!=="click"){cc={};b0=[];b4[0]=b2;for(cd=0;cd<b6;cd++){e=b7[cd];b9=e.selector;if(cc[b9]===aB){cc[b9]=b4.is(b9)}if(cc[b9]){b0.push(e)}}if(b0.length){bZ.push({elem:b2,matches:b0})}}}}if(b7.length>b6){bZ.push({elem:this,matches:b7.slice(b6)})}for(cd=0;cd<bZ.length&&!cb.isPropagationStopped();cd++){b5=bZ[cd];cb.currentTarget=b5.elem;for(ca=0;ca<b5.matches.length&&!cb.isImmediatePropagationStopped();ca++){e=b5.m
 atches[ca];if(b8||(!cb.namespace&&!e.namespace)||cb.namespace_re&&cb.namespace_re.test(e.namespace)){cb.data=e.data;cb.handleObj=e;ce=((bG.event.special[e.origType]||{}).handle||e.handler).apply(b5.elem,b1);if(ce!==aB){cb.result=ce;if(ce===false){cb.preventDefault();cb.stopPropagation()}}}}}if(b3.postDispatch){b3.postDispatch.call(this,cb)}return cb.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bZ,e){if(bZ.which==null){bZ.which=e.charCode!=null?e.charCode:e.keyCode}return bZ}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(b1,b0){var b2,b3,e,bZ=b0.button,b4=b0.fromElement;if(b1.pageX==null&&b0.clientX!=null){b2=b1.target.ownerDocument||o;b3=b2.documentElement;e=b2.bo
 dy;b1.pageX=b0.clientX+(b3&&b3.scrollLeft||e&&e.scrollLeft||0)-(b3&&b3.clientLeft||e&&e.clientLeft||0);b1.pageY=b0.clientY+(b3&&b3.scrollTop||e&&e.scrollTop||0)-(b3&&b3.clientTop||e&&e.clientTop||0)}if(!b1.relatedTarget&&b4){b1.relatedTarget=b4===b1.target?b0.toElement:b4}if(!b1.which&&bZ!==aB){b1.which=(bZ&1?1:(bZ&2?3:(bZ&4?2:0)))}return b1}},fix:function(b0){if(b0[bG.expando]){return b0}var bZ,b3,e=b0,b1=bG.event.fixHooks[b0.type]||{},b2=b1.props?this.props.concat(b1.props):this.props;b0=bG.Event(e);for(bZ=b2.length;bZ;){b3=b2[--bZ];b0[b3]=e[b3]}if(!b0.target){b0.target=e.srcElement||o}if(b0.target.nodeType===3){b0.target=b0.target.parentNode}b0.metaKey=!!b0.metaKey;return b1.filter?b1.filter(b0,e):b0},special:{ready:{setup:bG.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(b0,bZ,e){if(bG.isWindow(this)){this.onbeforeunload=e}},teardown:function(bZ,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}
 ,simulate:function(b0,b2,b1,bZ){var b3=bG.extend(new bG.Event(),b1,{type:b0,isSimulated:true,originalEvent:{}});if(bZ){bG.event.trigger(b3,null,b2)}else{bG.event.dispatch.call(b2,b3)}if(b3.isDefaultPrevented()){b1.preventDefault()}}};bG.event.handle=bG.event.dispatch;bG.removeEvent=o.removeEventListener?function(bZ,e,b0){if(bZ.removeEventListener){bZ.removeEventListener(e,b0,false)}}:function(b0,bZ,b1){var e="on"+bZ;if(b0.detachEvent){if(typeof b0[e]==="undefined"){b0[e]=null}b0.detachEvent(e,b1)}};bG.Event=function(bZ,e){if(!(this instanceof bG.Event)){return new bG.Event(bZ,e)}if(bZ&&bZ.type){this.originalEvent=bZ;this.type=bZ.type;this.isDefaultPrevented=(bZ.defaultPrevented||bZ.returnValue===false||bZ.getPreventDefault&&bZ.getPreventDefault())?R:X}else{this.type=bZ}if(e){bG.extend(this,e)}this.timeStamp=bZ&&bZ.timeStamp||bG.now();this[bG.expando]=true};function X(){return false}function R(){return true}bG.Event.prototype={preventDefault:function(){this.isDefaultPrevented=R;var b
 Z=this.originalEvent;if(!bZ){return}if(bZ.preventDefault){bZ.preventDefault()}else{bZ.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=R;var bZ=this.originalEvent;if(!bZ){return}if(bZ.stopPropagation){bZ.stopPropagation()}bZ.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=R;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};bG.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bZ,e){bG.event.special[bZ]={delegateType:e,bindType:e,handle:function(b3){var b1,b5=this,b4=b3.relatedTarget,b2=b3.handleObj,b0=b2.selector;if(!b4||(b4!==b5&&!bG.contains(b5,b4))){b3.type=b2.origType;b1=b2.handler.apply(this,arguments);b3.type=e}return b1}}});if(!bG.support.submitBubbles){bG.event.special.submit={setup:function(){if(bG.nodeName(this,"form")){return false}bG.event.add(this,"click._submit keypress._submit",function(b1){var b0=b1.target,bZ=bG.nodeName(b0,"input")||bG.nodeN
 ame(b0,"button")?b0.form:aB;if(bZ&&!bG._data(bZ,"_submit_attached")){bG.event.add(bZ,"submit._submit",function(e){e._submit_bubble=true});bG._data(bZ,"_submit_attached",true)}})},postDispatch:function(e){if(e._submit_bubble){delete e._submit_bubble;if(this.parentNode&&!e.isTrigger){bG.event.simulate("submit",this.parentNode,e,true)}}},teardown:function(){if(bG.nodeName(this,"form")){return false}bG.event.remove(this,"._submit")}}}if(!bG.support.changeBubbles){bG.event.special.change={setup:function(){if(bE.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){bG.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});bG.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false}bG.event.simulate("change",this,e,true)})}return false}bG.event.add(this,"beforeactivate._change",function(b0){var bZ=b0.target;if(bE.test(bZ.nodeName)&&!bG._data(bZ,"_change_attach
 ed")){bG.event.add(bZ,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){bG.event.simulate("change",this.parentNode,e,true)}});bG._data(bZ,"_change_attached",true)}})},handle:function(bZ){var e=bZ.target;if(this!==e||bZ.isSimulated||bZ.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bZ.handleObj.handler.apply(this,arguments)}},teardown:function(){bG.event.remove(this,"._change");return bE.test(this.nodeName)}}}if(!bG.support.focusinBubbles){bG.each({focus:"focusin",blur:"focusout"},function(b1,e){var bZ=0,b0=function(b2){bG.event.simulate(e,b2.target,bG.event.fix(b2),true)};bG.event.special[e]={setup:function(){if(bZ++===0){o.addEventListener(b1,b0,true)}},teardown:function(){if(--bZ===0){o.removeEventListener(b1,b0,true)}}}})}bG.fn.extend({on:function(b0,e,b3,b2,bZ){var b4,b1;if(typeof b0==="object"){if(typeof e!=="string"){b3=b3||e;e=aB}for(b1 in b0){this.on(b1,e,b3,b0[b1],bZ)}return this}if(b3==null&&b2==null){b2=e;b3=e=aB}else{if(b2==null){
 if(typeof e==="string"){b2=b3;b3=aB}else{b2=b3;b3=e;e=aB}}}if(b2===false){b2=X}else{if(!b2){return this}}if(bZ===1){b4=b2;b2=function(b5){bG().off(b5);return b4.apply(this,arguments)};b2.guid=b4.guid||(b4.guid=bG.guid++)}return this.each(function(){bG.event.add(this,b0,b2,b3,e)})},one:function(bZ,e,b1,b0){return this.on(bZ,e,b1,b0,1)},off:function(b0,e,b2){var bZ,b1;if(b0&&b0.preventDefault&&b0.handleObj){bZ=b0.handleObj;bG(b0.delegateTarget).off(bZ.namespace?bZ.origType+"."+bZ.namespace:bZ.origType,bZ.selector,bZ.handler);return this}if(typeof b0==="object"){for(b1 in b0){this.off(b1,e,b0[b1])}return this}if(e===false||typeof e==="function"){b2=e;e=aB}if(b2===false){b2=X}return this.each(function(){bG.event.remove(this,b0,b2,e)})},bind:function(e,b0,bZ){return this.on(e,null,b0,bZ)},unbind:function(e,bZ){return this.off(e,null,bZ)},live:function(e,b0,bZ){bG(this.context).on(e,this.selector,b0,bZ);return this},die:function(e,bZ){bG(this.context).off(e,this.selector||"**",bZ);return 
 this},delegate:function(e,bZ,b1,b0){return this.on(bZ,e,b1,b0)},undelegate:function(e,bZ,b0){return arguments.length==1?this.off(e,"**"):this.off(bZ,e||"**",b0)},trigger:function(e,bZ){return this.each(function(){bG.event.trigger(e,bZ,this)})},triggerHandler:function(e,bZ){if(this[0]){return bG.event.trigger(e,bZ,this[0],true)}},toggle:function(b1){var bZ=arguments,e=b1.guid||bG.guid++,b0=0,b2=function(b3){var b4=(bG._data(this,"lastToggle"+b1.guid)||0)%b0;bG._data(this,"lastToggle"+b1.guid,b4+1);b3.preventDefault();return bZ[b4].apply(this,arguments)||false};b2.guid=e;while(b0<bZ.length){bZ[b0++].guid=e}return this.click(b2)},hover:function(e,bZ){return this.mouseenter(e).mouseleave(bZ||e)}});bG.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(bZ,e){bG.fn[e]=function(b1,b0){if(b0==null){b0=b1;b1=null}retu
 rn arguments.length>0?this.on(e,null,b1,b0):this.trigger(e)};if(a3.test(e)){bG.event.fixHooks[e]=bG.event.keyHooks}if(bK.test(e)){bG.event.fixHooks[e]=bG.event.mouseHooks}});
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2012 jQuery Foundation and other contributors
+ *  Released under the MIT license
+ *  http://sizzlejs.com/
+ */
+(function(cO,cg){var cT,co,cf,b2,b8,b6=cO.document,b9=b6.documentElement,cw="undefined",ca=false,b7=true,ce=0,cj=[].slice,cS=[].push,cW=("sizcache"+Math.random()).replace(".",""),cz="[\\x20\\t\\r\\n\\f]",ci="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",ch=ci.replace("w","w#"),c1="([*^$|!~]?=)",cL="\\["+cz+"*("+ci+")"+cz+"*(?:"+c1+cz+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ch+")|)|)"+cz+"*\\]",c2=":("+ci+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",cB=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",cd=cz+"*([\\x20\\t\\r\\n\\f>+~])"+cz+"*",cc="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+cL+"|"+c2.replace(2,7)+"|[^\\\\(),])+",cU=new RegExp("^"+cz+"+|((?:^|[^\\\\])(?:\\\\.)*)"+cz+"+$","g"),cF=new RegExp("^"+cd),ct=new RegExp(cc+"?(?="+cz+"*,|$)","g"),cJ=new RegExp("^(?:(?!,)(?:(?:^|,)"+cz+"*"+cc+")*?|"+cz+"*(.*?))(\\)|$)"),cZ=new RegExp(cc.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+cd,"g"),cK=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,c
 P=/[\x20\t\r\n\f]*[+~]/,cX=/:not\($/,cp=/h\d/i,cM=/input|select|textarea|button/i,cs=/\\(?!\\)/g,cE={ID:new RegExp("^#("+ci+")"),CLASS:new RegExp("^\\.("+ci+")"),NAME:new RegExp("^\\[name=['\"]?("+ci+")['\"]?\\]"),TAG:new RegExp("^("+ci.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+cL),PSEUDO:new RegExp("^"+c2),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+cz+"*(even|odd|(([+-]|)(\\d*)n|)"+cz+"*(?:([+-]|)"+cz+"*(\\d+)|))"+cz+"*\\)|)","i"),POS:new RegExp(cB,"ig"),needsContext:new RegExp("^"+cz+"*[>+~]|"+cB,"i")},cR={},cq=[],cl={},cu=[],cY=function(e){e.sizzleFilter=true;return e},b3=function(e){return function(c3){return c3.nodeName.toLowerCase()==="input"&&c3.type===e}},cr=function(e){return function(c4){var c3=c4.nodeName.toLowerCase();return(c3==="input"||c3==="button")&&c4.type===e}},cH=function(c3){var c4=false,c6=b6.createElement("div");try{c4=c3(c6)}catch(c5){}c6=null;return c4},cn=cH(function(c3){c3.innerHTML="<select></select>";var e=typeof c3.lastChild.getAttribut
 e("multiple");return e!=="boolean"&&e!=="string"}),b0=cH(function(c3){c3.id=cW+0;c3.innerHTML="<a name='"+cW+"'></a><div name='"+cW+"'></div>";b9.insertBefore(c3,b9.firstChild);var e=b6.getElementsByName&&b6.getElementsByName(cW).length===2+b6.getElementsByName(cW+0).length;b8=!b6.getElementById(cW);b9.removeChild(c3);return e}),b5=cH(function(e){e.appendChild(b6.createComment(""));return e.getElementsByTagName("*").length===0}),cD=cH(function(e){e.innerHTML="<a href='#'></a>";return e.firstChild&&typeof e.firstChild.getAttribute!==cw&&e.firstChild.getAttribute("href")==="#"}),cC=cH(function(e){e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return false}e.lastChild.className="e";return e.getElementsByClassName("e").length!==1});var cN=function(c5,e,c7,da){c7=c7||[];e=e||b6;var c8,c3,c9,c4,c6=e.nodeType;if(c6!==1&&c6!==9){return[]}if(!c5||typeof c5!=="string"){return c7}c9=ck(e);if(!c9&&!da)
 {if((c8=cK.exec(c5))){if((c4=c8[1])){if(c6===9){c3=e.getElementById(c4);if(c3&&c3.parentNode){if(c3.id===c4){c7.push(c3);return c7}}else{return c7}}else{if(e.ownerDocument&&(c3=e.ownerDocument.getElementById(c4))&&cA(e,c3)&&c3.id===c4){c7.push(c3);return c7}}}else{if(c8[2]){cS.apply(c7,cj.call(e.getElementsByTagName(c5),0));return c7}else{if((c4=c8[3])&&cC&&e.getElementsByClassName){cS.apply(c7,cj.call(e.getElementsByClassName(c4),0));return c7}}}}}return cV(c5,e,c7,da,c9)};var cG=cN.selectors={cacheLength:50,match:cE,order:["ID","TAG"],attrHandle:{},createPseudo:cY,find:{ID:b8?function(c5,c4,c3){if(typeof c4.getElementById!==cw&&!c3){var e=c4.getElementById(c5);return e&&e.parentNode?[e]:[]}}:function(c5,c4,c3){if(typeof c4.getElementById!==cw&&!c3){var e=c4.getElementById(c5);return e?e.id===c5||typeof e.getAttributeNode!==cw&&e.getAttributeNode("id").value===c5?[e]:cg:[]}},TAG:b5?function(e,c3){if(typeof c3.getElementsByTagName!==cw){return c3.getElementsByTagName(e)}}:function(e
 ,c6){var c5=c6.getElementsByTagName(e);if(e==="*"){var c7,c4=[],c3=0;for(;(c7=c5[c3]);c3++){if(c7.nodeType===1){c4.push(c7)}}return c4}return c5}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(cs,"");e[3]=(e[4]||e[5]||"").replace(cs,"");if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1]==="nth"){if(!e[2]){cN.error(e[0])}e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd"));e[4]=+((e[6]+e[7])||e[2]==="odd")}else{if(e[2]){cN.error(e[0])}}return e},PSEUDO:function(e){var c3,c4=e[4];if(cE.CHILD.test(e[0])){return null}if(c4&&(c3=cJ.exec(c4))&&c3.pop()){e[0]=e[0].slice(0,c3[0].length-c4.length-1);c4=c3[0].slice(0,-1)}e.splice(2,3,c4||e[3]);return e}},filter:{ID:b8?function(e){e=e.replace(cs,"");return function(c3){return c3.getAttribute("id")===e}}:function(e){e=e.replace(cs,"");return function(c
 4){var c3=typeof c4.getAttributeNode!==cw&&c4.getAttributeNode("id");return c3&&c3.value===e}},TAG:function(e){if(e==="*"){return function(){return true}}e=e.replace(cs,"").toLowerCase();return function(c3){return c3.nodeName&&c3.nodeName.toLowerCase()===e}},CLASS:function(e){var c3=cR[e];if(!c3){c3=cR[e]=new RegExp("(^|"+cz+")"+e+"("+cz+"|$)");cq.push(e);if(cq.length>cG.cacheLength){delete cR[cq.shift()]}}return function(c4){return c3.test(c4.className||(typeof c4.getAttribute!==cw&&c4.getAttribute("class"))||"")}},ATTR:function(c4,c3,e){if(!c3){return function(c5){return cN.attr(c5,c4)!=null}}return function(c6){var c5=cN.attr(c6,c4),c7=c5+"";if(c5==null){return c3==="!="}switch(c3){case"=":return c7===e;case"!=":return c7!==e;case"^=":return e&&c7.indexOf(e)===0;case"*=":return e&&c7.indexOf(e)>-1;case"$=":return e&&c7.substr(c7.length-e.length)===e;case"~=":return(" "+c7+" ").indexOf(e)>-1;case"|=":return c7===e||c7.substr(0,e.length+1)===e+"-"}}},CHILD:function(c3,c5,c6,c4){if(
 c3==="nth"){var e=ce++;return function(da){var c7,db,c9=0,c8=da;if(c6===1&&c4===0){return true}c7=da.parentNode;if(c7&&(c7[cW]!==e||!da.sizset)){for(c8=c7.firstChild;c8;c8=c8.nextSibling){if(c8.nodeType===1){c8.sizset=++c9;if(c8===da){break}}}c7[cW]=e}db=da.sizset-c4;if(c6===0){return db===0}else{return(db%c6===0&&db/c6>=0)}}}return function(c8){var c7=c8;switch(c3){case"only":case"first":while((c7=c7.previousSibling)){if(c7.nodeType===1){return false}}if(c3==="first"){return true}c7=c8;case"last":while((c7=c7.nextSibling)){if(c7.nodeType===1){return false}}return true}}},PSEUDO:function(c6,c5,c3,e){var c4=cG.pseudos[c6]||cG.pseudos[c6.toLowerCase()];if(!c4){cN.error("unsupported pseudo: "+c6)}if(!c4.sizzleFilter){return c4}return c4(c5,c3,e)}},pseudos:{not:cY(function(e,c4,c3){var c5=cb(e.replace(cU,"$1"),c4,c3);return function(c6){return !c5(c6)}}),enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var c3=e.nodeName.to
 LowerCase();return(c3==="input"&&!!e.checked)||(c3==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !cG.pseudos.empty(e)},empty:function(c3){var e;c3=c3.firstChild;while(c3){if(c3.nodeName>"@"||(e=c3.nodeType)===3||e===4){return false}c3=c3.nextSibling}return true},contains:cY(function(e){return function(c3){return(c3.textContent||c3.innerText||bZ(c3)).indexOf(e)>-1}}),has:cY(function(e){return function(c3){return cN(e,c3).length>0}}),header:function(e){return cp.test(e.nodeName)},text:function(c4){var c3,e;return c4.nodeName.toLowerCase()==="input"&&(c3=c4.type)==="text"&&((e=c4.getAttribute("type"))==null||e.toLowerCase()===c3)},radio:b3("radio"),checkbox:b3("checkbox"),file:b3("file"),password:b3("password"),image:b3("image"),submit:cr("submit"),reset:cr("reset"),button:function(c3){var e=c3.nodeName.toLowerCase();return e==="input"&&c3.type==="button"||e==="button"},input:function(e){r
 eturn cM.test(e.nodeName)},focus:function(e){var c3=e.ownerDocument;return e===c3.activeElement&&(!c3.hasFocus||c3.hasFocus())&&!!(e.type||e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(c4,c3,e){return e?c4.slice(1):[c4[0]]},last:function(c5,c4,c3){var e=c5.pop();return c3?c5:[e]},even:function(c7,c6,c5){var c4=[],c3=c5?1:0,e=c7.length;for(;c3<e;c3=c3+2){c4.push(c7[c3])}return c4},odd:function(c7,c6,c5){var c4=[],c3=c5?0:1,e=c7.length;for(;c3<e;c3=c3+2){c4.push(c7[c3])}return c4},lt:function(c4,c3,e){return e?c4.slice(+c3):c4.slice(0,+c3)},gt:function(c4,c3,e){return e?c4.slice(0,+c3+1):c4.slice(+c3+1)},eq:function(c5,c4,c3){var e=c5.splice(+c4,1);return c3?c5:e}}};cG.setFilters.nth=cG.setFilters.eq;cG.filters=cG.pseudos;if(!cD){cG.attrHandle={href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}}}if(b0){cG.order.push("NAME");cG.find.NAME=function(e,c3){if(typeof c3.getElementsByName!==cw)
 {return c3.getElementsByName(e)}}}if(cC){cG.order.splice(1,0,"CLASS");cG.find.CLASS=function(c4,c3,e){if(typeof c3.getElementsByClassName!==cw&&!e){return c3.getElementsByClassName(c4)}}}try{cj.call(b9.childNodes,0)[0].nodeType}catch(c0){cj=function(c3){var c4,e=[];for(;(c4=this[c3]);c3++){e.push(c4)}return e}}var ck=cN.isXML=function(e){var c3=e&&(e.ownerDocument||e).documentElement;return c3?c3.nodeName!=="HTML":false};var cA=cN.contains=b9.compareDocumentPosition?function(c3,e){return !!(c3.compareDocumentPosition(e)&16)}:b9.contains?function(c3,e){var c5=c3.nodeType===9?c3.documentElement:c3,c4=e.parentNode;return c3===c4||!!(c4&&c4.nodeType===1&&c5.contains&&c5.contains(c4))}:function(c3,e){while((e=e.parentNode)){if(e===c3){return true}}return false};var bZ=cN.getText=function(c6){var c5,c3="",c4=0,e=c6.nodeType;if(e){if(e===1||e===9||e===11){if(typeof c6.textContent==="string"){return c6.textContent}else{for(c6=c6.firstChild;c6;c6=c6.nextSibling){c3+=bZ(c6)}}}else{if(e===3||e
 ===4){return c6.nodeValue}}}else{for(;(c5=c6[c4]);c4++){c3+=bZ(c5)}}return c3};cN.attr=function(c5,c4){var e,c3=ck(c5);if(!c3){c4=c4.toLowerCase()}if(cG.attrHandle[c4]){return cG.attrHandle[c4](c5)}if(cn||c3){return c5.getAttribute(c4)}e=c5.getAttributeNode(c4);return e?typeof c5[c4]==="boolean"?c5[c4]?c4:null:e.specified?e.value:null:null};cN.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};[0,0].sort(function(){return(b7=0)});if(b9.compareDocumentPosition){cf=function(c3,e){if(c3===e){ca=true;return 0}return(!c3.compareDocumentPosition||!e.compareDocumentPosition?c3.compareDocumentPosition:c3.compareDocumentPosition(e)&4)?-1:1}}else{cf=function(da,c9){if(da===c9){ca=true;return 0}else{if(da.sourceIndex&&c9.sourceIndex){return da.sourceIndex-c9.sourceIndex}}var c7,c3,c4=[],e=[],c6=da.parentNode,c8=c9.parentNode,db=c6;if(c6===c8){return b2(da,c9)}else{if(!c6){return -1}else{if(!c8){return 1}}}while(db){c4.unshift(db);db=db.parentNode}db=c8;while(db){e.
 unshift(db);db=db.parentNode}c7=c4.length;c3=e.length;for(var c5=0;c5<c7&&c5<c3;c5++){if(c4[c5]!==e[c5]){return b2(c4[c5],e[c5])}}return c5===c7?b2(da,e[c5],-1):b2(c4[c5],c9,1)};b2=function(c3,e,c4){if(c3===e){return c4}var c5=c3.nextSibling;while(c5){if(c5===e){return -1}c5=c5.nextSibling}return 1}}cN.uniqueSort=function(c3){var c4,e=1;if(cf){ca=b7;c3.sort(cf);if(ca){for(;(c4=c3[e]);e++){if(c4===c3[e-1]){c3.splice(e--,1)}}}}return c3};function cm(c3,c7,c6,c4){var c5=0,e=c7.length;for(;c5<e;c5++){cN(c3,c7[c5],c6,c4)}}function cI(e,c4,c8,c9,c3,c7){var c5,c6=cG.setFilters[c4.toLowerCase()];if(!c6){cN.error(c4)}if(e||!(c5=c3)){cm(e||"*",c9,(c5=[]),c3)}return c5.length>0?c6(c5,c8,c7):[]}function cQ(dc,e,da,c4,dg){var c7,c3,c6,di,c9,dh,db,df,dd=0,de=dg.length,c5=cE.POS,c8=new RegExp("^"+c5.source+"(?!"+cz+")","i"),dj=function(){var dl=1,dk=arguments.length-2;for(;dl<dk;dl++){if(arguments[dl]===cg){c7[dl]=cg}}};for(;dd<de;dd++){c5.exec("");dc=dg[dd];di=[];c6=0;c9=c4;while((c7=c5.exec(dc))
 ){df=c5.lastIndex=c7.index+c7[0].length;if(df>c6){db=dc.slice(c6,c7.index);c6=df;dh=[e];if(cF.test(db)){if(c9){dh=c9}c9=c4}if((c3=cX.test(db))){db=db.slice(0,-5).replace(cF,"$&*")}if(c7.length>1){c7[0].replace(c8,dj)}c9=cI(db,c7[1],c7[2],dh,c9,c3)}}if(c9){di=di.concat(c9);if((db=dc.slice(c6))&&db!==")"){if(cF.test(db)){cm(db,di,da,c4)}else{cN(db,e,da,c4?c4.concat(c9):c9)}}else{cS.apply(da,di)}}else{cN(dc,e,da,c4)}}return de===1?da:cN.uniqueSort(da)}function b1(c8,c4,db){var dd,dc,de,c6=[],c9=0,da=cJ.exec(c8),c3=!da.pop()&&!da.pop(),df=c3&&c8.match(ct)||[""],e=cG.preFilter,c5=cG.filter,c7=!db&&c4!==b6;for(;(dc=df[c9])!=null&&c3;c9++){c6.push(dd=[]);if(c7){dc=" "+dc}while(dc){c3=false;if((da=cF.exec(dc))){dc=dc.slice(da[0].length);c3=dd.push({part:da.pop().replace(cU," "),captures:da})}for(de in c5){if((da=cE[de].exec(dc))&&(!e[de]||(da=e[de](da,c4,db)))){dc=dc.slice(da.shift().length);c3=dd.push({part:de,captures:da})}}if(!c3){break}}}if(!c3){cN.error(c8)}return c6}function cx(c6,c5,
 c4){var e=c5.dir,c3=ce++;if(!c6){c6=function(c7){return c7===c4}}return c5.first?function(c8,c7){while((c8=c8[e])){if(c8.nodeType===1){return c6(c8,c7)&&c8}}}:function(c9,c8){var c7,da=c3+"."+co,db=da+"."+cT;while((c9=c9[e])){if(c9.nodeType===1){if((c7=c9[cW])===db){return c9.sizset}else{if(typeof c7==="string"&&c7.indexOf(da)===0){if(c9.sizset){return c9}}else{c9[cW]=db;if(c6(c9,c8)){c9.sizset=true;return c9}c9.sizset=false}}}}}}function cv(e,c3){return e?function(c6,c5){var c4=c3(c6,c5);return c4&&e(c4===true?c6:c4,c5)}:c3}function cy(c7,c5,e){var c4,c6,c3=0;for(;(c4=c7[c3]);c3++){if(cG.relative[c4.part]){c6=cx(c6,cG.relative[c4.part],c5)}else{c4.captures.push(c5,e);c6=cv(c6,cG.filter[c4.part].apply(null,c4.captures))}}return c6}function b4(e){return function(c5,c4){var c6,c3=0;for(;(c6=e[c3]);c3++){if(c6(c5,c4)){return true}}return false}}var cb=cN.compile=function(e,c5,c3){var c8,c7,c4,c6=cl[e];if(c6&&c6.context===c5){return c6}c7=b1(e,c5,c3);for(c4=0;(c8=c7[c4]);c4++){c7[c4]=cy
 (c8,c5,c3)}c6=cl[e]=b4(c7);c6.context=c5;c6.runs=c6.dirruns=0;cu.push(e);if(cu.length>cG.cacheLength){delete cl[cu.shift()]}return c6};cN.matches=function(c3,e){return cN(c3,null,null,e)};cN.matchesSelector=function(e,c3){return cN(c3,null,null,[e]).length>0};var cV=function(c6,c3,c8,dc,db){c6=c6.replace(cU,"$1");var e,dd,c9,de,c4,c5,dg,dh,c7,da=c6.match(ct),df=c6.match(cZ),di=c3.nodeType;if(cE.POS.test(c6)){return cQ(c6,c3,c8,dc,da)}if(dc){e=cj.call(dc,0)}else{if(da&&da.length===1){if(df.length>1&&di===9&&!db&&(da=cE.ID.exec(df[0]))){c3=cG.find.ID(da[1],c3,db)[0];if(!c3){return c8}c6=c6.slice(df.shift().length)}dh=((da=cP.exec(df[0]))&&!da.index&&c3.parentNode)||c3;c7=df.pop();c5=c7.split(":not")[0];for(c9=0,de=cG.order.length;c9<de;c9++){dg=cG.order[c9];if((da=cE[dg].exec(c5))){e=cG.find[dg]((da[1]||"").replace(cs,""),dh,db);if(e==null){continue}if(c5===c7){c6=c6.slice(0,c6.length-c7.length)+c5.replace(cE[dg],"");if(!c6){cS.apply(c8,cj.call(e,0))}}break}}}}if(c6){dd=cb(c6,c3,db);c
 o=dd.dirruns++;if(e==null){e=cG.find.TAG("*",(cP.test(c6)&&c3.parentNode)||c3)}for(c9=0;(c4=e[c9]);c9++){cT=dd.runs++;if(dd(c4,c3)){c8.push(c4)}}}return c8};if(b6.querySelectorAll){(function(){var c7,c8=cV,c6=/'|\\/g,c4=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,c3=[],e=[":active"],c5=b9.matchesSelector||b9.mozMatchesSelector||b9.webkitMatchesSelector||b9.oMatchesSelector||b9.msMatchesSelector;cH(function(c9){c9.innerHTML="<select><option selected></option></select>";if(!c9.querySelectorAll("[selected]").length){c3.push("\\["+cz+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!c9.querySelectorAll(":checked").length){c3.push(":checked")}});cH(function(c9){c9.innerHTML="<p test=''></p>";if(c9.querySelectorAll("[test^='']").length){c3.push("[*^$]="+cz+"*(?:\"\"|'')")}c9.innerHTML="<input type='hidden'>";if(!c9.querySelectorAll(":enabled").length){c3.push(":enabled",":disabled")}});c3=c3.length&&new RegExp(c3.join("|"));cV=function(de,da,df,dh,dg){if(!dh&&!dg&&(!
 c3||!c3.test(de))){if(da.nodeType===9){try{cS.apply(df,cj.call(da.querySelectorAll(de),0));return df}catch(dd){}}else{if(da.nodeType===1&&da.nodeName.toLowerCase()!=="object"){var dc=da.getAttribute("id"),c9=dc||cW,db=cP.test(de)&&da.parentNode||da;if(dc){c9=c9.replace(c6,"\\$&")}else{da.setAttribute("id",c9)}try{cS.apply(df,cj.call(db.querySelectorAll(de.replace(ct,"[id='"+c9+"'] $&")),0));return df}catch(dd){}finally{if(!dc){da.removeAttribute("id")}}}}}return c8(de,da,df,dh,dg)};if(c5){cH(function(da){c7=c5.call(da,"div");try{c5.call(da,"[test!='']:sizzle");e.push(cG.match.PSEUDO)}catch(c9){}});e=new RegExp(e.join("|"));cN.matchesSelector=function(da,dc){dc=dc.replace(c4,"='$1']");if(!ck(da)&&!e.test(dc)&&(!c3||!c3.test(dc))){try{var c9=c5.call(da,dc);if(c9||c7||da.document&&da.document.nodeType!==11){return c9}}catch(db){}}return cN(dc,null,null,[da]).length>0}}})()}cN.attr=bG.attr;bG.find=cN;bG.expr=cN.selectors;bG.expr[":"]=bG.expr.pseudos;bG.unique=cN.uniqueSort;bG.text=cN.ge
 tText;bG.isXMLDoc=cN.isXML;bG.contains=cN.contains})(a2);var ag=/Until$/,bq=/^(?:parents|prev(?:Until|All))/,al=/^.[^:#\[\.,]*$/,z=bG.expr.match.needsContext,bu={children:true,contents:true,next:true,prev:true};bG.fn.extend({find:function(e){var b2,bZ,b4,b5,b3,b1,b0=this;if(typeof e!=="string"){return bG(e).filter(function(){for(b2=0,bZ=b0.length;b2<bZ;b2++){if(bG.contains(b0[b2],this)){return true}}})}b1=this.pushStack("","find",e);for(b2=0,bZ=this.length;b2<bZ;b2++){b4=b1.length;bG.find(e,this[b2],b1);if(b2>0){for(b5=b4;b5<b1.length;b5++){for(b3=0;b3<b4;b3++){if(b1[b3]===b1[b5]){b1.splice(b5--,1);break}}}}}return b1},has:function(b1){var b0,bZ=bG(b1,this),e=bZ.length;return this.filter(function(){for(b0=0;b0<e;b0++){if(bG.contains(this,bZ[b0])){return true}}})},not:function(e){return this.pushStack(aM(this,e,false),"not",e)},filter:function(e){return this.pushStack(aM(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?z.test(e)?bG(e,this.context).index(this[
 0])>=0:bG.filter(e,this).length>0:this.filter(e).length>0)},closest:function(b2,b1){var b3,b0=0,e=this.length,bZ=[],b4=z.test(b2)||typeof b2!=="string"?bG(b2,b1||this.context):0;for(;b0<e;b0++){b3=this[b0];while(b3&&b3.ownerDocument&&b3!==b1&&b3.nodeType!==11){if(b4?b4.index(b3)>-1:bG.find.matchesSelector(b3,b2)){bZ.push(b3);break}b3=b3.parentNode}}bZ=bZ.length>1?bG.unique(bZ):bZ;return this.pushStack(bZ,"closest",b2)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return bG.inArray(this[0],bG(e))}return bG.inArray(e.jquery?e[0]:e,this)},add:function(e,bZ){var b1=typeof e==="string"?bG(e,bZ):bG.makeArray(e&&e.nodeType?[e]:e),b0=bG.merge(this.get(),b1);return this.pushStack(aR(b1[0])||aR(b0[0])?b0:bG.unique(b0))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});bG.fn.andSelf=bG.fn.addBack;function aR(e){return !e||!e.parentNode||e.parentNode.nodeType===11}function aY(bZ,e){do{bZ=bZ
 [e]}while(bZ&&bZ.nodeType!==1);return bZ}bG.each({parent:function(bZ){var e=bZ.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bG.dir(e,"parentNode")},parentsUntil:function(bZ,e,b0){return bG.dir(bZ,"parentNode",b0)},next:function(e){return aY(e,"nextSibling")},prev:function(e){return aY(e,"previousSibling")},nextAll:function(e){return bG.dir(e,"nextSibling")},prevAll:function(e){return bG.dir(e,"previousSibling")},nextUntil:function(bZ,e,b0){return bG.dir(bZ,"nextSibling",b0)},prevUntil:function(bZ,e,b0){return bG.dir(bZ,"previousSibling",b0)},siblings:function(e){return bG.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bG.sibling(e.firstChild)},contents:function(e){return bG.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bG.merge([],e.childNodes)}},function(e,bZ){bG.fn[e]=function(b2,b0){var b1=bG.map(this,bZ,b2);if(!ag.test(e)){b0=b2}if(b0&&typeof b0==="string"){b1=bG.filter(b0,b1)}b1=this.length>1&&!bu[e]?bG.unique
 (b1):b1;if(this.length>1&&bq.test(e)){b1=b1.reverse()}return this.pushStack(b1,e,a4.call(arguments).join(","))}});bG.extend({filter:function(b0,e,bZ){if(bZ){b0=":not("+b0+")"}return e.length===1?bG.find.matchesSelector(e[0],b0)?[e[0]]:[]:bG.find.matches(b0,e)},dir:function(b0,bZ,b2){var e=[],b1=b0[bZ];while(b1&&b1.nodeType!==9&&(b2===aB||b1.nodeType!==1||!bG(b1).is(b2))){if(b1.nodeType===1){e.push(b1)}b1=b1[bZ]}return e},sibling:function(b0,bZ){var e=[];for(;b0;b0=b0.nextSibling){if(b0.nodeType===1&&b0!==bZ){e.push(b0)}}return e}});function aM(b1,b0,e){b0=b0||0;if(bG.isFunction(b0)){return bG.grep(b1,function(b3,b2){var b4=!!b0.call(b3,b2,b3);return b4===e})}else{if(b0.nodeType){return bG.grep(b1,function(b3,b2){return(b3===b0)===e})}else{if(typeof b0==="string"){var bZ=bG.grep(b1,function(b2){return b2.nodeType===1});if(al.test(b0)){return bG.filter(b0,bZ,!e)}else{b0=bG.filter(b0,bZ)}}}}return bG.grep(b1,function(b3,b2){return(bG.inArray(b3,b0)>=0)===e})}function B(e){var b0=c.spli
 t("|"),bZ=e.createDocumentFragment();if(bZ.createElement){while(b0.length){bZ.createElement(b0.pop())}}return bZ}var c="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",av=/ jQuery\d+="(?:null|\d+)"/g,bY=/^\s+/,ay=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,p=/<([\w:]+)/,bT=/<tbody/i,J=/<|&#?\w+;/,aj=/<(?:script|style|link)/i,ap=/<(?:script|object|embed|option|style)/i,K=new RegExp("<(?:"+c+")[\\s/>]","i"),aE=/^(?:checkbox|radio)$/,bR=/checked\s*(?:[^=]|=\s*.checked.)/i,bw=/\/(java|ecma)script/i,aH=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,T={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_
 default:[0,"",""]},aQ=B(o),l=aQ.appendChild(o.createElement("div"));T.optgroup=T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;if(!bG.support.htmlSerialize){T._default=[1,"X<div>","</div>"]}bG.fn.extend({text:function(e){return bG.access(this,function(bZ){return bZ===aB?bG.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(bZ))},null,e,arguments.length)},wrapAll:function(e){if(bG.isFunction(e)){return this.each(function(b0){bG(this).wrapAll(e.call(this,b0))})}if(this[0]){var bZ=bG(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bZ.insertBefore(this[0])}bZ.map(function(){var b0=this;while(b0.firstChild&&b0.firstChild.nodeType===1){b0=b0.firstChild}return b0}).append(this)}return this},wrapInner:function(e){if(bG.isFunction(e)){return this.each(function(bZ){bG(this).wrapInner(e.call(this,bZ))})}return this.each(function(){var bZ=bG(this),b0=bZ.contents();if(b0.length){b0.wrapAll(e)}else{bZ.append(e)}})},wrap:function(e){
 var bZ=bG.isFunction(e);return this.each(function(b0){bG(this).wrapAll(bZ?e.call(this,b0):e)})},unwrap:function(){return this.parent().each(function(){if(!bG.nodeName(this,"body")){bG(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11){this.insertBefore(e,this.firstChild)}})},before:function(){if(!aR(this[0])){return this.domManip(arguments,false,function(bZ){this.parentNode.insertBefore(bZ,this)})}if(arguments.length){var e=bG.clean(arguments);return this.pushStack(bG.merge(e,this),"before",this.selector)}},after:function(){if(!aR(this[0])){return this.domManip(arguments,false,function(bZ){this.parentNode.insertBefore(bZ,this.nextSibling)})}if(arguments.length){var e=bG.clean(arguments);return this.pushStack(bG.merge(this,e),"after",this.selector)}},re
 move:function(e,b1){var b0,bZ=0;for(;(b0=this[bZ])!=null;bZ++){if(!e||bG.filter(e,[b0]).length){if(!b1&&b0.nodeType===1){bG.cleanData(b0.getElementsByTagName("*"));bG.cleanData([b0])}if(b0.parentNode){b0.parentNode.removeChild(b0)}}}return this},empty:function(){var bZ,e=0;for(;(bZ=this[e])!=null;e++){if(bZ.nodeType===1){bG.cleanData(bZ.getElementsByTagName("*"))}while(bZ.firstChild){bZ.removeChild(bZ.firstChild)}}return this},clone:function(bZ,e){bZ=bZ==null?false:bZ;e=e==null?bZ:e;return this.map(function(){return bG.clone(this,bZ,e)})},html:function(e){return bG.access(this,function(b2){var b1=this[0]||{},b0=0,bZ=this.length;if(b2===aB){return b1.nodeType===1?b1.innerHTML.replace(av,""):aB}if(typeof b2==="string"&&!aj.test(b2)&&(bG.support.htmlSerialize||!K.test(b2))&&(bG.support.leadingWhitespace||!bY.test(b2))&&!T[(p.exec(b2)||["",""])[1].toLowerCase()]){b2=b2.replace(ay,"<$1></$2>");try{for(;b0<bZ;b0++){b1=this[b0]||{};if(b1.nodeType===1){bG.cleanData(b1.getElementsByTagName("
 *"));b1.innerHTML=b2}}b1=0}catch(b3){}}if(b1){this.empty().append(b2)}},null,e,arguments.length)},replaceWith:function(e){if(!aR(this[0])){if(bG.isFunction(e)){return this.each(function(b1){var b0=bG(this),bZ=b0.html();b0.replaceWith(e.call(this,b1,bZ))})}if(typeof e!=="string"){e=bG(e).detach()}return this.each(function(){var b0=this.nextSibling,bZ=this.parentNode;bG(this).remove();if(b0){bG(b0).before(e)}else{bG(bZ).append(e)}})}return this.length?this.pushStack(bG(bG.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,true)},domManip:function(b4,b8,b7){b4=[].concat.apply([],b4);var b0,b2,b3,b6,b1=0,b5=b4[0],bZ=[],e=this.length;if(!bG.support.checkClone&&e>1&&typeof b5==="string"&&bR.test(b5)){return this.each(function(){bG(this).domManip(b4,b8,b7)})}if(bG.isFunction(b5)){return this.each(function(ca){var b9=bG(this);b4[0]=b5.call(this,ca,b8?b9.html():aB);b9.domManip(b4,b8,b7)})}if(this[0]){b0=bG.buildFragment(b4,this,bZ);b3=b0.fragment;b2=b3.firstC
 hild;if(b3.childNodes.length===1){b3=b2}if(b2){b8=b8&&bG.nodeName(b2,"tr");for(b6=b0.cacheable||e-1;b1<e;b1++){b7.call(b8&&bG.nodeName(this[b1],"table")?y(this[b1],"tbody"):this[b1],b1===b6?b3:bG.clone(b3,true,true))}}b3=b2=null;if(bZ.length){bG.each(bZ,function(b9,ca){if(ca.src){if(bG.ajax){bG.ajax({url:ca.src,type:"GET",dataType:"script",async:false,global:false,"throws":true})}else{bG.error("no ajax")}}else{bG.globalEval((ca.text||ca.textContent||ca.innerHTML||"").replace(aH,""))}if(ca.parentNode){ca.parentNode.removeChild(ca)}})}}return this}});function y(bZ,e){return bZ.getElementsByTagName(e)[0]||bZ.appendChild(bZ.ownerDocument.createElement(e))}function ao(b5,bZ){if(bZ.nodeType!==1||!bG.hasData(b5)){return}var b2,b1,e,b4=bG._data(b5),b3=bG._data(bZ,b4),b0=b4.events;if(b0){delete b3.handle;b3.events={};for(b2 in b0){for(b1=0,e=b0[b2].length;b1<e;b1++){bG.event.add(bZ,b2,b0[b2][b1])}}}if(b3.data){b3.data=bG.extend({},b3.data)}}function G(bZ,e){var b0;if(e.nodeType!==1){return}i
 f(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bZ)}b0=e.nodeName.toLowerCase();if(b0==="object"){if(e.parentNode){e.outerHTML=bZ.outerHTML}if(bG.support.html5Clone&&(bZ.innerHTML&&!bG.trim(e.innerHTML))){e.innerHTML=bZ.innerHTML}}else{if(b0==="input"&&aE.test(bZ.type)){e.defaultChecked=e.checked=bZ.checked;if(e.value!==bZ.value){e.value=bZ.value}}else{if(b0==="option"){e.selected=bZ.defaultSelected}else{if(b0==="input"||b0==="textarea"){e.defaultValue=bZ.defaultValue}else{if(b0==="script"&&e.text!==bZ.text){e.text=bZ.text}}}}}e.removeAttribute(bG.expando)}bG.buildFragment=function(b1,b2,bZ){var b0,e,b3,b4=b1[0];b2=b2||o;b2=(b2[0]||b2).ownerDocument||b2[0]||b2;if(typeof b2.createDocumentFragment==="undefined"){b2=o}if(b1.length===1&&typeof b4==="string"&&b4.length<512&&b2===o&&b4.charAt(0)==="<"&&!ap.test(b4)&&(bG.support.checkClone||!bR.test(b4))&&(bG.support.html5Clone||!K.test(b4))){e=true;b0=bG.fragments[b4];b3=b0!==aB}if(!b0){b0=b2.createDocumen
 tFragment();bG.clean(b1,b2,b0,bZ);if(e){bG.fragments[b4]=b3&&b0}}return{fragment:b0,cacheable:e}};bG.fragments={};bG.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bZ){bG.fn[e]=function(b0){var b2,b4=0,b3=[],b6=bG(b0),b1=b6.length,b5=this.length===1&&this[0].parentNode;if((b5==null||b5&&b5.nodeType===11&&b5.childNodes.length===1)&&b1===1){b6[bZ](this[0]);return this}else{for(;b4<b1;b4++){b2=(b4>0?this.clone(true):this).get();bG(b6[b4])[bZ](b2);b3=b3.concat(b2)}return this.pushStack(b3,e,b6.selector)}}});function m(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function bS(e){if(aE.test(e.type)){e.defaultChecked=e.checked}}bG.extend({clone:function(b2,b4,b0){var e,bZ,b1,b3;if(bG.support.html5Clone||bG.isXMLDoc(b2)||!K.test("<"+b2.nodeName+">")){b3=b2.cloneNode(true)}else{l.inn
 erHTML=b2.outerHTML;l.removeChild(b3=l.firstChild)}if((!bG.support.noCloneEvent||!bG.support.noCloneChecked)&&(b2.nodeType===1||b2.nodeType===11)&&!bG.isXMLDoc(b2)){G(b2,b3);e=m(b2);bZ=m(b3);for(b1=0;e[b1];++b1){if(bZ[b1]){G(e[b1],bZ[b1])}}}if(b4){ao(b2,b3);if(b0){e=m(b2);bZ=m(b3);for(b1=0;e[b1];++b1){ao(e[b1],bZ[b1])}}}e=bZ=null;return b3},clean:function(cb,b0,e,b1){var b7,b3,ca,cf,b4,ce,b5,b2,bZ,b9,cd,b6,b8=0,cc=[];if(!b0||typeof b0.createDocumentFragment==="undefined"){b0=o}for(b3=b0===o&&aQ;(ca=cb[b8])!=null;b8++){if(typeof ca==="number"){ca+=""}if(!ca){continue}if(typeof ca==="string"){if(!J.test(ca)){ca=b0.createTextNode(ca)}else{b3=b3||B(b0);b5=b5||b3.appendChild(b0.createElement("div"));ca=ca.replace(ay,"<$1></$2>");cf=(p.exec(ca)||["",""])[1].toLowerCase();b4=T[cf]||T._default;ce=b4[0];b5.innerHTML=b4[1]+ca+b4[2];while(ce--){b5=b5.lastChild}if(!bG.support.tbody){b2=bT.test(ca);bZ=cf==="table"&&!b2?b5.firstChild&&b5.firstChild.childNodes:b4[1]==="<table>"&&!b2?b5.childNodes:
 [];for(b7=bZ.length-1;b7>=0;--b7){if(bG.nodeName(bZ[b7],"tbody")&&!bZ[b7].childNodes.length){bZ[b7].parentNode.removeChild(bZ[b7])}}}if(!bG.support.leadingWhitespace&&bY.test(ca)){b5.insertBefore(b0.createTextNode(bY.exec(ca)[0]),b5.firstChild)}ca=b5.childNodes;b5=b3.lastChild}}if(ca.nodeType){cc.push(ca)}else{cc=bG.merge(cc,ca)}}if(b5){b3.removeChild(b5);ca=b5=b3=null}if(!bG.support.appendChecked){for(b8=0;(ca=cc[b8])!=null;b8++){if(bG.nodeName(ca,"input")){bS(ca)}else{if(typeof ca.getElementsByTagName!=="undefined"){bG.grep(ca.getElementsByTagName("input"),bS)}}}}if(e){cd=function(cg){if(!cg.type||bw.test(cg.type)){return b1?b1.push(cg.parentNode?cg.parentNode.removeChild(cg):cg):e.appendChild(cg)}};for(b8=0;(ca=cc[b8])!=null;b8++){if(!(bG.nodeName(ca,"script")&&cd(ca))){e.appendChild(ca);if(typeof ca.getElementsByTagName!=="undefined"){b6=bG.grep(bG.merge([],ca.getElementsByTagName("script")),cd);cc.splice.apply(cc,[b8+1,0].concat(b6));b8+=b6.length}}}}return cc},cleanData:functi
 on(bZ,b7){var b2,b0,b1,b6,b3=0,b8=bG.expando,e=bG.cache,b4=bG.support.deleteExpando,b5=bG.event.special;for(;(b1=bZ[b3])!=null;b3++){if(b7||bG.acceptData(b1)){b0=b1[b8];b2=b0&&e[b0];if(b2){if(b2.events){for(b6 in b2.events){if(b5[b6]){bG.event.remove(b1,b6)}else{bG.removeEvent(b1,b6,b2.handle)}}}if(e[b0]){delete e[b0];if(b4){delete b1[b8]}else{if(b1.removeAttribute){b1.removeAttribute(b8)}else{b1[b8]=null}}bG.deletedIds.push(b0)}}}}}});(function(){var e,bZ;bG.uaMatch=function(b1){b1=b1.toLowerCase();var b0=/(chrome)[ \/]([\w.]+)/.exec(b1)||/(webkit)[ \/]([\w.]+)/.exec(b1)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b1)||/(msie) ([\w.]+)/.exec(b1)||b1.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}};e=bG.uaMatch(d.userAgent);bZ={};if(e.browser){bZ[e.browser]=true;bZ.version=e.version}if(bZ.webkit){bZ.safari=true}bG.browser=bZ;bG.sub=function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bG.extend(true,b0,this);b0.s
 uperclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bG&&!(b4 instanceof b0)){b4=b0(b4)}return bG.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(o);return b0}})();var F,az,aW,be=/alpha\([^)]*\)/i,aS=/opacity=([^)]*)/,bk=/^(top|right|bottom|left)$/,aZ=/^margin/,a8=new RegExp("^("+bx+")(.*)$","i"),W=new RegExp("^("+bx+")(?!px)[a-z%]+$","i"),S=new RegExp("^([-+])=("+bx+")","i"),bh={},a9={position:"absolute",visibility:"hidden",display:"block"},bA={letterSpacing:0,fontWeight:400,lineHeight:1},bQ=["Top","Right","Bottom","Left"],ar=["Webkit","O","Moz","ms"],aJ=bG.fn.toggle;function b(b1,bZ){if(bZ in b1){return bZ}var b2=bZ.charAt(0).toUpperCase()+bZ.slice(1),e=bZ,b0=ar.length;while(b0--){bZ=ar[b0]+b2;if(bZ in b1){return bZ}}return e}function Q(bZ,e){bZ=e||bZ;return bG.css(bZ,"display")==="none"||!bG.contains(bZ.ownerDocument,bZ)}function t(b3,e){var b2,b4,bZ=[],b0=0,b1=b3.length;for(;b0<b1;b0++)
 {b2=b3[b0];if(!b2.style){continue}bZ[b0]=bG._data(b2,"olddisplay");if(e){if(!bZ[b0]&&b2.style.display==="none"){b2.style.display=""}if(b2.style.display===""&&Q(b2)){bZ[b0]=bG._data(b2,"olddisplay",bC(b2.nodeName))}}else{b4=F(b2,"display");if(!bZ[b0]&&b4!=="none"){bG._data(b2,"olddisplay",b4)}}}for(b0=0;b0<b1;b0++){b2=b3[b0];if(!b2.style){continue}if(!e||b2.style.display==="none"||b2.style.display===""){b2.style.display=e?bZ[b0]||"":"none"}}return b3}bG.fn.extend({css:function(e,bZ){return bG.access(this,function(b1,b0,b2){return b2!==aB?bG.style(b1,b0,b2):bG.css(b1,b0)},e,bZ,arguments.length>1)},show:function(){return t(this,true)},hide:function(){return t(this)},toggle:function(b0,bZ){var e=typeof b0==="boolean";if(bG.isFunction(b0)&&bG.isFunction(bZ)){return aJ.apply(this,arguments)}return this.each(function(){if(e?b0:Q(this)){bG(this).show()}else{bG(this).hide()}})}});bG.extend({cssHooks:{opacity:{get:function(b0,bZ){if(bZ){var e=F(b0,"opacity");return e===""?"1":e}}}},cssNumber:
 {fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":bG.support.cssFloat?"cssFloat":"styleFloat"},style:function(b1,b0,b7,b2){if(!b1||b1.nodeType===3||b1.nodeType===8||!b1.style){return}var b5,b6,b8,b3=bG.camelCase(b0),bZ=b1.style;b0=bG.cssProps[b3]||(bG.cssProps[b3]=b(bZ,b3));b8=bG.cssHooks[b0]||bG.cssHooks[b3];if(b7!==aB){b6=typeof b7;if(b6==="string"&&(b5=S.exec(b7))){b7=(b5[1]+1)*b5[2]+parseFloat(bG.css(b1,b0));b6="number"}if(b7==null||b6==="number"&&isNaN(b7)){return}if(b6==="number"&&!bG.cssNumber[b3]){b7+="px"}if(!b8||!("set" in b8)||(b7=b8.set(b1,b7,b2))!==aB){try{bZ[b0]=b7}catch(b4){}}}else{if(b8&&"get" in b8&&(b5=b8.get(b1,false,b2))!==aB){return b5}return bZ[b0]}},css:function(b4,b2,b3,bZ){var b5,b1,e,b0=bG.camelCase(b2);b2=bG.cssProps[b0]||(bG.cssProps[b0]=b(b4.style,b0));e=bG.cssHooks[b2]||bG.cssHooks[b0];if(e&&"get" in e){b5=e.get(b4,true,bZ)}if(b5===aB){b5=F(b4,b2)}if(b5==="normal"&&b2 in bA){
 b5=bA[b2]}if(b3||bZ!==aB){b1=parseFloat(b5);return b3||bG.isNumeric(b1)?b1||0:b5}return b5},swap:function(b2,b1,b3){var b0,bZ,e={};for(bZ in b1){e[bZ]=b2.style[bZ];b2.style[bZ]=b1[bZ]}b0=b3.call(b2);for(bZ in b1){b2.style[bZ]=e[bZ]}return b0}});if(a2.getComputedStyle){F=function(b5,bZ){var e,b2,b1,b4,b3=getComputedStyle(b5,null),b0=b5.style;if(b3){e=b3[bZ];if(e===""&&!bG.contains(b5.ownerDocument.documentElement,b5)){e=bG.style(b5,bZ)}if(W.test(e)&&aZ.test(bZ)){b2=b0.width;b1=b0.minWidth;b4=b0.maxWidth;b0.minWidth=b0.maxWidth=b0.width=e;e=b3.width;b0.width=b2;b0.minWidth=b1;b0.maxWidth=b4}}return e}}else{if(o.documentElement.currentStyle){F=function(b2,b0){var b3,e,bZ=b2.currentStyle&&b2.currentStyle[b0],b1=b2.style;if(bZ==null&&b1&&b1[b0]){bZ=b1[b0]}if(W.test(bZ)&&!bk.test(b0)){b3=b1.left;e=b2.runtimeStyle&&b2.runtimeStyle.left;if(e){b2.runtimeStyle.left=b2.currentStyle.left}b1.left=b0==="fontSize"?"1em":bZ;bZ=b1.pixelLeft+"px";b1.left=b3;if(e){b2.runtimeStyle.left=e}}return bZ==="
 "?"auto":bZ}}}function aG(e,b0,b1){var bZ=a8.exec(b0);return bZ?Math.max(0,bZ[1]-(b1||0))+(bZ[2]||"px"):b0}function at(b1,bZ,e,b3){var b0=e===(b3?"border":"content")?4:bZ==="width"?1:0,b2=0;for(;b0<4;b0+=2){if(e==="margin"){b2+=bG.css(b1,e+bQ[b0],true)}if(b3){if(e==="content"){b2-=parseFloat(F(b1,"padding"+bQ[b0]))||0}if(e!=="margin"){b2-=parseFloat(F(b1,"border"+bQ[b0]+"Width"))||0}}else{b2+=parseFloat(F(b1,"padding"+bQ[b0]))||0;if(e!=="padding"){b2+=parseFloat(F(b1,"border"+bQ[b0]+"Width"))||0}}}return b2}function v(b1,bZ,e){var b2=bZ==="width"?b1.offsetWidth:b1.offsetHeight,b0=true,b3=bG.support.boxSizing&&bG.css(b1,"boxSizing")==="border-box";if(b2<=0){b2=F(b1,bZ);if(b2<0||b2==null){b2=b1.style[bZ]}if(W.test(b2)){return b2}b0=b3&&(bG.support.boxSizingReliable||b2===b1.style[bZ]);b2=parseFloat(b2)||0}return(b2+at(b1,bZ,e||(b3?"border":"content"),b0))+"px"}function bC(b0){if(bh[b0]){return bh[b0]}var e=bG("<"+b0+">").appendTo(o.body),bZ=e.css("display");e.remove();if(bZ==="none"||
 bZ===""){az=o.body.appendChild(az||bG.extend(o.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!aW||!az.createElement){aW=(az.contentWindow||az.contentDocument).document;aW.write("<!doctype html><html><body>");aW.close()}e=aW.body.appendChild(aW.createElement(b0));bZ=F(e,"display");o.body.removeChild(az)}bh[b0]=bZ;return bZ}bG.each(["height","width"],function(bZ,e){bG.cssHooks[e]={get:function(b2,b1,b0){if(b1){if(b2.offsetWidth!==0||F(b2,"display")!=="none"){return v(b2,e,b0)}else{return bG.swap(b2,a9,function(){return v(b2,e,b0)})}}},set:function(b1,b2,b0){return aG(b1,b2,b0?at(b1,e,b0,bG.support.boxSizing&&bG.css(b1,"boxSizing")==="border-box"):0)}}});if(!bG.support.opacity){bG.cssHooks.opacity={get:function(bZ,e){return aS.test((e&&bZ.currentStyle?bZ.currentStyle.filter:bZ.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":e?"1":""},set:function(b2,b3){var b1=b2.style,bZ=b2.currentStyle,e=bG.isNumeric(b3)?"alpha(opacity="+b3*100+")":"",b0=bZ&&bZ.filter||b1.filter||"
 ";b1.zoom=1;if(b3>=1&&bG.trim(b0.replace(be,""))===""&&b1.removeAttribute){b1.removeAttribute("filter");if(bZ&&!bZ.filter){return}}b1.filter=be.test(b0)?b0.replace(be,e):b0+" "+e}}}bG(function(){if(!bG.support.reliableMarginRight){bG.cssHooks.marginRight={get:function(bZ,e){return bG.swap(bZ,{display:"inline-block"},function(){if(e){return F(bZ,"marginRight")}})}}}if(!bG.support.pixelPosition&&bG.fn.position){bG.each(["top","left"],function(e,bZ){bG.cssHooks[bZ]={get:function(b2,b1){if(b1){var b0=F(b2,bZ);return W.test(b0)?bG(b2).position()[bZ]+"px":b0}}}})}});if(bG.expr&&bG.expr.filters){bG.expr.filters.hidden=function(e){return(e.offsetWidth===0&&e.offsetHeight===0)||(!bG.support.reliableHiddenOffsets&&((e.style&&e.style.display)||F(e,"display"))==="none")};bG.expr.filters.visible=function(e){return !bG.expr.filters.hidden(e)}}bG.each({margin:"",padding:"",border:"Width"},function(e,bZ){bG.cssHooks[e+bZ]={expand:function(b2){var b1,b3=typeof b2==="string"?b2.split(" "):[b2],b0={};
 for(b1=0;b1<4;b1++){b0[e+bQ[b1]+bZ]=b3[b1]||b3[b1-2]||b3[0]}return b0}};if(!aZ.test(e)){bG.cssHooks[e+bZ].set=aG}});var bs=/%20/g,aP=/\[\]$/,U=/\r?\n/g,bz=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aD=/^(?:select|textarea)/i;bG.fn.extend({serialize:function(){return bG.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?bG.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||aD.test(this.nodeName)||bz.test(this.type))}).map(function(e,bZ){var b0=bG(this).val();return b0==null?null:bG.isArray(b0)?bG.map(b0,function(b2,b1){return{name:bZ.name,value:b2.replace(U,"\r\n")}}):{name:bZ.name,value:b0.replace(U,"\r\n")}}).get()}});bG.param=function(e,b0){var b1,bZ=[],b2=function(b3,b4){b4=bG.isFunction(b4)?b4():(b4==null?"":b4);bZ[bZ.length]=encodeURIComponent(b3)+"="+encodeURIComponent(b4)};if(b0===aB){b0=bG.ajaxSettings&&b
 G.ajaxSettings.traditional}if(bG.isArray(e)||(e.jquery&&!bG.isPlainObject(e))){bG.each(e,function(){b2(this.name,this.value)})}else{for(b1 in e){k(b1,e[b1],b0,b2)}}return bZ.join("&").replace(bs,"+")};function k(b0,b2,bZ,b1){var e;if(bG.isArray(b2)){bG.each(b2,function(b4,b3){if(bZ||aP.test(b0)){b1(b0,b3)}else{k(b0+"["+(typeof b3==="object"?b4:"")+"]",b3,bZ,b1)}})}else{if(!bZ&&bG.type(b2)==="object"){for(e in b2){k(b0+"["+e+"]",b2[e],bZ,b1)}}else{b1(b0,b2)}}}var Y,bX,an=/#.*$/,ad=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,C=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,s=/^(?:GET|HEAD)$/,aC=/^\/\//,bN=/\?/,g=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,P=/([?&])_=[^&]*/,aT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,bW=bG.fn.load,w={},a6={},aX=["*/"]+["*"];try{Y=aI.href}catch(bd){Y=o.createElement("a");Y.href="";Y=Y.href}bX=aT.exec(Y.toLowerCase())||[];function bI(e){return function(b2,b4){if(typeof b2!=="string"){b4=b2;b2="*"}var bZ,b5,b6,b1=b2.toLowerCase().spli
 t(aV),b0=0,b3=b1.length;if(bG.isFunction(b4)){for(;b0<b3;b0++){bZ=b1[b0];b6=/^\+/.test(bZ);if(b6){bZ=bZ.substr(1)||"*"}b5=e[bZ]=e[bZ]||[];b5[b6?"unshift":"push"](b4)}}}}function r(bZ,b8,b3,b6,b5,b1){b5=b5||b8.dataTypes[0];b1=b1||{};b1[b5]=true;var b7,b4=bZ[b5],b0=0,e=b4?b4.length:0,b2=(bZ===w);for(;b0<e&&(b2||!b7);b0++){b7=b4[b0](b8,b3,b6);if(typeof b7==="string"){if(!b2||b1[b7]){b7=aB}else{b8.dataTypes.unshift(b7);b7=r(bZ,b8,b3,b6,b7,b1)}}}if((b2||!b7)&&!b1["*"]){b7=r(bZ,b8,b3,b6,"*",b1)}return b7}function u(b0,b1){var bZ,e,b2=bG.ajaxSettings.flatOptions||{};for(bZ in b1){if(b1[bZ]!==aB){(b2[bZ]?b0:(e||(e={})))[bZ]=b1[bZ]}}if(e){bG.extend(true,b0,e)}}bG.fn.load=function(b1,b4,b5){if(typeof b1!=="string"&&bW){return bW.apply(this,arguments)}if(!this.length){return this}var e,b2,b0,bZ=this,b3=b1.indexOf(" ");if(b3>=0){e=b1.slice(b3,b1.length);b1=b1.slice(0,b3)}if(bG.isFunction(b4)){b5=b4;b4=aB}else{if(typeof b4==="object"){b2="POST"}}bG.ajax({url:b1,type:b2,dataType:"html",data:b4,co
 mplete:function(b7,b6){if(b5){bZ.each(b5,b0||[b7.responseText,b6,b7])}}}).done(function(b6){b0=arguments;bZ.html(e?bG("<div>").append(b6.replace(g,"")).find(e):b6)});return this};bG.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bZ){bG.fn[bZ]=function(b0){return this.on(bZ,b0)}});bG.each(["get","post"],function(e,bZ){bG[bZ]=function(b0,b2,b3,b1){if(bG.isFunction(b2)){b1=b1||b3;b3=b2;b2=aB}return bG.ajax({type:bZ,url:b0,data:b2,success:b3,dataType:b1})}});bG.extend({getScript:function(e,bZ){return bG.get(e,aB,bZ,"script")},getJSON:function(e,bZ,b0){return bG.get(e,bZ,b0,"json")},ajaxSetup:function(bZ,e){if(e){u(bZ,bG.ajaxSettings)}else{e=bZ;bZ=bG.ajaxSettings}u(bZ,e);return bZ},ajaxSettings:{url:Y,isLocal:C.test(bX[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javas
 cript","*":aX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a2.String,"text html":true,"text json":bG.parseJSON,"text xml":bG.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:bI(w),ajaxTransport:bI(a6),ajax:function(b4,b1){if(typeof b4==="object"){b1=b4;b4=aB}b1=b1||{};var b7,cl,b2,cg,b9,cd,b0,cf,b8=bG.ajaxSetup({},b1),cn=b8.context||b8,cb=cn!==b8&&(cn.nodeType||cn instanceof bG)?bG(cn):bG.event,cm=bG.Deferred(),ci=bG.Callbacks("once memory"),b5=b8.statusCode||{},cc={},cj={},b3=0,b6="canceled",ce={readyState:0,setRequestHeader:function(co,cp){if(!b3){var e=co.toLowerCase();co=cj[e]=cj[e]||co;cc[co]=cp}return this},getAllResponseHeaders:function(){return b3===2?cl:null},getResponseHeader:function(co){var e;if(b3===2){if(!b2){b2={};while((e=ad.exec(cl))){b2[e[1].toLowerCase()]=e[2]}}e=b2[co.toLowerCase()]}return e===aB?null:e},overrideMimeType:function(e){if(!b3){b8.mimeType=e}return this},abort:fu
 nction(e){e=e||b6;if(cg){cg.abort(e)}ca(0,e);return this}};function ca(cs,co,ct,cq){var e,cw,cu,cr,cv,cp=co;if(b3===2){return}b3=2;if(b9){clearTimeout(b9)}cg=aB;cl=cq||"";ce.readyState=cs>0?4:0;if(ct){cr=h(b8,ce,ct)}if(cs>=200&&cs<300||cs===304){if(b8.ifModified){cv=ce.getResponseHeader("Last-Modified");if(cv){bG.lastModified[b7]=cv}cv=ce.getResponseHeader("Etag");if(cv){bG.etag[b7]=cv}}if(cs===304){cp="notmodified";e=true}else{e=ae(b8,cr);cp=e.state;cw=e.data;cu=e.error;e=!cu}}else{cu=cp;if(!cp||cs){cp="error";if(cs<0){cs=0}}}ce.status=cs;ce.statusText=""+(co||cp);if(e){cm.resolveWith(cn,[cw,cp,ce])}else{cm.rejectWith(cn,[ce,cp,cu])}ce.statusCode(b5);b5=aB;if(b0){cb.trigger("ajax"+(e?"Success":"Error"),[ce,b8,e?cw:cu])}ci.fireWith(cn,[ce,cp]);if(b0){cb.trigger("ajaxComplete",[ce,b8]);if(!(--bG.active)){bG.event.trigger("ajaxStop")}}}cm.promise(ce);ce.success=ce.done;ce.error=ce.fail;ce.complete=ci.add;ce.statusCode=function(co){if(co){var e;if(b3<2){for(e in co){b5[e]=[b5[e],co[e]]
 }}else{e=co[ce.status];ce.always(e)}}return this};b8.url=((b4||b8.url)+"").replace(an,"").replace(aC,bX[1]+"//");b8.dataTypes=bG.trim(b8.dataType||"*").toLowerCase().split(aV);if(b8.crossDomain==null){cd=aT.exec(b8.url.toLowerCase());b8.crossDomain=!!(cd&&(cd[1]!=bX[1]||cd[2]!=bX[2]||(cd[3]||(cd[1]==="http:"?80:443))!=(bX[3]||(bX[1]==="http:"?80:443))))}if(b8.data&&b8.processData&&typeof b8.data!=="string"){b8.data=bG.param(b8.data,b8.traditional)}r(w,b8,b1,ce);if(b3===2){return ce}b0=b8.global;b8.type=b8.type.toUpperCase();b8.hasContent=!s.test(b8.type);if(b0&&bG.active++===0){bG.event.trigger("ajaxStart")}if(!b8.hasContent){if(b8.data){b8.url+=(bN.test(b8.url)?"&":"?")+b8.data;delete b8.data}b7=b8.url;if(b8.cache===false){var bZ=bG.now(),ck=b8.url.replace(P,"$1_="+bZ);b8.url=ck+((ck===b8.url)?(bN.test(b8.url)?"&":"?")+"_="+bZ:"")}}if(b8.data&&b8.hasContent&&b8.contentType!==false||b1.contentType){ce.setRequestHeader("Content-Type",b8.contentType)}if(b8.ifModified){b7=b7||b8.url;if
 (bG.lastModified[b7]){ce.setRequestHeader("If-Modified-Since",bG.lastModified[b7])}if(bG.etag[b7]){ce.setRequestHeader("If-None-Match",bG.etag[b7])}}ce.setRequestHeader("Accept",b8.dataTypes[0]&&b8.accepts[b8.dataTypes[0]]?b8.accepts[b8.dataTypes[0]]+(b8.dataTypes[0]!=="*"?", "+aX+"; q=0.01":""):b8.accepts["*"]);for(cf in b8.headers){ce.setRequestHeader(cf,b8.headers[cf])}if(b8.beforeSend&&(b8.beforeSend.call(cn,ce,b8)===false||b3===2)){return ce.abort()}b6="abort";for(cf in {success:1,error:1,complete:1}){ce[cf](b8[cf])}cg=r(a6,b8,b1,ce);if(!cg){ca(-1,"No Transport")}else{ce.readyState=1;if(b0){cb.trigger("ajaxSend",[ce,b8])}if(b8.async&&b8.timeout>0){b9=setTimeout(function(){ce.abort("timeout")},b8.timeout)}try{b3=1;cg.send(cc,ca)}catch(ch){if(b3<2){ca(-1,ch)}else{throw ch}}}return ce},active:0,lastModified:{},etag:{}});function h(b7,b6,b3){var b2,b4,b1,e,bZ=b7.contents,b5=b7.dataTypes,b0=b7.responseFields;for(b4 in b0){if(b4 in b3){b6[b0[b4]]=b3[b4]}}while(b5[0]==="*"){b5.shift()
 ;if(b2===aB){b2=b7.mimeType||b6.getResponseHeader("content-type")}}if(b2){for(b4 in bZ){if(bZ[b4]&&bZ[b4].test(b2)){b5.unshift(b4);break}}}if(b5[0] in b3){b1=b5[0]}else{for(b4 in b3){if(!b5[0]||b7.converters[b4+" "+b5[0]]){b1=b4;break}if(!e){e=b4}}b1=b1||e}if(b1){if(b1!==b5[0]){b5.unshift(b1)}return b3[b1]}}function ae(b9,b1){var b7,bZ,b5,b3,b6=b9.dataTypes.slice(),b0=b6[0],b8={},b2=0;if(b9.dataFilter){b1=b9.dataFilter(b1,b9.dataType)}if(b6[1]){for(b7 in b9.converters){b8[b7.toLowerCase()]=b9.converters[b7]}}for(;(b5=b6[++b2]);){if(b5!=="*"){if(b0!=="*"&&b0!==b5){b7=b8[b0+" "+b5]||b8["* "+b5];if(!b7){for

<TRUNCATED>


[24/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/primer.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/primer.html b/content/docs/0.8.8-incubating/aql/primer.html
new file mode 100644
index 0000000..99239c1
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/primer.html
@@ -0,0 +1,896 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB 101: An ADM and AQL Primer</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AsterixDB 101: An ADM and AQL Primer</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB 101: An ADM and AQL Primer</h1>
+<div class="section">
+<h2><a name="Welcome_to_AsterixDB"></a>Welcome to AsterixDB!</h2>
+<p>This document introduces the main features of AsterixDB&#x2019;s data model (ADM) and query language (AQL) by example. The example is a simple scenario involving (synthetic) sample data modeled after data from the social domain. This document describes a set of sample ADM datasets, together with a set of illustrative AQL queries, to introduce you to the &#x201c;AsterixDB user experience&#x201d;. The complete set of steps required to create and load a handful of sample datasets, along with runnable queries and the expected results for each query, are included.</p>
+<p>This document assumes that you are at least vaguely familiar with AsterixDB and why you might want to use it. Most importantly, it assumes you already have a running instance of AsterixDB and that you know how to query it using AsterixDB&#x2019;s basic web interface. For more information on these topics, you should go through the steps in <a href="../install.html">Installing Asterix Using Managix</a> before reading this document and make sure that you have a running AsterixDB instance ready to go. To get your feet wet, you should probably start with a simple local installation of AsterixDB on your favorite machine, accepting all of the default settings that Managix offers. Later you can graduate to trying AsterixDB on a cluster, its real intended home (since it targets Big Data). (Note: With the exception of specifying the correct locations where you put the source data for this example, there should no changes needed in your ADM or AQL statements to run the examples locally and/
 or to run them on a cluster when you are ready to take that step.)</p>
+<p>As you read through this document, you should try each step for yourself on your own AsterixDB instance. Once you have reached the end, you will be fully armed and dangerous, with all the basic AsterixDB knowledge that you&#x2019;ll need to start down the path of modeling, storing, and querying your own semistructured data.</p>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="ADM:_Modeling_Semistructed_Data_in_AsterixDB"></a>ADM: Modeling Semistructed Data in AsterixDB</h2>
+<p>In this section you will learn all about modeling Big Data using ADM, the data model of the AsterixDB BDMS.</p>
+<div class="section">
+<h3><a name="Dataverses_Datatypes_and_Datasets"></a>Dataverses, Datatypes, and Datasets</h3>
+<p>The top-level organizing concept in the AsterixDB world is the <i>dataverse</i>. A dataverse&#x2014;short for &#x201c;data universe&#x201d;&#x2014;is a place (similar to a database in a relational DBMS) in which to create and manage the types, datasets, functions, and other artifacts for a given AsterixDB application. When you start using an AsterixDB instance for the first time, it starts out &#x201c;empty&#x201d;; it contains no data other than the AsterixDB system catalogs (which live in a special dataverse called the Metadata dataverse). To store your data in AsterixDB, you will first create a dataverse and then you use it for the <i>datatypes</i> and <i>datasets</i> for managing your own data. A datatype tells AsterixDB what you know (or more accurately, what you want it to know) a priori about one of the kinds of data instances that you want AsterixDB to hold for you. A dataset is a collection of data instances of a datatype, and AsterixDB makes sure that the data instances
  that you put in it conform to its specified type. Since AsterixDB targets semistructured data, you can use <i>open</i> datatypes and tell it as little or as much as you wish about your data up front; the more you tell it up front, the less information it will have to store repeatedly in the individual data instances that you give it. Instances of open datatypes are permitted to have additional content, beyond what the datatype says, as long as they at least contain the information prescribed by the datatype definition. Open typing allows data to vary from one instance to another and it leaves wiggle room for application evolution in terms of what might need to be stored in the future. If you want to restrict data instances in a dataset to have only what the datatype says, and nothing extra, you can define a <i>closed</i> datatype for that dataset and AsterixDB will keep users from storing objects that have extra data in them. Datatypes are open by default unless you tell AsterixDB 
 otherwise. Let&#x2019;s put these concepts to work</p>
+<p>Our little sample scenario involves hypothetical information about users of two popular social networks, Facebook and Twitter, and their messages. We&#x2019;ll start by defining a dataverse called &#x201c;TinySocial&#x201d; to hold our datatypes and datasets. The AsterixDB data model (ADM) is essentially a superset of JSON&#x2014;it&#x2019;s what you get by extending JSON with more data types and additional data modeling constructs borrowed from object databases. The following is how we can create the TinySocial dataverse plus a set of ADM types for modeling Twitter users, their Tweets, Facebook users, their users&#x2019; employment information, and their messages. (Note: Keep in mind that this is just a tiny and somewhat silly example intended for illustrating some of the key features of AsterixDB. :-))</p>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse TinySocial if exists;
+    create dataverse TinySocial;
+    use dataverse TinySocial;
+
+    create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64,
+        name: string,
+        followers_count: int64
+    }
+
+    create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+    }
+
+    create type EmploymentType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+    }
+
+    create type FacebookUserType as closed {
+        id: int64,
+        alias: string,
+        name: string,
+        user-since: datetime,
+        friend-ids: {{ int64 }},
+        employment: [EmploymentType]
+    }
+
+    create type FacebookMessageType as closed {
+        message-id: int64,
+        author-id: int64,
+        in-response-to: int64?,
+        sender-location: point?,
+        message: string
+    }
+</pre></div></div>
+<p>The first three lines above tell AsterixDB to drop the old TinySocial dataverse, if one already exists, and then to create a brand new one and make it the focus of the statements that follow. The first type creation statement creates a datatype for holding information about Twitter users. It is a record type with a mix of integer and string data, very much like a (flat) relational tuple. The indicated fields are all mandatory, but because the type is open, additional fields are welcome. The second statement creates a datatype for Twitter messages; this shows how to specify a closed type. Interestingly (based on one of Twitter&#x2019;s APIs), each Twitter message actually embeds an instance of the sending user&#x2019;s information (current as of when the message was sent), so this is an example of a nested record in ADM. Twitter messages can optionally contain the sender&#x2019;s location, which is modeled via the sender-location field of spatial type <i>point</i>; the question ma
 rk following the field type indicates its optionality. An optional field is like a nullable field in SQL&#x2014;it may be present or missing, but when it&#x2019;s present, its data type will conform to the datatype&#x2019;s specification. The send-time field illustrates the use of a temporal primitive type, <i>datetime</i>. Lastly, the referred-topics field illustrates another way that ADM is richer than the relational model; this field holds a bag (a.k.a. an unordered list) of strings. Since the overall datatype definition for Twitter messages says &#x201c;closed&#x201d;, the fields that it lists are the only fields that instances of this type will be allowed to contain. The next two create type statements create a record type for holding information about one component of the employment history of a Facebook user and then a record type for holding the user information itself. The Facebook user type highlights a few additional ADM data model features. Its friend-ids field is a bag 
 of integers, presumably the Facebook user ids for this user&#x2019;s friends, and its employment field is an ordered list of employment records. The final create type statement defines a type for handling the content of a Facebook message in our hypothetical social data storage scenario.</p>
+<p>Before going on, we need to once again emphasize the idea that AsterixDB is aimed at storing and querying not just Big Data, but Big <i>Semistructured</i> Data. This means that most of the fields listed in the create type statements above could have been omitted without changing anything other than the resulting size of stored data instances on disk. AsterixDB stores its information about the fields defined a priori as separate metadata, whereas the information about other fields that are &#x201c;just there&#x201d; in instances of open datatypes is stored with each instance&#x2014;making for more bits on disk and longer times for operations affected by data size (e.g., dataset scans). The only fields that <i>must</i> be specified a priori are the primary key. Indexes can be built on fields that don&#x2019;t belong to the pre-specified part of datatype&#x2019;s schema as long as their type is specified at index create time and and the <i>enforced</i> keyword is provided at the end
  of the index definition. (The <i>enforced</i> keyword asks the system to ensure that the indexed field or fields conform to this specified type in all of the dataset&#x2019;s record instances where they are present.) Additionally, indexed fields may be nested arbitrarily deep within a dataset&#x2019;s records as long as the nesting does not go pass through a list (be it ordered or unordered) along the way.</p></div>
+<div class="section">
+<h3><a name="Creating_Datasets_and_Indexes"></a>Creating Datasets and Indexes</h3>
+<p>Now that we have defined our datatypes, we can move on and create datasets to store the actual data. (If we wanted to, we could even have several named datasets based on any one of these datatypes.) We can do this as follows, utilizing the DDL capabilities of AsterixDB.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create dataset FacebookUsers(FacebookUserType)
+    primary key id;
+
+    create dataset FacebookMessages(FacebookMessageType)
+    primary key message-id;
+
+    create dataset TwitterUsers(TwitterUserType)
+    primary key screen-name;
+
+    create dataset TweetMessages(TweetMessageType)
+    primary key tweetid
+    hints(cardinality=100);
+
+    create index fbUserSinceIdx on FacebookUsers(user-since);
+    create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+    create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    for $ds in dataset Metadata.Dataset return $ds;
+    for $ix in dataset Metadata.Index return $ix;
+</pre></div></div>
+<p>The ADM DDL statements above create four datasets for holding our social data in the TinySocial dataverse: FacebookUsers, FacebookMessages, TwitterUsers, and TweetMessages. The first statement creates the FacebookUsers data set. It specifies that this dataset will store data instances conforming to FacebookUserType and that it has a primary key which is the id field of each instance. The primary key information is used by AsterixDB to uniquely identify instances for the purpose of later lookup and for use in secondary indexes. Each AsterixDB dataset is stored (and indexed) in the form of a B+ tree on primary key; secondary indexes point to their indexed data by primary key. In AsterixDB clusters, the primary key is also used to hash-partition (a.k.a. shard) the dataset across the nodes of the cluster. The next three create dataset statements are similar. The last one illustrates an optional clause for providing useful hints to AsterixDB. In this case, the hint tells AsterixDB tha
 t the dataset definer is anticipating that the TweetMessages dataset will contain roughly 100 objects; knowing this can help AsterixDB to more efficiently manage and query this dataset. (AsterixDB does not yet gather and maintain data statistics; it will currently, abitrarily, assume a cardinality of one million objects per dataset in the absence of such an optional definition-time hint.)</p>
+<p>The create dataset statements above are followed by four more DDL statements, each of which creates a secondary index on a field of one of the datasets. The first one indexes the FacebookUsers dataset on its user-since field. This index will be a B+ tree index; its type is unspecified and <i>btree</i> is the default type. The other three illustrate how you can explicitly specify the desired type of index. In addition to btree, <i>rtree</i> and inverted <i>keyword</i> indexes are supported by AsterixDB. Indexes can also have composite keys, and more advanced text indexing is available as well (ngram(k), where k is the desired gram length).</p></div>
+<div class="section">
+<h3><a name="Querying_the_Metadata_Dataverse"></a>Querying the Metadata Dataverse</h3>
+<p>The last two statements above show how you can use queries in AQL to examine the AsterixDB system catalogs and tell what artifacts you have created. Just as relational DBMSs use their own tables to store their catalogs, AsterixDB uses its own datasets to persist descriptions of its datasets, datatypes, indexes, and so on. Running the first of the two queries above will list all of your newly created datasets, and it will also show you a full list of all the metadata datasets. (You can then explore from there on your own if you are curious) These last two queries also illustrate one other factoid worth knowing: AsterixDB allows queries to span dataverses by allowing the optional use of fully-qualified dataset names (i.e., <i>dataversename.datasetname</i>) to reference datasets that live in a dataverse other than the one that was named in the most recently executed <i>use dataverse</i> directive.</p>
+<p>&#x2014;-</p></div></div>
+<div class="section">
+<h2><a name="Loading_Data_Into_AsterixDB"></a>Loading Data Into AsterixDB</h2>
+<p>Okay, so far so good&#x2014;AsterixDB is now ready for data, so let&#x2019;s give it some data to store Our next task will be to load some sample data into the four datasets that we just defined. Here we will load a tiny set of records, defined in ADM format (a superset of JSON), into each dataset. In the boxes below you can see the actual data instances contained in each of the provided sample files. In order to load this data yourself, you should first store the four corresponding <tt>.adm</tt> files (whose URLs are indicated on top of each box below) into a filesystem directory accessible to your running AsterixDB instance. Take a few minutes to look carefully at each of the sample data sets. This will give you a better sense of the nature of the data that we are about to load and query. We should note that ADM format is a textual serialization of what AsterixDB will actually store; when persisted in AsterixDB, the data format will be binary and the data in the predefined fiel
 ds of the data instances will be stored separately from their associated field name and type metadata.</p>
+<p><a href="../data/twu.adm">Twitter Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:18,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416}
+    {&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159}
+    {&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649}
+    {&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136}
+</pre></div></div>
+<p><a href="../data/twm.adm">Tweet Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;tweetid&quot;:&quot;1&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;47.44,80.65&quot;),&quot;send-time&quot;:datetime(&quot;2008-04-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;customization&quot;}},&quot;message-text&quot;:&quot; love t-mobile its customization is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;2&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;32.84,67.14&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like verizon its shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;3&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;29.72,75.8&quot;),&quot;send-time&quot;:datetime(&quot;2006-11-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; like motorola the speed is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;4&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;39.28,70.48&quot;),&quot;send-time&quot;:datetime(&quot;2011-12-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;sprint&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like sprint the voice-command is mind-blowing:)&quot;}
+    {&quot;tweetid&quot;:&quot;5&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;40.09,92.69&quot;),&quot;send-time&quot;:datetime(&quot;2006-08-04T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;motorola&quot;,&quot;speed&quot;}},&quot;message-text&quot;:&quot; can't stand motorola its speed is terrible:(&quot;}
+    {&quot;tweetid&quot;:&quot;6&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;47.51,83.99&quot;),&quot;send-time&quot;:datetime(&quot;2010-05-07T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; like iphone the voice-clarity is good:)&quot;}
+    {&quot;tweetid&quot;:&quot;7&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ChangEwing_573&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:182,&quot;statuses_count&quot;:394,&quot;name&quot;:&quot;Chang Ewing&quot;,&quot;followers_count&quot;:32136},&quot;sender-location&quot;:point(&quot;36.21,72.6&quot;),&quot;send-time&quot;:datetime(&quot;2011-08-25T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; like samsung the platform is good&quot;}
+    {&quot;tweetid&quot;:&quot;8&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;46.05,93.34&quot;),&quot;send-time&quot;:datetime(&quot;2005-10-14T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;t-mobile&quot;,&quot;shortcut-menu&quot;}},&quot;message-text&quot;:&quot; like t-mobile the shortcut-menu is awesome:)&quot;}
+    {&quot;tweetid&quot;:&quot;9&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NathanGiesen@211&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:39339,&quot;statuses_count&quot;:473,&quot;name&quot;:&quot;Nathan Giesen&quot;,&quot;followers_count&quot;:49416},&quot;sender-location&quot;:point(&quot;36.86,74.62&quot;),&quot;send-time&quot;:datetime(&quot;2012-07-21T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voicemail-service&quot;}},&quot;message-text&quot;:&quot; love verizon its voicemail-service is awesome&quot;}
+    {&quot;tweetid&quot;:&quot;10&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;ColineGeyer@63&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:121,&quot;statuses_count&quot;:362,&quot;name&quot;:&quot;Coline Geyer&quot;,&quot;followers_count&quot;:17159},&quot;sender-location&quot;:point(&quot;29.15,76.53&quot;),&quot;send-time&quot;:datetime(&quot;2008-01-26T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;verizon&quot;,&quot;voice-clarity&quot;}},&quot;message-text&quot;:&quot; hate verizon its voice-clarity is OMG:(&quot;}
+    {&quot;tweetid&quot;:&quot;11&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;NilaMilliron_tw&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Nila Milliron&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;37.59,68.42&quot;),&quot;send-time&quot;:datetime(&quot;2008-03-09T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;iphone&quot;,&quot;platform&quot;}},&quot;message-text&quot;:&quot; can't stand iphone its platform is terrible&quot;}
+    {&quot;tweetid&quot;:&quot;12&quot;,&quot;user&quot;:{&quot;screen-name&quot;:&quot;OliJackson_512&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;friends_count&quot;:445,&quot;statuses_count&quot;:164,&quot;name&quot;:&quot;Oli Jackson&quot;,&quot;followers_count&quot;:22649},&quot;sender-location&quot;:point(&quot;24.82,94.63&quot;),&quot;send-time&quot;:datetime(&quot;2010-02-13T10:10:00&quot;),&quot;referred-topics&quot;:{{&quot;samsung&quot;,&quot;voice-command&quot;}},&quot;message-text&quot;:&quot; like samsung the voice-command is amazing:)&quot;}
+</pre></div></div>
+<p><a href="../data/fbu.adm">Facebook Users</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;id&quot;:1,&quot;alias&quot;:&quot;Margarita&quot;,&quot;name&quot;:&quot;MargaritaStoddard&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-20T10:10:00&quot;),&quot;friend-ids&quot;:{{2,3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Codetechno&quot;,&quot;start-date&quot;:date(&quot;2006-08-06&quot;)}]}
+    {&quot;id&quot;:2,&quot;alias&quot;:&quot;Isbel&quot;,&quot;name&quot;:&quot;IsbelDull&quot;,&quot;user-since&quot;:datetime(&quot;2011-01-22T10:10:00&quot;),&quot;friend-ids&quot;:{{1,4}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Hexviafind&quot;,&quot;start-date&quot;:date(&quot;2010-04-27&quot;)}]}
+    {&quot;id&quot;:3,&quot;alias&quot;:&quot;Emory&quot;,&quot;name&quot;:&quot;EmoryUnk&quot;,&quot;user-since&quot;:datetime(&quot;2012-07-10T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,8,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;geomedia&quot;,&quot;start-date&quot;:date(&quot;2010-06-17&quot;),&quot;end-date&quot;:date(&quot;2010-01-26&quot;)}]}
+    {&quot;id&quot;:4,&quot;alias&quot;:&quot;Nicholas&quot;,&quot;name&quot;:&quot;NicholasStroh&quot;,&quot;user-since&quot;:datetime(&quot;2010-12-27T10:10:00&quot;),&quot;friend-ids&quot;:{{2}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zamcorporation&quot;,&quot;start-date&quot;:date(&quot;2010-06-08&quot;)}]}
+    {&quot;id&quot;:5,&quot;alias&quot;:&quot;Von&quot;,&quot;name&quot;:&quot;VonKemble&quot;,&quot;user-since&quot;:datetime(&quot;2010-01-05T10:10:00&quot;),&quot;friend-ids&quot;:{{3,6,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Kongreen&quot;,&quot;start-date&quot;:date(&quot;2010-11-27&quot;)}]}
+    {&quot;id&quot;:6,&quot;alias&quot;:&quot;Willis&quot;,&quot;name&quot;:&quot;WillisWynne&quot;,&quot;user-since&quot;:datetime(&quot;2005-01-17T10:10:00&quot;),&quot;friend-ids&quot;:{{1,3,7}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;jaydax&quot;,&quot;start-date&quot;:date(&quot;2009-05-15&quot;)}]}
+    {&quot;id&quot;:7,&quot;alias&quot;:&quot;Suzanna&quot;,&quot;name&quot;:&quot;SuzannaTillson&quot;,&quot;user-since&quot;:datetime(&quot;2012-08-07T10:10:00&quot;),&quot;friend-ids&quot;:{{6}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Labzatron&quot;,&quot;start-date&quot;:date(&quot;2011-04-19&quot;)}]}
+    {&quot;id&quot;:8,&quot;alias&quot;:&quot;Nila&quot;,&quot;name&quot;:&quot;NilaMilliron&quot;,&quot;user-since&quot;:datetime(&quot;2008-01-01T10:10:00&quot;),&quot;friend-ids&quot;:{{3}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Plexlane&quot;,&quot;start-date&quot;:date(&quot;2010-02-28&quot;)}]}
+    {&quot;id&quot;:9,&quot;alias&quot;:&quot;Woodrow&quot;,&quot;name&quot;:&quot;WoodrowNehling&quot;,&quot;user-since&quot;:datetime(&quot;2005-09-20T10:10:00&quot;),&quot;friend-ids&quot;:{{3,10}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;Zuncan&quot;,&quot;start-date&quot;:date(&quot;2003-04-22&quot;),&quot;end-date&quot;:date(&quot;2009-12-13&quot;)}]}
+    {&quot;id&quot;:10,&quot;alias&quot;:&quot;Bram&quot;,&quot;name&quot;:&quot;BramHatch&quot;,&quot;user-since&quot;:datetime(&quot;2010-10-16T10:10:00&quot;),&quot;friend-ids&quot;:{{1,5,9}},&quot;employment&quot;:[{&quot;organization-name&quot;:&quot;physcane&quot;,&quot;start-date&quot;:date(&quot;2007-06-05&quot;),&quot;end-date&quot;:date(&quot;2011-11-05&quot;)}]}
+</pre></div></div>
+<p><a href="../data/fbm.adm">Facebook Messages</a></p>
+
+<div class="source">
+<div class="source">
+<pre>    {&quot;message-id&quot;:1,&quot;author-id&quot;:3,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;47.16,77.75&quot;),&quot;message&quot;:&quot; love sprint its shortcut-menu is awesome:)&quot;}
+    {&quot;message-id&quot;:2,&quot;author-id&quot;:1,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;41.66,80.87&quot;),&quot;message&quot;:&quot; dislike iphone its touch-screen is horrible&quot;}
+    {&quot;message-id&quot;:3,&quot;author-id&quot;:2,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;48.09,81.01&quot;),&quot;message&quot;:&quot; like samsung the plan is amazing&quot;}
+    {&quot;message-id&quot;:4,&quot;author-id&quot;:1,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;37.73,97.04&quot;),&quot;message&quot;:&quot; can't stand at&amp;t the network is horrible:(&quot;}
+    {&quot;message-id&quot;:5,&quot;author-id&quot;:6,&quot;in-response-to&quot;:2,&quot;sender-location&quot;:point(&quot;34.7,90.76&quot;),&quot;message&quot;:&quot; love sprint the customization is mind-blowing&quot;}
+    {&quot;message-id&quot;:6,&quot;author-id&quot;:2,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;31.5,75.56&quot;),&quot;message&quot;:&quot; like t-mobile its platform is mind-blowing&quot;}
+    {&quot;message-id&quot;:7,&quot;author-id&quot;:5,&quot;in-response-to&quot;:15,&quot;sender-location&quot;:point(&quot;32.91,85.05&quot;),&quot;message&quot;:&quot; dislike sprint the speed is horrible&quot;}
+    {&quot;message-id&quot;:8,&quot;author-id&quot;:1,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;40.33,80.87&quot;),&quot;message&quot;:&quot; like verizon the 3G is awesome:)&quot;}
+    {&quot;message-id&quot;:9,&quot;author-id&quot;:3,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;34.45,96.48&quot;),&quot;message&quot;:&quot; love verizon its wireless is good&quot;}
+    {&quot;message-id&quot;:10,&quot;author-id&quot;:1,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;42.5,70.01&quot;),&quot;message&quot;:&quot; can't stand motorola the touch-screen is terrible&quot;}
+    {&quot;message-id&quot;:11,&quot;author-id&quot;:1,&quot;in-response-to&quot;:1,&quot;sender-location&quot;:point(&quot;38.97,77.49&quot;),&quot;message&quot;:&quot; can't stand at&amp;t its plan is terrible&quot;}
+    {&quot;message-id&quot;:12,&quot;author-id&quot;:10,&quot;in-response-to&quot;:6,&quot;sender-location&quot;:point(&quot;42.26,77.76&quot;),&quot;message&quot;:&quot; can't stand t-mobile its voicemail-service is OMG:(&quot;}
+    {&quot;message-id&quot;:13,&quot;author-id&quot;:10,&quot;in-response-to&quot;:4,&quot;sender-location&quot;:point(&quot;42.77,78.92&quot;),&quot;message&quot;:&quot; dislike iphone the voice-command is bad:(&quot;}
+    {&quot;message-id&quot;:14,&quot;author-id&quot;:9,&quot;in-response-to&quot;:12,&quot;sender-location&quot;:point(&quot;41.33,85.28&quot;),&quot;message&quot;:&quot; love at&amp;t its 3G is good:)&quot;}
+    {&quot;message-id&quot;:15,&quot;author-id&quot;:7,&quot;in-response-to&quot;:11,&quot;sender-location&quot;:point(&quot;44.47,67.11&quot;),&quot;message&quot;:&quot; like iphone the voicemail-service is awesome&quot;}
+</pre></div></div>
+<p>It&#x2019;s loading time! We can use AQL <i>load</i> statements to populate our datasets with the sample records shown above. The following shows how loading can be done for data stored in <tt>.adm</tt> files in your local filesystem. <i>Note:</i> You <i>MUST</i> replace the <tt>&lt;Host Name&gt;</tt> and <tt>&lt;Absolute File Path&gt;</tt> placeholders in each load statement below with valid values based on the host IP address (or host name) for the machine and directory that you have downloaded the provided <tt>.adm</tt> files to. As you do so, be very, very careful to retain the two slashes in the load statements, i.e., do not delete the two slashes that appear in front of the absolute path to your <tt>.adm</tt> files. (This will lead to a three-slash character sequence at the start of each load statement&#x2019;s file input path specification.)</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    load dataset FacebookUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+
+    load dataset FacebookMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/fbm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+
+    load dataset TwitterUsers using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+
+    load dataset TweetMessages using localfs
+    ((&quot;path&quot;=&quot;&lt;Host Name&gt;://&lt;Absolute File Path&gt;/twm.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div>
+<p>&#x2014;-</p></div>
+<div class="section">
+<h2><a name="AQL:_Querying_Your_AsterixDB_Data"></a>AQL: Querying Your AsterixDB Data</h2>
+<p>Congratulations! You now have sample social data stored (and indexed) in AsterixDB. (You are part of an elite and adventurous group of individuals. :-)) Now that you have successfully loaded the provided sample data into the datasets that we defined, you can start running queries against them.</p>
+<p>The query language for AsterixDB is AQL&#x2014;the Asterix Query Language. AQL is loosely based on XQuery, the language developed and standardized in the early to mid 2000&#x2019;s by the World Wide Web Consortium (W3C) for querying semistructured data stored in their XML format. We have tossed all of the &#x201c;XML cruft&#x201d; out of their language but retained many of its core ideas. We did this because its design was developed over a period of years by a diverse committee of smart and experienced language designers, including &#x201c;SQL people&#x201d;, &#x201c;functional programming people&#x201d;, and &#x201c;XML people&#x201d;, all of whom were focused on how to design a new query language that operates well over semistructured data. (We decided to stand on their shoulders instead of starting from scratch and revisiting many of the same issues.) Note that AQL is not SQL and not based on SQL: In other words, AsterixDB is fully &#x201c;NoSQL compliant&#x201d;. :-)</p>
+<p>In this section we introduce AQL via a set of example queries, along with their expected results, based on the data above, to help you get started. Many of the most important features of AQL are presented in this set of representative queries. You can find more details in the document on the <a href="datamodel.html">Asterix Data Model (ADM)</a>, in the <a href="manual.html">AQL Reference Manual</a>, and a complete list of built-in functions is available in the <a href="functions.html">Asterix Functions</a> document.</p>
+<p>AQL is an expression language. Even the expression 1+1 is a valid AQL query that evaluates to 2. (Try it for yourself! Okay, maybe that&#x2019;s <i>not</i> the best use of a 512-node shared-nothing compute cluster.) Most useful AQL queries will be based on the <i>FLWOR</i> (pronounced &#x201c;flower&#x201d;) expression structure that AQL has borrowed from XQuery ((<a class="externalLink" href="http://en.wikipedia.org/wiki/FLWOR))">http://en.wikipedia.org/wiki/FLWOR))</a>. The FLWOR expression syntax supports both the incremental binding (<i>for</i>) of variables to ADM data instances in a dataset (or in the result of any AQL expression, actually) and the full binding (<i>let</i>) of variables to entire intermediate results in a fashion similar to temporary views in the SQL world. FLWOR is an acronym that is short for <i>for</i>-<i>let</i>-<i>where</i>-<i>order by</i>-<i>return</i>, naming five of the most frequently used clauses from the syntax of a full AQL query. AQL also inclu
 des <i>group by</i> and <i>limit</i> clauses, as you will see shortly. Roughly speaking, for SQL afficiandos, the <i>for</i> clause in AQL is like the <i>from</i> clause in SQL, the <i>return</i> clause in AQL is like the <i>select</i> clause in SQL (but appears at the end instead of the beginning of a query), the <i>let</i> clause in AQL is like SQL&#x2019;s <i>with</i> clause, and the <i>where</i> and <i>order by</i> clauses in both languages are similar.</p>
+<p>Enough talk! Let&#x2019;s go ahead and try writing some queries and see about learning AQL by example.</p>
+<div class="section">
+<h3><a name="Query_0-A_-_Exact-Match_Lookup"></a>Query 0-A - Exact-Match Lookup</h3>
+<p>For our first query, let&#x2019;s find a Facebook user based on his or her user id. Suppose the user we want is the user whose id is 8:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    where $user.id = 8
+    return $user;
+</pre></div></div>
+<p>The query&#x2019;s <i>for</i> clause binds the variable <tt>$user</tt> incrementally to the data instances residing in the dataset named FacebookUsers. Its <i>where</i> clause selects only those bindings having a user id of interest, filtering out the rest. The <i>return</i> clause returns the (entire) data instance for each binding that satisfies the predicate. Since this dataset is indexed on user id (its primary key), this query will be done via a quick index lookup.</p>
+<p>The expected result for our sample data is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_0-B_-_Range_Scan"></a>Query 0-B - Range Scan</h3>
+<p>AQL, like SQL, supports a variety of different predicates. For example, for our next query, let&#x2019;s find the Facebook users whose ids are in the range between 2 and 4:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    where $user.id &gt;= 2 and $user.id &lt;= 4
+    return $user;
+</pre></div></div>
+<p>This query&#x2019;s expected result, also evaluable using the primary index on user id, is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_1_-_Other_Query_Filters"></a>Query 1 - Other Query Filters</h3>
+<p>AQL can do range queries on any data type that supports the appropriate set of comparators. As an example, this next query retrieves the Facebook users who joined between July 22, 2010 and July 29, 2012:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    where $user.user-since &gt;= datetime('2010-07-22T00:00:00')
+      and $user.user-since &lt;= datetime('2012-07-29T23:59:59')
+    return $user;
+</pre></div></div>
+<p>The expected result for this query, also an indexable query, is as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-A_-_Equijoin"></a>Query 2-A - Equijoin</h3>
+<p>In addition to simply binding variables to data instances and returning them &#x201c;whole&#x201d;, an AQL query can construct new ADM instances to return based on combinations of its variable bindings. This gives AQL the power to do joins much like those done using multi-table <i>from</i> clauses in SQL. For example, suppose we wanted a list of all Facebook users paired with their associated messages, with the list enumerating the author name and the message text associated with each Facebook message. We could do this as follows in AQL:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    for $message in dataset FacebookMessages
+    where $message.author-id = $user.id
+    return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The result of this query is a sequence of new ADM instances, one for each author/message pair. Each instance in the result will be an ADM record containing two fields, &#x201c;uname&#x201d; and &#x201c;message&#x201d;, containing the user&#x2019;s name and the message text, respectively, for each author/message pair. (Note that &#x201c;uname&#x201d; and &#x201c;message&#x201d; are both simple AQL expressions themselves&#x2014;so in the most general case, even the resulting field names can be computed as part of the query, making AQL a very powerful tool for slicing and dicing semistructured data.)</p>
+<p>The expected result of this example AQL join query for our sample data set is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_2-B_-_Index_join"></a>Query 2-B - Index join</h3>
+<p>By default, AsterixDB evaluates equijoin queries using hash-based join methods that work well for doing ad hoc joins of very large data sets (<a class="externalLink" href="http://en.wikipedia.org/wiki/Hash_join">http://en.wikipedia.org/wiki/Hash_join</a>). On a cluster, hash partitioning is employed as AsterixDB&#x2019;s divide-and-conquer strategy for computing large parallel joins. AsterixDB includes other join methods, but in the absence of data statistics and selectivity estimates, it doesn&#x2019;t (yet) have the know-how to intelligently choose among its alternatives. We therefore asked ourselves the classic question&#x2014;WWOD?&#x2014;What Would Oracle Do?&#x2014;and in the interim, AQL includes a clunky (but useful) hint-based mechanism for addressing the occasional need to suggest to AsterixDB which join method it should use for a particular AQL query.</p>
+<p>The following query is similar to Query 2-A but includes a suggestion to AsterixDB that it should consider employing an index-based nested-loop join technique to process the query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    for $message in dataset FacebookMessages
+    where $message.author-id /*+ indexnl */  = $user.id
+    return {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+    };
+</pre></div></div>
+<p>The expected result is (of course) the same as before, modulo the order of the instances. Result ordering is (intentionally) undefined in AQL in the absence of an <i>order by</i> clause. The query result for our sample data in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love sprint its shortcut-menu is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like samsung the plan is amazing&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot; }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;message&quot;: &quot; love sprint the customization is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot; }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;message&quot;: &quot; dislike sprint the speed is horrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot; }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;message&quot;: &quot; love verizon its wireless is good&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot; }
+    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;message&quot;: &quot; love at&amp;t its 3G is good:)&quot; }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+</pre></div></div>
+<p>(It is worth knowing, with respect to influencing AsterixDB&#x2019;s query evaluation, that nested <i>for</i> clauses&#x2014;a.k.a. joins&#x2014; are currently evaluated with the &#x201c;outer&#x201d; clause probing the data of the &#x201c;inner&#x201d; clause.)</p></div>
+<div class="section">
+<h3><a name="Query_3_-_Nested_Outer_Join"></a>Query 3 - Nested Outer Join</h3>
+<p>In order to support joins between tables with missing/dangling join tuples, the designers of SQL ended up shoe-horning a subset of the relational algebra into SQL&#x2019;s <i>from</i> clause syntax&#x2014;and providing a variety of join types there for users to choose from. Left outer joins are particularly important in SQL, e.g., to print a summary of customers and orders, grouped by customer, without omitting those customers who haven&#x2019;t placed any orders yet.</p>
+<p>The AQL language supports nesting, both of queries and of query results, and the combination allows for an arguably cleaner/more natural approach to such queries. As an example, supposed we wanted, for each Facebook user, to produce a record that has his/her name plus a list of the messages written by that user. In SQL, this would involve a left outer join between users and messages, grouping by user, and having the user name repeated along side each message. In AQL, this sort of use case can be handled (more naturally) as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset FacebookUsers
+    return {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: for $message in dataset FacebookMessages
+            where $message.author-id = $user.id
+            return $message.message
+    };
+</pre></div></div>
+<p>This AQL query binds the variable <tt>$user</tt> to the data instances in FacebookUsers; for each user, it constructs a result record containing a &#x201c;uname&#x201d; field with the user&#x2019;s name and a &#x201c;messages&#x201d; field with a nested collection of all messages for that user. The nested collection for each user is specified by using a correlated subquery. (Note: While it looks like nested loops could be involved in computing the result, AsterixDB recogizes the equivalence of such a query to an outerjoin, and it will use an efficient hash-based strategy when actually computing the query&#x2019;s result.)</p>
+<p>Here is this example query&#x2019;s expected output:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;uname&quot;: &quot;MargaritaStoddard&quot;, &quot;messages&quot;: [ &quot; dislike iphone its touch-screen is horrible&quot;, &quot; can't stand at&amp;t the network is horrible:(&quot;, &quot; like verizon the 3G is awesome:)&quot;, &quot; can't stand motorola the touch-screen is terrible&quot;, &quot; can't stand at&amp;t its plan is terrible&quot; ] }
+    { &quot;uname&quot;: &quot;IsbelDull&quot;, &quot;messages&quot;: [ &quot; like samsung the plan is amazing&quot;, &quot; like t-mobile its platform is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;EmoryUnk&quot;, &quot;messages&quot;: [ &quot; love sprint its shortcut-menu is awesome:)&quot;, &quot; love verizon its wireless is good&quot; ] }
+    { &quot;uname&quot;: &quot;NicholasStroh&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;VonKemble&quot;, &quot;messages&quot;: [ &quot; dislike sprint the speed is horrible&quot; ] }
+    { &quot;uname&quot;: &quot;WillisWynne&quot;, &quot;messages&quot;: [ &quot; love sprint the customization is mind-blowing&quot; ] }
+    { &quot;uname&quot;: &quot;SuzannaTillson&quot;, &quot;messages&quot;: [ &quot; like iphone the voicemail-service is awesome&quot; ] }
+    { &quot;uname&quot;: &quot;NilaMilliron&quot;, &quot;messages&quot;: [  ] }
+    { &quot;uname&quot;: &quot;WoodrowNehling&quot;, &quot;messages&quot;: [ &quot; love at&amp;t its 3G is good:)&quot; ] }
+    { &quot;uname&quot;: &quot;BramHatch&quot;, &quot;messages&quot;: [ &quot; dislike iphone the voice-command is bad:(&quot;, &quot; can't stand t-mobile its voicemail-service is OMG:(&quot; ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_4_-_Theta_Join"></a>Query 4 - Theta Join</h3>
+<p>Not all joins are expressible as equijoins and computable using equijoin-oriented algorithms. The join predicates for some use cases involve predicates with functions; AsterixDB supports the expression of such queries and will still evaluate them as best it can using nested loop based techniques (and broadcast joins in the parallel case).</p>
+<p>As an example of such a use case, suppose that we wanted, for each tweet T, to find all of the other tweets that originated from within a circle of radius of 1 surrounding tweet T&#x2019;s location. In AQL, this can be specified in a manner similar to the previous query using one of the built-in functions on the spatial data type instead of id equality in the correlated query&#x2019;s <i>where</i> clause:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    return {
+    &quot;message&quot;: $t.message-text,
+    &quot;nearby-messages&quot;: for $t2 in dataset TweetMessages
+                where spatial-distance($t.sender-location, $t2.sender-location) &lt;= 1
+                return { &quot;msgtxt&quot;:$t2.message-text}
+    };
+</pre></div></div>
+<p>Here is the expected result for this query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;message&quot;: &quot; love t-mobile its customization is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love t-mobile its customization is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; }, { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand iphone its platform is terrible&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand iphone its platform is terrible&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the voice-command is amazing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the voice-command is amazing:)&quot; } ] }
+    { &quot;message&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; like motorola the speed is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, { &quot;msgtxt&quot;: &quot; like motorola the speed is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; } ] }
+    { &quot;message&quot;: &quot; can't stand motorola its speed is terrible:(&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; can't stand motorola its speed is terrible:(&quot; } ] }
+    { &quot;message&quot;: &quot; like iphone the voice-clarity is good:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like iphone the voice-clarity is good:)&quot; } ] }
+    { &quot;message&quot;: &quot; like samsung the platform is good&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like samsung the platform is good&quot; } ] }
+    { &quot;message&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; } ] }
+    { &quot;message&quot;: &quot; love verizon its voicemail-service is awesome&quot;, &quot;nearby-messages&quot;: [ { &quot;msgtxt&quot;: &quot; love verizon its voicemail-service is awesome&quot; } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_5_-_Fuzzy_Join"></a>Query 5 - Fuzzy Join</h3>
+<p>As another example of a non-equijoin use case, we could ask AsterixDB to find, for each Facebook user, all Twitter users with names &#x201c;similar&#x201d; to their name. AsterixDB supports a variety of &#x201c;fuzzy match&#x201d; functions for use with textual and set-based data. As one example, we could choose to use edit distance with a threshold of 3 as the definition of name similarity, in which case we could write the following query using AQL&#x2019;s operator-based syntax (~=) for testing whether or not two values are similar:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+
+    for $fbu in dataset FacebookUsers
+    return {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: for $t in dataset TweetMessages
+                let $tu := $t.user
+                where $tu.name ~= $fbu.name
+                return {
+                &quot;twitter-screenname&quot;: $tu.screen-name,
+                &quot;twitter-name&quot;: $tu.name
+                }
+    };
+</pre></div></div>
+<p>The expected result for this query against our sample data is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 2, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 3, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 4, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 5, &quot;name&quot;: &quot;VonKemble&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 6, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 7, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 8, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;similar-users&quot;: [ { &quot;twitter-screenname&quot;: &quot;NilaMilliron_tw&quot;, &quot;twitter-name&quot;: &quot;Nila Milliron&quot; } ] }
+    { &quot;id&quot;: 9, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;similar-users&quot;: [  ] }
+    { &quot;id&quot;: 10, &quot;name&quot;: &quot;BramHatch&quot;, &quot;similar-users&quot;: [  ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_6_-_Existential_Quantification"></a>Query 6 - Existential Quantification</h3>
+<p>The expressive power of AQL includes support for queries involving &#x201c;some&#x201d; (existentially quantified) and &#x201c;all&#x201d; (universally quantified) query semantics. As an example of an existential AQL query, here we show a query to list the Facebook users who are currently employed. Such employees will have an employment history containing a record with a null end-date value, which leads us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $fbu in dataset FacebookUsers
+    where (some $e in $fbu.employment satisfies is-null($e.end-date))
+    return $fbu;
+</pre></div></div>
+<p>The expected result in this case is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 1, &quot;alias&quot;: &quot;Margarita&quot;, &quot;name&quot;: &quot;MargaritaStoddard&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2, 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Codetechno&quot;, &quot;start-date&quot;: date(&quot;2006-08-06&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 2, &quot;alias&quot;: &quot;Isbel&quot;, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;user-since&quot;: datetime(&quot;2011-01-22T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 4 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Hexviafind&quot;, &quot;start-date&quot;: date(&quot;2010-04-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 4, &quot;alias&quot;: &quot;Nicholas&quot;, &quot;name&quot;: &quot;NicholasStroh&quot;, &quot;user-since&quot;: datetime(&quot;2010-12-27T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 2 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zamcorporation&quot;, &quot;start-date&quot;: date(&quot;2010-06-08&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 5, &quot;alias&quot;: &quot;Von&quot;, &quot;name&quot;: &quot;VonKemble&quot;, &quot;user-since&quot;: datetime(&quot;2010-01-05T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 6, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Kongreen&quot;, &quot;start-date&quot;: date(&quot;2010-11-27&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 6, &quot;alias&quot;: &quot;Willis&quot;, &quot;name&quot;: &quot;WillisWynne&quot;, &quot;user-since&quot;: datetime(&quot;2005-01-17T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 3, 7 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;jaydax&quot;, &quot;start-date&quot;: date(&quot;2009-05-15&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ] }
+    { &quot;id&quot;: 8, &quot;alias&quot;: &quot;Nila&quot;, &quot;name&quot;: &quot;NilaMilliron&quot;, &quot;user-since&quot;: datetime(&quot;2008-01-01T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Plexlane&quot;, &quot;start-date&quot;: date(&quot;2010-02-28&quot;), &quot;end-date&quot;: null } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_7_-_Universal_Quantification"></a>Query 7 - Universal Quantification</h3>
+<p>As an example of a universal AQL query, here we show a query to list the Facebook users who are currently unemployed. Such employees will have an employment history containing no records with null end-date values, leading us to the following AQL query:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $fbu in dataset FacebookUsers
+    where (every $e in $fbu.employment satisfies not(is-null($e.end-date)))
+    return $fbu;
+</pre></div></div>
+<p>Here is the expected result for our sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ] }
+    { &quot;id&quot;: 9, &quot;alias&quot;: &quot;Woodrow&quot;, &quot;name&quot;: &quot;WoodrowNehling&quot;, &quot;user-since&quot;: datetime(&quot;2005-09-20T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 3, 10 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Zuncan&quot;, &quot;start-date&quot;: date(&quot;2003-04-22&quot;), &quot;end-date&quot;: date(&quot;2009-12-13&quot;) } ] }
+    { &quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }}, &quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ] }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_8_-_Simple_Aggregation"></a>Query 8 - Simple Aggregation</h3>
+<p>Like SQL, the AQL language of AsterixDB provides support for computing aggregates over large amounts of data. As a very simple example, the following AQL query computes the total number of Facebook users:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    count(for $fbu in dataset FacebookUsers return $fbu);
+</pre></div></div>
+<p>In AQL, aggregate functions can be applied to arbitrary subquery results; in this case, the count function is applied to the result of a query that enumerates the Facebook users. The expected result here is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    10
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-A_-_Grouping_and_Aggregation"></a>Query 9-A - Grouping and Aggregation</h3>
+<p>Also like SQL, AQL supports grouped aggregation. For every Twitter user, the following group-by/aggregate query counts the number of tweets sent by that user:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name with $t
+    return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>The <i>for</i> clause incrementally binds $t to tweets, and the <i>group by</i> clause groups the tweets by its issuer&#x2019;s Twitter screen-name. Unlike SQL, where data is tabular&#x2014;flat&#x2014;the data model underlying AQL allows for nesting. Thus, following the <i>group by</i> clause, the <i>return</i> clause in this query sees a sequence of $t groups, with each such group having an associated $uid variable value (i.e., the tweeting user&#x2019;s screen name). In the context of the return clause, due to &#x201c;&#x2026; with $t &#x2026;&#x201d;, $uid is bound to the tweeter&#x2019;s id and $t is bound to the <i>set</i> of tweets issued by that tweeter. The return clause constructs a result record containing the tweeter&#x2019;s user id and the count of the items in the associated tweet set. The query result will contain one such record per screen name. This query also illustrates another feature of AQL; notice that each user&#x2019;s screen name is accessed via a path s
 yntax that traverses each tweet&#x2019;s nested record structure.</p>
+<p>Here is the expected result for this query over the sample data:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_9-B_-_Hash-Based_Grouping_and_Aggregation"></a>Query 9-B - (Hash-Based) Grouping and Aggregation</h3>
+<p>As for joins, AsterixDB has multiple evaluation strategies available for processing grouped aggregate queries. For grouped aggregation, the system knows how to employ both sort-based and hash-based aggregation methods, with sort-based methods being used by default and a hint being available to suggest that a different approach be used in processing a particular AQL query.</p>
+<p>The following query is similar to Query 9-A, but adds a hash-based aggregation hint:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    /*+ hash*/
+    group by $uid := $t.user.screen-name with $t
+    return {
+    &quot;user&quot;: $uid,
+    &quot;count&quot;: count($t)
+    };
+</pre></div></div>
+<p>Here is the expected result:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;OliJackson_512&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+    { &quot;user&quot;: &quot;ChangEwing_573&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_10_-_Grouping_and_Limits"></a>Query 10 - Grouping and Limits</h3>
+<p>In some use cases it is not necessary to compute the entire answer to a query. In some cases, just having the first <i>N</i> or top <i>N</i> results is sufficient. This is expressible in AQL using the <i>limit</i> clause combined with the <i>order by</i> clause.</p>
+<p>The following AQL query returns the top 3 Twitter users based on who has issued the most tweets:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $t in dataset TweetMessages
+    group by $uid := $t.user.screen-name with $t
+    let $c := count($t)
+    order by $c desc
+    limit 3
+    return {
+        &quot;user&quot;: $uid,
+        &quot;count&quot;: $c
+    };
+</pre></div></div>
+<p>The expected result for this query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;user&quot;: &quot;NathanGiesen@211&quot;, &quot;count&quot;: 6 }
+    { &quot;user&quot;: &quot;ColineGeyer@63&quot;, &quot;count&quot;: 3 }
+    { &quot;user&quot;: &quot;NilaMilliron_tw&quot;, &quot;count&quot;: 1 }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Query_11_-_Left_Outer_Fuzzy_Join"></a>Query 11 - Left Outer Fuzzy Join</h3>
+<p>As a last example of AQL and its query power, the following query, for each tweet, finds all of the tweets that are similar based on the topics that they refer to:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.3&quot;;
+
+    for $t in dataset TweetMessages
+    return {
+        &quot;tweet&quot;: $t,
+        &quot;similar-tweets&quot;: for $t2 in dataset TweetMessages
+                where  $t2.referred-topics ~= $t.referred-topics
+                and $t2.tweetid != $t.tweetid
+                return $t2.referred-topics
+    };
+</pre></div></div>
+<p>This query illustrates several things worth knowing in order to write fuzzy queries in AQL. First, as mentioned earlier, AQL offers an operator-based syntax for seeing whether two values are &#x201c;similar&#x201d; to one another or not. Second, recall that the referred-topics field of records of datatype TweetMessageType is a bag of strings. This query sets the context for its similarity join by requesting that Jaccard-based similarity semantics (<a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">http://en.wikipedia.org/wiki/Jaccard_index</a>) be used for the query&#x2019;s similarity operator and that a similarity index of 0.3 be used as its similarity threshold.</p>
+<p>The expected result for this fuzzy join query is:</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;1&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;47.44,80.65&quot;), &quot;send-time&quot;: datetime(&quot;2008-04-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, &quot;message-text&quot;: &quot; love t-mobile its customization is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;10&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;29.15,76.53&quot;), &quot;send-time&quot;: datetime(&quot;2008-01-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; hate verizon its voice-clarity is OMG:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;11&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NilaMilliron_tw&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Nila Milliron&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;37.59,68.42&quot;), &quot;send-time&quot;: datetime(&quot;2008-03-09T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; can't stand iphone its platform is terrible&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, {{ &quot;samsung&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;12&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;OliJackson_512&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 445, &quot;statuses_count&quot;: 164, &quot;name&quot;: &quot;Oli Jackson&quot;, &quot;followers_count&quot;: 22649 }, &quot;sender-location&quot;: point(&quot;24.82,94.63&quot;), &quot;send-time&quot;: datetime(&quot;2010-02-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like samsung the voice-command is amazing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;platform&quot; }}, {{ &quot;sprint&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;2&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;32.84,67.14&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-13T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like verizon its shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;3&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;29.72,75.8&quot;), &quot;send-time&quot;: datetime(&quot;2006-11-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; like motorola the speed is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;39.28,70.48&quot;), &quot;send-time&quot;: datetime(&quot;2011-12-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;sprint&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;5&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;40.09,92.69&quot;), &quot;send-time&quot;: datetime(&quot;2006-08-04T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;motorola&quot;, &quot;speed&quot; }}, &quot;message-text&quot;: &quot; can't stand motorola its speed is terrible:(&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;motorola&quot;, &quot;speed&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;6&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ColineGeyer@63&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 121, &quot;statuses_count&quot;: 362, &quot;name&quot;: &quot;Coline Geyer&quot;, &quot;followers_count&quot;: 17159 }, &quot;sender-location&quot;: point(&quot;47.51,83.99&quot;), &quot;send-time&quot;: datetime(&quot;2010-05-07T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;iphone&quot;, &quot;voice-clarity&quot; }}, &quot;message-text&quot;: &quot; like iphone the voice-clarity is good:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;verizon&quot;, &quot;voice-clarity&quot; }}, {{ &quot;iphone&quot;, &quot;platform&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 182, &quot;statuses_count&quot;: 394, &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: 32136 }, &quot;sender-location&quot;: point(&quot;36.21,72.6&quot;), &quot;send-time&quot;: datetime(&quot;2011-08-25T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;iphone&quot;, &quot;platform&quot; }}, {{ &quot;samsung&quot;, &quot;voice-command&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;8&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;46.05,93.34&quot;), &quot;send-time&quot;: datetime(&quot;2005-10-14T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;t-mobile&quot;, &quot;shortcut-menu&quot; }}, &quot;message-text&quot;: &quot; like t-mobile the shortcut-menu is awesome:)&quot; }, &quot;similar-tweets&quot;: [ {{ &quot;t-mobile&quot;, &quot;customization&quot; }}, {{ &quot;verizon&quot;, &quot;shortcut-menu&quot; }} ] }
+    { &quot;tweet&quot;: { &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;36.86,74.62&quot;), &quot;send-time&quot;: datetime(&qu

<TRUNCATED>


[21/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/css/print.css
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/css/print.css b/content/docs/0.8.8-incubating/css/print.css
new file mode 100644
index 0000000..1cd02d9
--- /dev/null
+++ b/content/docs/0.8.8-incubating/css/print.css
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Id: print.css 1201871 2011-11-14 20:18:24Z simonetripodi $ */
+
+#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {display: none !important;}
+#bodyColumn, body.docs div.docs {margin: 0 !important;border: none !important}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/css/site.css
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/css/site.css b/content/docs/0.8.8-incubating/css/site.css
new file mode 100644
index 0000000..055e7e2
--- /dev/null
+++ b/content/docs/0.8.8-incubating/css/site.css
@@ -0,0 +1 @@
+/* You can override this file with your own styles */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/csv.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/csv.html b/content/docs/0.8.8-incubating/csv.html
new file mode 100644
index 0000000..fb2bdb8
--- /dev/null
+++ b/content/docs/0.8.8-incubating/csv.html
@@ -0,0 +1,416 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; CSV Support in AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>CSV Support in AsterixDB</h1>
+<div class="section">
+<h2><a name="Introduction_-_Defining_a_datatype_for_CSV"></a>Introduction - Defining a datatype for CSV</h2>
+<p>AsterixDB supports the CSV format for both data input and query result output. In both cases, the structure of the CSV data must be defined using a named ADM record datatype. The CSV format, limitations, and MIME type are defined by <a class="externalLink" href="https://tools.ietf.org/html/rfc4180">RFC 4180</a>.</p>
+<p>CSV is not as expressive as the full Asterix Data Model, meaning that not all data which can be represented in ADM can also be represented as CSV. So the form of this datatype is limited. First, obviously it may not contain any nested records or lists, as CSV has no way to represent nested data structures. All fields in the record type must be primitive. Second, the set of supported primitive types is limited to numerics (<tt>int8</tt>, <tt>int16</tt>, <tt>int32</tt>, <tt>int64</tt>, <tt>float</tt>, <tt>double</tt>) and <tt>string</tt>. On output, a few additional primitive types (<tt>boolean</tt>, datetime types) are supported and will be represented as strings.</p>
+<p>For the purposes of this document, we will use the following dataverse and datatype definitions:</p>
+
+<div class="source">
+<div class="source">
+<pre>drop dataverse csv if exists;
+create dataverse csv;
+use dataverse csv;
+
+create type &quot;csv_type&quot; as closed {
+    &quot;id&quot;: int32,
+    &quot;money&quot;: float,
+    &quot;name&quot;: string
+};
+
+create dataset &quot;csv_set&quot; (&quot;csv_type&quot;) primary key &quot;id&quot;;
+</pre></div></div>
+<p>Note: There is no explicit restriction against using an open datatype for CSV purposes, and you may have optional fields in the datatype (eg., <tt>id: int32?</tt>). However, the CSV format itself is rigid, so using either of these datatype features introduces possible failure modes on output which will be discussed below.</p></div>
+<div class="section">
+<h2><a name="CSV_Input"></a>CSV Input</h2>
+<p>CSV data may be loaded into a dataset using the normal &#x201c;load dataset&#x201d; mechanisms, utilizing the builtin &#x201c;delimited-text&#x201d; format. See <a href="aql/externaldata.html">Accessing External Data</a> for more details. Note that comma is the default value for the &#x201c;delimiter&#x201d; parameter, so it does not need to be explicitly specified.</p>
+<p>In this case, the datatype used to interpret the CSV data is the datatype associated with the dataset being loaded. So, to load a file that we have stored locally on the NC into our example dataset:</p>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse csv;
+
+load dataset &quot;csv_set&quot; using localfs
+((&quot;path&quot;=&quot;127.0.0.1:///tmp/my_sample.csv&quot;),
+ (&quot;format&quot;=&quot;delimited-text&quot;));
+</pre></div></div>
+<p>So, if the file <tt>/tmp/my_sample.csv</tt> contained</p>
+
+<div class="source">
+<div class="source">
+<pre>1,18.50,&quot;Peter Krabnitz&quot;
+2,74.50,&quot;Jesse Stevens&quot;
+</pre></div></div>
+<p>then the preceding query would load it into the dataset <tt>csv_set</tt>.</p>
+<p>If your CSV file has a header (that is, the first line contains a set of field names, rather than actual data), you can instruct Asterix to ignore this header by adding the parameter <tt>&quot;header&quot;=&quot;true&quot;</tt>, eg.</p>
+
+<div class="source">
+<div class="source">
+<pre>load dataset &quot;csv_set&quot; using localfs
+((&quot;path&quot;=&quot;127.0.0.1:///tmp/my_header_sample.csv&quot;),
+ (&quot;format&quot;=&quot;delimited-text&quot;),
+ (&quot;header&quot;=&quot;true&quot;));
+</pre></div></div>
+<p>CSV data may also be loaded from HDFS; see <a href="aql/externaldata.html">Accessing External Data</a> for details. However please note that CSV files on HDFS cannot have headers. Attempting to specify &#x201c;header&#x201d;=&#x201c;true&#x201d; when reading from HDFS could result in non-header lines of data being skipped as well.</p></div>
+<div class="section">
+<h2><a name="CSV_Output"></a>CSV Output</h2>
+<p>Any query may be rendered as CSV when using AsterixDB&#x2019;s HTTP interface. To do so, there are two steps required: specify the record type which defines the schema of your CSV, and request that Asterix use the CSV output format.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Output_Record_Type"></a>Output Record Type</h4>
+<p>Background: The result of any AQL query is an unordered list of <i>instances</i>, where each <i>instance</i> is an instance of an AQL datatype. When requesting CSV output, there are some restrictions on the legal datatypes in this unordered list due to the limited expressability of CSV:</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>Each instance must be of a record type.</li>
+  
+<li>Each instance must be of the <i>same</i> record type.</li>
+  
+<li>The record type must conform to the content and type restrictions mentioned in the introduction.</li>
+</ol>
+<p>While it would be possible to structure your query to cast all result instances to a given type, it is not necessary. AQL offers a built-in feature which will automatically cast all top-level instances in the result to a specified named ADM record type. To enable this feature, use a <tt>set</tt> statement prior to the query to set the parameter <tt>output-record-type</tt> to the name of an ADM type. This type must have already been defined in the current dataverse.</p>
+<p>For example, the following request will ensure that all result instances are cast to the <tt>csv_type</tt> type declared earlier:</p>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse csv;
+set output-record-type &quot;csv_type&quot;;
+
+for $n in dataset &quot;csv_set&quot; return $n;
+</pre></div></div>
+<p>In this case the casting is redundant since by definition every value in <tt>csv_set</tt> is already of type <tt>csv_type</tt>. But consider a more complex query where the result values are created by joining fields from different underlying datasets, etc.</p>
+<p>Two notes about <tt>output-record-type</tt>:</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>This feature is not strictly related to CSV; it may be used with any output formats (in which case, any record datatype may be specified, not subject to the limitations specified in the introduction of this page).</li>
+  
+<li>When the CSV output format is requested, <tt>output-record-type</tt> is in fact required, not optional. This is because the type is used to determine the field names for the CSV header and to ensure that the ordering of fields in the output is consistent (which is obviously vital for the CSV to make any sense).</li>
+</ol></div>
+<div class="section">
+<h4><a name="Request_the_CSV_Output_Format"></a>Request the CSV Output Format</h4>
+<p>When sending requests to the Asterix HTTP API, Asterix decides what format to use for rendering the results in one of two ways:</p>
+
+<ul>
+  
+<li>
+<p>A HTTP query parameter named &#x201c;output&#x201d;, which must be set to one of  the following values: <tt>JSON</tt>, <tt>CSV</tt>, or <tt>ADM</tt>.</p></li>
+  
+<li>
+<p>Based on the <a class="externalLink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1"><tt>Accept</tt> HTTP header</a></p></li>
+</ul>
+<p>By default, Asterix will produce JSON output. To select CSV output, pass the parameter <tt>output=CSV</tt>, or set the <tt>Accept</tt> header on your request to the MIME type <tt>text/csv</tt>. The details of how to accomplish this will of course depend on what tools you are using to contact the HTTP API. Here is an example from a Unix shell prompt using the command-line utility &#x201c;curl&#x201d; and specifying the &quot;output query parameter:</p>
+
+<div class="source">
+<div class="source">
+<pre>curl -G &quot;http://localhost:19002/query&quot; \
+    --data-urlencode 'output=CSV' \
+    --data-urlencode 'query=use dataverse csv;
+          set output-record-type &quot;csv_type&quot;;
+          for $n in dataset csv_set return $n;'
+</pre></div></div>
+<p>Alternately, the same query using the <tt>Accept</tt> header:</p>
+
+<div class="source">
+<div class="source">
+<pre>curl -G -H &quot;Accept: text/csv&quot; &quot;http://localhost:19002/query&quot; \
+    --data-urlencode 'query=use dataverse csv;
+          set output-record-type &quot;csv_type&quot;;
+          for $n in dataset csv_set return $n;'
+</pre></div></div>
+<p>Similarly, a trivial Java program to execute the above sample query and selecting CSV output via the <tt>Accept</tt> header would be:</p>
+
+<div class="source">
+<div class="source">
+<pre>import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class AsterixExample {
+    public static void main(String[] args) throws Exception {
+        String query = &quot;use dataverse csv; &quot; +
+            &quot;set output-record-type \&quot;csv_type\&quot;;&quot; +
+            &quot;for $n in dataset csv_set return $n&quot;;
+        URL asterix = new URL(&quot;http://localhost:19002/query?query=&quot; +
+                              URLEncoder.encode(query, &quot;UTF-8&quot;));
+        HttpURLConnection conn = (HttpURLConnection) asterix.openConnection();
+        conn.setRequestProperty(&quot;Accept&quot;, &quot;text/csv&quot;);
+        BufferedReader result = new BufferedReader
+            (new InputStreamReader(conn.getInputStream()));
+        String line;
+        while ((line = result.readLine()) != null) {
+            System.out.println(line);
+        }
+        result.close();
+    }
+}
+</pre></div></div>
+<p>For either of the above examples, the output would be:</p>
+
+<div class="source">
+<div class="source">
+<pre>1,18.5,&quot;Peter Krabnitz&quot;
+2,74.5,&quot;Jesse Stevens&quot;
+</pre></div></div>
+<p>assuming you had already run the previous examples to create the dataverse and populate the dataset.</p></div>
+<div class="section">
+<h4><a name="Outputting_CSV_with_a_Header"></a>Outputting CSV with a Header</h4>
+<p>By default, AsterixDB will produce CSV results with no header line. If you want a header, you may explicitly request it in one of two ways:</p>
+
+<ul>
+  
+<li>
+<p>By passing the HTTP query parameter &#x201c;header&#x201d; with the value &#x201c;present&#x201d;</p></li>
+  
+<li>
+<p>By specifying the MIME type {{text/csv; header=present}} in your HTTP Accept: header. This is consistent with RFC 4180.</p></li>
+</ul></div>
+<div class="section">
+<h4><a name="Issues_with_open_datatypes_and_optional_fields"></a>Issues with open datatypes and optional fields</h4>
+<p>As mentioned earlier, CSV is a rigid format. It cannot express records with different numbers of fields, which ADM allows through both open datatypes and optional fields.</p>
+<p>If your output record type contains optional fields, this will not result in any errors. If the output data of a query does not contain values for an optional field, this will be represented in CSV as <tt>null</tt>.</p>
+<p>If your output record type is open, this will also not result in any errors. If the output data of a query contains any open fields, the corresponding rows in the resulting CSV will contain more comma-separated values than the others. On each such row, the data from the closed fields in the type will be output first in the normal order, followed by the data from the open fields in an arbitrary order.</p>
+<p>According to RFC 4180 this is not strictly valid CSV (Section 2, rule 4, &#x201c;Each line <i>should</i> contain the same number of fields throughout the file&#x201d;). Hence it will likely not be handled consistently by all CSV processors. Some may throw a parsing error. If you attempt to load this data into AsterixDB later using <tt>load dataset</tt>, the extra fields will be silently ignored. For this reason it is recommended that you use only closed datatypes as output record types. AsterixDB allows to use an open record type only to support cases where the type already exists for other parts of your application.</p></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/data/fbm.adm
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/data/fbm.adm b/content/docs/0.8.8-incubating/data/fbm.adm
new file mode 100644
index 0000000..58d7f08
--- /dev/null
+++ b/content/docs/0.8.8-incubating/data/fbm.adm
@@ -0,0 +1,15 @@
+{"message-id":1,"author-id":3,"in-response-to":2,"sender-location":point("47.16,77.75"),"message":" love sprint its shortcut-menu is awesome:)"}
+{"message-id":2,"author-id":1,"in-response-to":4,"sender-location":point("41.66,80.87"),"message":" dislike iphone its touch-screen is horrible"}
+{"message-id":3,"author-id":2,"in-response-to":4,"sender-location":point("48.09,81.01"),"message":" like samsung the plan is amazing"}
+{"message-id":4,"author-id":1,"in-response-to":2,"sender-location":point("37.73,97.04"),"message":" can't stand at&t the network is horrible:("}
+{"message-id":5,"author-id":6,"in-response-to":2,"sender-location":point("34.7,90.76"),"message":" love sprint the customization is mind-blowing"}
+{"message-id":6,"author-id":2,"in-response-to":1,"sender-location":point("31.5,75.56"),"message":" like t-mobile its platform is mind-blowing"}
+{"message-id":7,"author-id":5,"in-response-to":15,"sender-location":point("32.91,85.05"),"message":" dislike sprint the speed is horrible"}
+{"message-id":8,"author-id":1,"in-response-to":11,"sender-location":point("40.33,80.87"),"message":" like verizon the 3G is awesome:)"}
+{"message-id":9,"author-id":3,"in-response-to":12,"sender-location":point("34.45,96.48"),"message":" love verizon its wireless is good"}
+{"message-id":10,"author-id":1,"in-response-to":12,"sender-location":point("42.5,70.01"),"message":" can't stand motorola the touch-screen is terrible"}
+{"message-id":11,"author-id":1,"in-response-to":1,"sender-location":point("38.97,77.49"),"message":" can't stand at&t its plan is terrible"}
+{"message-id":12,"author-id":10,"in-response-to":6,"sender-location":point("42.26,77.76"),"message":" can't stand t-mobile its voicemail-service is OMG:("}
+{"message-id":13,"author-id":10,"in-response-to":4,"sender-location":point("42.77,78.92"),"message":" dislike iphone the voice-command is bad:("}
+{"message-id":14,"author-id":9,"in-response-to":12,"sender-location":point("41.33,85.28"),"message":" love at&t its 3G is good:)"}
+{"message-id":15,"author-id":7,"in-response-to":11,"sender-location":point("44.47,67.11"),"message":" like iphone the voicemail-service is awesome"}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/data/fbu.adm
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/data/fbu.adm b/content/docs/0.8.8-incubating/data/fbu.adm
new file mode 100644
index 0000000..7e99ea4
--- /dev/null
+++ b/content/docs/0.8.8-incubating/data/fbu.adm
@@ -0,0 +1,10 @@
+{"id":1,"alias":"Margarita","name":"MargaritaStoddard","user-since":datetime("2012-08-20T10:10:00"),"friend-ids":{{2,3,6,10}},"employment":[{"organization-name":"Codetechno","start-date":date("2006-08-06")}]}
+{"id":2,"alias":"Isbel","name":"IsbelDull","user-since":datetime("2011-01-22T10:10:00"),"friend-ids":{{1,4}},"employment":[{"organization-name":"Hexviafind","start-date":date("2010-04-27")}]}
+{"id":3,"alias":"Emory","name":"EmoryUnk","user-since":datetime("2012-07-10T10:10:00"),"friend-ids":{{1,5,8,9}},"employment":[{"organization-name":"geomedia","start-date":date("2010-06-17"),"end-date":date("2010-01-26")}]}
+{"id":4,"alias":"Nicholas","name":"NicholasStroh","user-since":datetime("2010-12-27T10:10:00"),"friend-ids":{{2}},"employment":[{"organization-name":"Zamcorporation","start-date":date("2010-06-08")}]}
+{"id":5,"alias":"Von","name":"VonKemble","user-since":datetime("2010-01-05T10:10:00"),"friend-ids":{{3,6,10}},"employment":[{"organization-name":"Kongreen","start-date":date("2010-11-27")}]}
+{"id":6,"alias":"Willis","name":"WillisWynne","user-since":datetime("2005-01-17T10:10:00"),"friend-ids":{{1,3,7}},"employment":[{"organization-name":"jaydax","start-date":date("2009-05-15")}]}
+{"id":7,"alias":"Suzanna","name":"SuzannaTillson","user-since":datetime("2012-08-07T10:10:00"),"friend-ids":{{6}},"employment":[{"organization-name":"Labzatron","start-date":date("2011-04-19")}]}
+{"id":8,"alias":"Nila","name":"NilaMilliron","user-since":datetime("2008-01-01T10:10:00"),"friend-ids":{{3}},"employment":[{"organization-name":"Plexlane","start-date":date("2010-02-28")}]}
+{"id":9,"alias":"Woodrow","name":"WoodrowNehling","user-since":datetime("2005-09-20T10:10:00"),"friend-ids":{{3,10}},"employment":[{"organization-name":"Zuncan","start-date":date("2003-04-22"),"end-date":date("2009-12-13")}]}
+{"id":10,"alias":"Bram","name":"BramHatch","user-since":datetime("2010-10-16T10:10:00"),"friend-ids":{{1,5,9}},"employment":[{"organization-name":"physcane","start-date":date("2007-06-05"),"end-date":date("2011-11-05")}]}


[26/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/manual.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/manual.html b/content/docs/0.8.8-incubating/aql/manual.html
new file mode 100644
index 0000000..b5a02ed
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/manual.html
@@ -0,0 +1,1029 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; The Asterix Query Language, Version 1.0</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Asterix Query Language (AQL)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>The Asterix Query Language, Version 1.0</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Introduction">1. Introduction</a></li>
+  
+<li><a href="#Expressions">2. Expressions</a></li>
+  
+<li><a href="#Statements">3. Statements</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="a1._Introduction_Back_to_TOC"></a><a name="Introduction" id="Introduction">1. Introduction</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
+<p>This document is intended as a reference guide to the full syntax and semantics of the Asterix Query Language (AQL), the language for talking to AsterixDB. This guide covers both the data manipulation language (DML) aspects of AQL, including its support for queries and data modification, as well as its data definition language (DDL) aspects.  New AsterixDB users are encouraged to read and work through the (friendlier) guide &#x201c;AsterixDB 101: An ADM and AQL Primer&#x201d; before attempting to make use of this document. In addition, readers are advised to read and understand the Asterix Data Model (ADM) reference guide since a basic understanding of ADM concepts is a prerequisite to understanding AQL. In what follows, we detail the features of the AQL language in a grammar-guided manner: We list and briefly explain each of the productions in the AQL grammar, offering examples for clarity in cases where doing so seems needed or helpful.</p></div>
+<div class="section">
+<h2><a name="a2._Expressions_Back_to_TOC"></a><a name="Expressions" id="Expressions">2. Expressions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+
+<div class="source">
+<div class="source">
+<pre>Query ::= Expression
+</pre></div></div>
+<p>An AQL query can be any legal AQL expression.</p>
+
+<div class="source">
+<div class="source">
+<pre>Expression ::= ( OperatorExpr | IfThenElse | FLWOR | QuantifiedExpression )
+</pre></div></div>
+<p>AQL is a fully composable expression language. Each AQL expression returns zero or more Asterix Data Model (ADM) instances. There are four major kinds of expressions in AQL. At the topmost level, an AQL expression can be an OperatorExpr (similar to a mathematical expression), an IfThenElse (to choose between two alternative values), a FLWOR expression (the heart of AQL, pronounced &#x201c;flower expression&#x201d;), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we explore the full AQL grammar.</p>
+<div class="section">
+<h3><a name="Primary_Expressions"></a>Primary Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>PrimaryExpr ::= Literal
+              | VariableRef
+              | ParenthesizedExpression
+              | FunctionCallExpr
+              | DatasetAccessExpression
+              | ListConstructor
+              | RecordConstructor
+</pre></div></div>
+<p>The most basic building block for any AQL expression is the PrimaryExpr. This can be a simple literal (constant) value, a reference to a query variable that is in scope, a parenthesized expression, a function call, an expression accessing the ADM contents of a dataset, a newly constructed list of ADM instances, or a newly constructed ADM record.</p>
+<div class="section">
+<h4><a name="Literals"></a>Literals</h4>
+
+<div class="source">
+<div class="source">
+<pre>Literal        ::= StringLiteral
+                 | IntegerLiteral
+                 | FloatLiteral
+                 | DoubleLiteral
+                 | &quot;null&quot;
+                 | &quot;true&quot;
+                 | &quot;false&quot;
+StringLiteral  ::= (&quot;\&quot;&quot; (&lt;ESCAPE_QUOT&gt; | ~[&quot;\&quot;&quot;])* &quot;\&quot;&quot;)
+                 | (&quot;\'&quot; (&lt;ESCAPE_APOS&gt; | ~[&quot;\'&quot;])* &quot;\'&quot;)
+&lt;ESCAPE_QUOT&gt;  ::= &quot;\\\&quot;&quot;
+&lt;ESCAPE_APOS&gt;  ::= &quot;\\\'&quot;
+IntegerLiteral ::= &lt;DIGITS&gt;
+&lt;DIGITS&gt;       ::= [&quot;0&quot; - &quot;9&quot;]+
+FloatLiteral   ::= &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+                 | &lt;DIGITS&gt; ( &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; ) )?
+                 | &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+DoubleLiteral  ::= &lt;DIGITS&gt;
+                 | &lt;DIGITS&gt; ( &quot;.&quot; &lt;DIGITS&gt; )?
+                 | &quot;.&quot; &lt;DIGITS&gt;
+</pre></div></div>
+<p>Literals (constants) in AQL can be strings, integers, floating point values, double values, boolean constants, or the constant value null. The null value in AQL has &#x201c;unknown&#x201d; or &#x201c;missing&#x201d; value semantics, similar to (though not identical to) nulls in the relational query language SQL.</p>
+<p>The following are some simple examples of AQL literals. Since AQL is an expression language, each example is also a complete, legal AQL query (!).</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>&quot;a string&quot;
+42
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Variable_References"></a>Variable References</h4>
+
+<div class="source">
+<div class="source">
+<pre>VariableRef ::= &lt;VARIABLE&gt;
+&lt;VARIABLE&gt;  ::= &quot;$&quot; &lt;LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt; | &quot;_&quot;)*
+&lt;LETTER&gt;    ::= [&quot;A&quot; - &quot;Z&quot;, &quot;a&quot; - &quot;z&quot;]
+</pre></div></div>
+<p>A variable in AQL can be bound to any legal ADM value. A variable reference refers to the value to which an in-scope variable is bound. (E.g., a variable binding may originate from one of the for or let clauses of a FLWOR expression or from an input parameter in the context of an AQL function body.)</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>$tweet
+$id
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Parenthesized_Expressions"></a>Parenthesized Expressions</h4>
+
+<div class="source">
+<div class="source">
+<pre>ParenthesizedExpression ::= &quot;(&quot; Expression &quot;)&quot;
+</pre></div></div>
+<p>As in most languages, an expression may be parenthesized.</p>
+<p>Since AQL is an expression language, the following example expression is actually also a complete, legal AQL query whose result is the value 2. (As such, you can have Big Fun explaining to your boss how AsterixDB and AQL can turn your 1000-node shared-nothing Big Data cluster into a $5M calculator in its spare time.)</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>( 1 + 1 )
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Function_Calls"></a>Function Calls</h4>
+
+<div class="source">
+<div class="source">
+<pre>FunctionCallExpr ::= FunctionOrTypeName &quot;(&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;)&quot;
+</pre></div></div>
+<p>Functions are included in AQL, like most languages, as a way to package useful functionality or to componentize complicated or reusable AQL computations. A function call is a legal AQL query expression that represents the ADM value resulting from the evaluation of its body expression with the given parameter bindings; the parameter value bindings can themselves be any AQL expressions.</p>
+<p>The following example is a (built-in) function call expression whose value is 8.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>string-length(&quot;a string&quot;)
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Dataset_Access"></a>Dataset Access</h4>
+
+<div class="source">
+<div class="source">
+<pre>DatasetAccessExpression ::= &quot;dataset&quot; ( ( Identifier ( &quot;.&quot; Identifier )? )
+                          | ( &quot;(&quot; Expression &quot;)&quot; ) )
+Identifier              ::= &lt;IDENTIFIER&gt; | StringLiteral
+&lt;IDENTIFIER&gt;            ::= &lt;LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt; | &lt;SPECIALCHARS&gt;)*
+&lt;SPECIALCHARS&gt;          ::= [&quot;$&quot;, &quot;_&quot;, &quot;-&quot;]
+</pre></div></div>
+<p>Querying Big Data is the main point of AsterixDB and AQL. Data in AsterixDB reside in datasets (collections of ADM records), each of which in turn resides in some namespace known as a dataverse (data universe). Data access in a query expression is accomplished via a DatasetAccessExpression. Dataset access expressions are most commonly used in FLWOR expressions, where variables are bound to their contents.</p>
+<p>Note that the Identifier that identifies a dataset (or any other Identifier in AQL) can also be a StringLiteral. This is especially useful to avoid conficts with AQL keywords (e.g. &#x201c;dataset&#x201d;, &#x201c;null&#x201d;, or &#x201c;type&#x201d;).</p>
+<p>The following are three examples of legal dataset access expressions. The first one accesses a dataset called Customers in the dataverse called SalesDV. The second one accesses the Customers dataverse in whatever the current dataverse is. The third one does the same thing as the second but uses a slightly older AQL syntax.</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>dataset SalesDV.Customers
+dataset Customers
+dataset(&quot;Customers&quot;)
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Constructors"></a>Constructors</h4>
+
+<div class="source">
+<div class="source">
+<pre>ListConstructor          ::= ( OrderedListConstructor | UnorderedListConstructor )
+OrderedListConstructor   ::= &quot;[&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;]&quot;
+UnorderedListConstructor ::= &quot;{{&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;}}&quot;
+RecordConstructor        ::= &quot;{&quot; ( FieldBinding ( &quot;,&quot; FieldBinding )* )? &quot;}&quot;
+FieldBinding             ::= Expression &quot;:&quot; Expression
+</pre></div></div>
+<p>A major feature of AQL is its ability to construct new ADM data instances. This is accomplished using its constructors for each of the major ADM complex object structures, namely lists (ordered or unordered) and records. Ordered lists are like JSON arrays, while unordered lists have bag (multiset) semantics. Records are built from attributes that are field-name/field-value pairs, again like JSON. (See the AsterixDB Data Model document for more details on each.)</p>
+<p>The following examples illustrate how to construct a new ordered list with 3 items, a new unordered list with 4 items, and a new record with 2 fields, respectively. List elements can be homogeneous (as in the first example), which is the common case, or they may be heterogeneous (as in the second example). The data values and field name values used to construct lists and records in constructors are all simply AQL expressions. Thus the list elements, field names, and field values used in constructors can be simple literals (as in these three examples) or they can come from query variable references or even arbitrarily complex AQL expressions.</p>
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>[ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]
+
+{{ 42, &quot;forty-two&quot;, &quot;AsterixDB!&quot;, 3.14f }}
+
+{
+  &quot;project name&quot;: &quot;AsterixDB&quot;
+  &quot;project members&quot;: {{ &quot;vinayakb&quot;, &quot;dtabass&quot;, &quot;chenli&quot; }}
+}
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Note"></a>Note</h5>
+<p>When constructing nested records there needs to be a space between the closing braces to avoid confusion with the <tt>}}</tt> token that ends an unordered list constructor: <tt>{ &quot;a&quot; : { &quot;b&quot; : &quot;c&quot; }}</tt> will fail to parse while <tt>{ &quot;a&quot; : { &quot;b&quot; : &quot;c&quot; } }</tt> will work.</p></div></div></div>
+<div class="section">
+<h3><a name="Path_Expressions"></a>Path Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>ValueExpr ::= PrimaryExpr ( Field | Index )*
+Field     ::= &quot;.&quot; Identifier
+Index     ::= &quot;[&quot; ( Expression | &quot;?&quot; ) &quot;]&quot;
+</pre></div></div>
+<p>Components of complex types in ADM are accessed via path expressions. Path access can be applied to the result of an AQL expression that yields an instance of such a type, e.g., a record or list instance. For records, path access is based on field names. For ordered lists, path access is based on (zero-based) array-style indexing. AQL also supports an &#x201c;I&#x2019;m feeling lucky&#x201d; style index accessor, [?], for selecting an arbitrary element from an ordered list. Attempts to access non-existent fields or list elements produce a null (i.e., missing information) result as opposed to signaling a runtime error.</p>
+<p>The following examples illustrate field access for a record, index-based element access for an ordered list, and also a composition thereof.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>({&quot;list&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).list
+
+([&quot;a&quot;, &quot;b&quot;, &quot;c&quot;])[2]
+
+({ &quot;list&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).list[2]
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Logical_Expressions"></a>Logical Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>OperatorExpr ::= AndExpr ( &quot;or&quot; AndExpr )*
+AndExpr      ::= RelExpr ( &quot;and&quot; RelExpr )*
+</pre></div></div>
+<p>As in most languages, boolean expressions can be built up from smaller expressions by combining them with the logical connectives and/or. Legal boolean values in AQL are true, false, and null. (Nulls in AQL are treated much like SQL treats its unknown truth value in boolean expressions.)</p>
+<p>The following is an example of a conjuctive range predicate in AQL. It will yield true if $a is bound to 4, null if $a is bound to null, and false otherwise.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>$a &gt; 3 and $a &lt; 5
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Comparison_Expressions"></a>Comparison Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>RelExpr ::= AddExpr ( ( &quot;&lt;&quot; | &quot;&gt;&quot; | &quot;&lt;=&quot; | &quot;&gt;=&quot; | &quot;=&quot; | &quot;!=&quot; | &quot;~=&quot; ) AddExpr )?
+</pre></div></div>
+<p>AQL has the usual list of suspects, plus one, for comparing pairs of atomic values. The &#x201c;plus one&#x201d; is the last operator listed above, which is the &#x201c;roughly equal&#x201d; operator provided for similarity queries. (See the separate document on <a href="similarity.html">AsterixDB Similarity Queries</a> for more details on similarity matching.)</p>
+<p>An example comparison expression (which yields the boolean value true) is shown below.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>5 &gt; 3
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Arithmetic_Expressions"></a>Arithmetic Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>AddExpr  ::= MultExpr ( ( &quot;+&quot; | &quot;-&quot; ) MultExpr )*
+MultExpr ::= UnaryExpr ( ( &quot;*&quot; | &quot;/&quot; | &quot;%&quot; | &quot;^&quot;| &quot;idiv&quot; ) UnaryExpr )*
+UnaryExpr ::= ( ( &quot;+&quot; | &quot;-&quot; ) )? ValueExpr
+</pre></div></div>
+<p>AQL also supports the usual cast of characters for arithmetic expressions. The example below evaluates to 25.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>3 ^ 2 + 4 ^ 2
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="FLWOR_Expression"></a>FLWOR Expression</h3>
+
+<div class="source">
+<div class="source">
+<pre>FLWOR         ::= ( ForClause | LetClause ) ( Clause )* (&quot;return&quot;|&quot;select&quot;) Expression
+Clause         ::= ForClause | LetClause | WhereClause | OrderbyClause
+                 | GroupClause | LimitClause | DistinctClause
+ForClause      ::= (&quot;for&quot;|&quot;from&quot;) Variable ( &quot;at&quot; Variable )? &quot;in&quot; ( Expression )
+LetClause      ::= (&quot;let&quot;|&quot;with&quot;) Variable &quot;:=&quot; Expression
+WhereClause    ::= &quot;where&quot; Expression
+OrderbyClause  ::= &quot;order&quot; &quot;by&quot; Expression ( ( &quot;asc&quot; ) | ( &quot;desc&quot; ) )?
+                   ( &quot;,&quot; Expression ( ( &quot;asc&quot; ) | ( &quot;desc&quot; ) )? )*
+GroupClause    ::= &quot;group&quot; &quot;by&quot; ( Variable &quot;:=&quot; )? Expression ( &quot;,&quot; ( Variable &quot;:=&quot; )? Expression )*
+                   (&quot;with&quot;|&quot;keeping&quot;) VariableRef ( &quot;,&quot; VariableRef )*
+LimitClause    ::= &quot;limit&quot; Expression ( &quot;offset&quot; Expression )?
+DistinctClause ::= &quot;distinct&quot; &quot;by&quot; Expression ( &quot;,&quot; Expression )*
+Variable       ::= &lt;VARIABLE&gt;
+</pre></div></div>
+<p>The heart of AQL is the FLWOR (for-let-where-orderby-return) expression. The roots of this expression were borrowed from the expression of the same name in XQuery. A FLWOR expression starts with one or more clauses that establish variable bindings. A <tt>for</tt> clause binds a variable incrementally to each element of its associated expression; it includes an optional positional variable for counting/numbering the bindings. By default no ordering is implied or assumed by a <tt>for</tt> clause. A <tt>let</tt> clause binds a variable to the collection of elements computed by its associated expression.</p>
+<p>Following the initial <tt>for</tt> or <tt>let</tt> clause(s), a FLWOR expression may contain an arbitrary sequence of other clauses. The <tt>where</tt> clause in a FLWOR expression filters the preceding bindings via a boolean expression, much like a <tt>where</tt> clause does in a SQL query. The <tt>order by</tt> clause in a FLWOR expression induces an ordering on the data. The <tt>group by</tt> clause, discussed further below, forms groups based on its group by expressions, optionally naming the expressions&#x2019; values (which together form the grouping key for the expression). The <tt>with</tt> subclause of a <tt>group by</tt> clause specifies the variable(s) whose values should be grouped based on the grouping key(s); following the grouping clause, only the grouping key(s) and the variables named in the with subclause remain in scope, and the named grouping variables now contain lists formed from their input values. The <tt>limit</tt> clause caps the number of values returne
 d, optionally starting its result count from a specified offset. (Web applications can use this feature for doing pagination.) The <tt>distinct</tt> clause is similar to the <tt>group-by</tt> clause, but it forms no groups; it serves only to eliminate duplicate values. As indicated by the grammar, the clauses in an AQL query can appear in any order. To interpret a query, one can think of data as flowing down through the query from the first clause to the <tt>return</tt> clause.</p>
+<p>The following example shows a FLWOR expression that selects and returns one user from the dataset FacebookUsers.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $user in dataset FacebookUsers
+where $user.id = 8
+return $user
+</pre></div></div>
+<p>The next example shows a FLWOR expression that joins two datasets, FacebookUsers and FacebookMessages, returning user/message pairs. The results contain one record per pair, with result records containing the user&#x2019;s name and an entire message.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $user in dataset FacebookUsers
+for $message in dataset FacebookMessages
+where $message.author-id = $user.id
+return
+  {
+    &quot;uname&quot;: $user.name,
+    &quot;message&quot;: $message.message
+  };
+</pre></div></div>
+<p>In the next example, a <tt>let</tt> clause is used to bind a variable to all of a user&#x2019;s FacebookMessages. The query returns one record per user, with result records containing the user&#x2019;s name and the set of all messages by that user.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $user in dataset FacebookUsers
+let $messages :=
+  for $message in dataset FacebookMessages
+  where $message.author-id = $user.id
+  return $message.message
+return
+  {
+    &quot;uname&quot;: $user.name,
+    &quot;messages&quot;: $messages
+  };
+</pre></div></div>
+<p>The following example returns all TwitterUsers ordered by their followers count (most followers first) and language. When ordering <tt>null</tt> is treated as being smaller than any other value if <tt>null</tt>s are encountered in the ordering key(s).</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $user in dataset TwitterUsers
+  order by $user.followers_count desc, $user.lang asc
+  return $user
+</pre></div></div>
+<p>The next example illustrates the use of the <tt>group by</tt> clause in AQL. After the <tt>group by</tt> clause in the query, only variables that are either in the <tt>group by</tt> list or in the <tt>with</tt> list are in scope. The variables in the clause&#x2019;s <tt>with</tt> list will each contain a collection of items following the <tt>group by</tt> clause; the collected items are the values that the source variable was bound to in the tuples that formed the group. For grouping <tt>null</tt> is handled as a single value.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $x in dataset FacebookMessages
+  let $messages := $x.message
+  group by $loc := $x.sender-location with $messages
+  return
+    {
+      &quot;location&quot; : $loc,
+      &quot;message&quot; : $messages
+    }
+</pre></div></div>
+<p>The use of the <tt>limit</tt> clause is illustrated in the next example.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $user in dataset TwitterUsers
+  order by $user.followers_count desc
+  limit 2
+  return $user
+</pre></div></div>
+<p>The final example shows how AQL&#x2019;s <tt>distinct by</tt> clause works. Each variable in scope before the distinct clause is also in scope after the <tt>distinct by</tt> clause. This clause works similarly to <tt>group by</tt>, but for each variable that contains more than one value after the <tt>distinct by</tt> clause, one value is picked nondeterministically. (If the variable is in the <tt>distinct by</tt> list, then its value will be deterministic.) Nulls are treated as a single value when they occur in a grouping field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  for $x in dataset FacebookMessages
+  distinct by $x.sender-location
+  return
+    {
+      &quot;location&quot; : $x.sender-location,
+      &quot;message&quot; : $x.message
+    }
+</pre></div></div>
+<p>In order to allow SQL fans to write queries in their favored ways, AQL provides synonyms: <i>from</i> for <i>for</i>, <i>select</i> for <i>return</i>, <i>with</i> for <i>let</i>, and <i>keeping</i> for <i>with</i> in the group by clause. The following query is such an example.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>  from $x in dataset FacebookMessages
+  with $messages := $x.message
+  group by $loc := $x.sender-location keeping $messages
+  select
+    {
+      &quot;location&quot; : $loc,
+      &quot;message&quot; : $messages
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Conditional_Expression"></a>Conditional Expression</h3>
+
+<div class="source">
+<div class="source">
+<pre>IfThenElse ::= &quot;if&quot; &quot;(&quot; Expression &quot;)&quot; &quot;then&quot; Expression &quot;else&quot; Expression
+</pre></div></div>
+<p>A conditional expression is useful for choosing between two alternative values based on a boolean condition. If its first (<tt>if</tt>) expression is true, its second (<tt>then</tt>) expression&#x2019;s value is returned, and otherwise its third (<tt>else</tt>) expression is returned.</p>
+<p>The following example illustrates the form of a conditional expression.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>if (2 &lt; 3) then &quot;yes&quot; else &quot;no&quot;
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Quantified_Expressions"></a>Quantified Expressions</h3>
+
+<div class="source">
+<div class="source">
+<pre>QuantifiedExpression ::= ( ( &quot;some&quot; ) | ( &quot;every&quot; ) ) Variable &quot;in&quot; Expression
+                         ( &quot;,&quot; Variable &quot;in&quot; Expression )* &quot;satisfies&quot; Expression
+</pre></div></div>
+<p>Quantified expressions are used for expressing existential or universal predicates involving the elements of a collection.</p>
+<p>The following pair of examples illustrate the use of a quantified expression to test that every (or some) element in the set [1, 2, 3] of integers is less than three. The first example yields <tt>false</tt> and second example yields <tt>true</tt>.</p>
+<p>It is useful to note that if the set were instead the empty set, the first expression would yield <tt>true</tt> (&#x201c;every&#x201d; value in an empty set satisfies the condition) while the second expression would yield <tt>false</tt> (since there isn&#x2019;t &#x201c;some&#x201d; value, as there are no values in the set, that satisfies the condition).</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>every $x in [ 1, 2, 3 ] satisfies $x &lt; 3
+some $x in [ 1, 2, 3 ] satisfies $x &lt; 3
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h2><a name="a3._Statements_Back_to_TOC"></a><a name="Statements" id="Statements">3. Statements</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+
+<div class="source">
+<div class="source">
+<pre>Statement ::= ( SingleStatement ( &quot;;&quot; )? )* &lt;EOF&gt;
+SingleStatement ::= DataverseDeclaration
+                  | FunctionDeclaration
+                  | CreateStatement
+                  | DropStatement
+                  | LoadStatement
+                  | SetStatement
+                  | InsertStatement
+                  | DeleteStatement
+                  | Query
+</pre></div></div>
+<p>In addition to expresssions for queries, AQL supports a variety of statements for data definition and manipulation purposes as well as controlling the context to be used in evaluating AQL expressions. AQL supports record-level ACID transactions that begin and terminate implicitly for each record inserted, deleted, or searched while a given AQL statement is being executed.</p>
+<p>This section details the statements supported in the AQL language.</p>
+<div class="section">
+<h3><a name="Declarations"></a>Declarations</h3>
+
+<div class="source">
+<div class="source">
+<pre>DataverseDeclaration ::= &quot;use&quot; &quot;dataverse&quot; Identifier
+</pre></div></div>
+<p>The world of data in an AsterixDB cluster is organized into data namespaces called dataverses. To set the default dataverse for a series of statements, the use dataverse statement is provided.</p>
+<p>As an example, the following statement sets the default dataverse to be TinySocial.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+</pre></div></div>
+<p>The set statement in AQL is used to control aspects of the expression evalation context for queries.</p>
+
+<div class="source">
+<div class="source">
+<pre>SetStatement ::= &quot;set&quot; Identifier StringLiteral
+</pre></div></div>
+<p>As an example, the following set statements request that Jaccard similarity with a similarity threshold 0.6 be used for set similarity matching when the ~= operator is used in a query expression.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>set simfunction &quot;jaccard&quot;;
+set simthreshold &quot;0.6f&quot;;
+</pre></div></div>
+<p>When writing a complex AQL query, it can sometimes be helpful to define one or more auxilliary functions that each address a sub-piece of the overall query. The declare function statement supports the creation of such helper functions.</p>
+
+<div class="source">
+<div class="source">
+<pre>FunctionDeclaration  ::= &quot;declare&quot; &quot;function&quot; Identifier ParameterList &quot;{&quot; Expression &quot;}&quot;
+ParameterList        ::= &quot;(&quot; ( &lt;VARIABLE&gt; ( &quot;,&quot; &lt;VARIABLE&gt; )* )? &quot;)&quot;
+</pre></div></div>
+<p>The following is a very simple example of a temporary AQL function definition.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>declare function add($a, $b) {
+  $a + $b
+};
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Lifecycle_Management_Statements"></a>Lifecycle Management Statements</h3>
+
+<div class="source">
+<div class="source">
+<pre>CreateStatement ::= &quot;create&quot; ( DataverseSpecification
+                             | TypeSpecification
+                             | DatasetSpecification
+                             | IndexSpecification
+                             | FunctionSpecification )
+
+QualifiedName       ::= Identifier ( &quot;.&quot; Identifier )?
+DoubleQualifiedName ::= Identifier &quot;.&quot; Identifier ( &quot;.&quot; Identifier )?
+</pre></div></div>
+<p>The create statement in AQL is used for creating persistent artifacts in the context of dataverses. It can be used to create new dataverses, datatypes, datasets, indexes, and user-defined AQL functions.</p>
+<div class="section">
+<h4><a name="Dataverses"></a>Dataverses</h4>
+
+<div class="source">
+<div class="source">
+<pre>DataverseSpecification ::= &quot;dataverse&quot; Identifier IfNotExists ( &quot;with format&quot; StringLiteral )?
+</pre></div></div>
+<p>The create dataverse statement is used to create new dataverses. To ease the authoring of reusable AQL scripts, its optional IfNotExists clause allows creation to be requested either unconditionally or only if the the dataverse does not already exist. If this clause is absent, an error will be returned if the specified dataverse already exists. The <tt>with format</tt> clause is a placeholder for future functionality that can safely be ignored.</p>
+<p>The following example creates a dataverse named TinySocial.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create dataverse TinySocial;
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Types"></a>Types</h4>
+
+<div class="source">
+<div class="source">
+<pre>TypeSpecification    ::= &quot;type&quot; FunctionOrTypeName IfNotExists &quot;as&quot; TypeExpr
+FunctionOrTypeName   ::= QualifiedName
+IfNotExists          ::= ( &quot;if not exists&quot; )?
+TypeExpr             ::= RecordTypeDef | TypeReference | OrderedListTypeDef | UnorderedListTypeDef
+RecordTypeDef        ::= ( &quot;closed&quot; | &quot;open&quot; )? &quot;{&quot; ( RecordField ( &quot;,&quot; RecordField )* )? &quot;}&quot;
+RecordField          ::= Identifier &quot;:&quot; ( TypeExpr ) ( &quot;?&quot; )?
+NestedField          ::= Identifier ( &quot;.&quot; Identifier )*
+IndexField           ::= NestedField ( &quot;:&quot; TypeReference )?
+TypeReference        ::= Identifier
+OrderedListTypeDef   ::= &quot;[&quot; ( TypeExpr ) &quot;]&quot;
+UnorderedListTypeDef ::= &quot;{{&quot; ( TypeExpr ) &quot;}}&quot;
+</pre></div></div>
+<p>The create type statement is used to create a new named ADM datatype. This type can then be used to create datasets or utilized when defining one or more other ADM datatypes. Much more information about the Asterix Data Model (ADM) is available in the <a href="datamodel.html">data model reference guide</a> to ADM. A new type can be a record type, a renaming of another type, an ordered list type, or an unordered list type. A record type can be defined as being either open or closed. Instances of a closed record type are not permitted to contain fields other than those specified in the create type statement. Instances of an open record type may carry additional fields, and open is the default for a new type (if neither option is specified).</p>
+<p>The following example creates a new ADM record type called FacebookUser type. Since it is closed, its instances will contain only what is specified in the type definition. The first four fields are traditional typed name/value pairs. The friend-ids field is an unordered list of 32-bit integers. The employment field is an ordered list of instances of another named record type, EmploymentType.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create type FacebookUserType as closed {
+  &quot;id&quot; :         int32,
+  &quot;alias&quot; :      string,
+  &quot;name&quot; :       string,
+  &quot;user-since&quot; : datetime,
+  &quot;friend-ids&quot; : {{ int32 }},
+  &quot;employment&quot; : [ EmploymentType ]
+}
+</pre></div></div>
+<p>The next example creates a new ADM record type called FbUserType. Note that the type of the id field is UUID. You need to use this field type if you want to have this field be an autogenerated-PK field. Refer to the Datasets section later for more details.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create type FbUserType as closed {
+  &quot;id&quot; :         uuid,
+  &quot;alias&quot; :      string,
+  &quot;name&quot; :       string
+}
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Datasets"></a>Datasets</h4>
+
+<div class="source">
+<div class="source">
+<pre>DatasetSpecification ::= &quot;internal&quot;? &quot;dataset&quot; QualifiedName &quot;(&quot; Identifier &quot;)&quot; IfNotExists
+                         PrimaryKey ( &quot;on&quot; Identifier )? ( &quot;hints&quot; Properties )?
+                         ( &quot;using&quot; &quot;compaction&quot; &quot;policy&quot; CompactionPolicy ( Configuration )? )?
+                         ( &quot;with filter on&quot; Identifier )?
+                       | &quot;external&quot; &quot;dataset&quot; QualifiedName &quot;(&quot; Identifier &quot;)&quot; IfNotExists
+                         &quot;using&quot; AdapterName Configuration ( &quot;hints&quot; Properties )?
+                         ( &quot;using&quot; &quot;compaction&quot; &quot;policy&quot; CompactionPolicy ( Configuration )? )?
+AdapterName          ::= Identifier
+Configuration        ::= &quot;(&quot; ( KeyValuePair ( &quot;,&quot; KeyValuePair )* )? &quot;)&quot;
+KeyValuePair         ::= &quot;(&quot; StringLiteral &quot;=&quot; StringLiteral &quot;)&quot;
+Properties           ::= ( &quot;(&quot; Property ( &quot;,&quot; Property )* &quot;)&quot; )?
+Property             ::= Identifier &quot;=&quot; ( StringLiteral | IntegerLiteral )
+FunctionSignature    ::= FunctionOrTypeName &quot;@&quot; IntegerLiteral
+PrimaryKey           ::= &quot;primary&quot; &quot;key&quot; NestedField ( &quot;,&quot; NestedField )* ( &quot;autogenerated &quot;)?
+CompactionPolicy     ::= Identifier
+PrimaryKey           ::= &quot;primary&quot; &quot;key&quot; Identifier ( &quot;,&quot; Identifier )* ( &quot;autogenerated &quot;)?
+</pre></div></div>
+<p>The create dataset statement is used to create a new dataset. Datasets are named, unordered collections of ADM record instances; they are where data lives persistently and are the targets for queries in AsterixDB. Datasets are typed, and AsterixDB will ensure that their contents conform to their type definitions. An Internal dataset (the default) is a dataset that is stored in and managed by AsterixDB. It must have a specified unique primary key that can be used to partition data across nodes of an AsterixDB cluster. The primary key is also used in secondary indexes to uniquely identify the indexed primary data records. Random primary key (UUID) values can be auto-generated by declaring the field to be UUID and putting &#x201c;autogenerated&#x201d; after the &#x201c;primary key&#x201d; identifier. In this case, values for the auto-generated PK field should not be provided by the user since it will be auto-generated by AsterixDB. Optionally, a filter can be created on a field to f
 urther optimize range queries with predicates on the filter&#x2019;s field. (Refer to <a href="filters.html">Filter-Based LSM Index Acceleration</a> for more information about filters.)</p>
+<p>An External dataset is stored outside of AsterixDB (currently datasets in HDFS or on the local filesystem(s) of the cluster&#x2019;s nodes are supported). External dataset support allows AQL queries to treat external data as though it were stored in AsterixDB, making it possible to query &#x201c;legacy&#x201d; file data (e.g., Hive data) without having to physically import it into AsterixDB. For an external dataset, an appropriate adapter must be selected to handle the nature of the desired external data. (See the <a href="externaldata.html">guide to external data</a> for more information on the available adapters.)</p>
+<p>When creating a dataset, it is possible to choose a merge policy that controls which of the underlaying LSM storage components to be merged. Currently, AsterixDB provides four different merge policies that can be configured per dataset: no-merge, constant, prefix, and correlated-prefix. The no-merge policy simply never merges disk components. While the constant policy merges disk components when the number of components reaches some constant number k, which can be configured by the user. The prefix policy relies on component sizes and the number of components to decide which components to merge. Specifically, it works by first trying to identify the smallest ordered (oldest to newest) sequence of components such that the sequence does not contain a single component that exceeds some threshold size M and that either the sum of the component&#x2019;s sizes exceeds M or the number of components in the sequence exceeds another threshold C. If such a sequence of components exists, the
 n each of the components in the sequence are merged together to form a single component. Finally, the correlated-prefix is similar to the prefix policy but it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests on behalf of all other indexes associated with the same dataset. The default policy for AsterixDB is the prefix policy except when there is a filter on a dataset, where the preferred policy for filters is the correlated-prefix.</p>
+<p>The following example creates an internal dataset for storing FacefookUserType records. It specifies that their id field is their primary key.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create internal dataset FacebookUsers(FacebookUserType) primary key id;
+</pre></div></div>
+<p>The following example creates an internal dataset for storing FbUserType records. It specifies that their id field is their primary key. It also specifies that the id field is an auto-generated field, meaning that a randomly generated UUID value will be assigned to each record by the system. (A user should therefore not proivde a value for this field.) Note that the id field should be UUID.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create internal dataset FbMsgs(FbUserType) primary key id autogenerated;
+</pre></div></div>
+<p>The next example creates an external dataset for storing LineitemType records. The choice of the <tt>hdfs</tt> adapter means that its data will reside in HDFS. The create statement provides parameters used by the hdfs adapter: the URL and path needed to locate the data in HDFS and a description of the data format.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create external dataset Lineitem('LineitemType) using hdfs (
+  (&quot;hdfs&quot;=&quot;hdfs://HOST:PORT&quot;),
+  (&quot;path&quot;=&quot;HDFS_PATH&quot;),
+  (&quot;input-format&quot;=&quot;text-input-format&quot;),
+  (&quot;format&quot;=&quot;delimited-text&quot;),
+  (&quot;delimiter&quot;=&quot;|&quot;));
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Indices"></a>Indices</h4>
+
+<div class="source">
+<div class="source">
+<pre>IndexSpecification ::= &quot;index&quot; Identifier IfNotExists &quot;on&quot; QualifiedName
+                       &quot;(&quot; ( IndexField ) ( &quot;,&quot; IndexField )* &quot;)&quot; ( &quot;type&quot; IndexType )? ( &quot;enforced&quot; )?
+IndexType          ::= &quot;btree&quot;
+                     | &quot;rtree&quot;
+                     | &quot;keyword&quot;
+                     | &quot;ngram&quot; &quot;(&quot; IntegerLiteral &quot;)&quot;
+</pre></div></div>
+<p>The create index statement creates a secondary index on one or more fields of a specified dataset. Supported index types include <tt>btree</tt> for totally ordered datatypes, <tt>rtree</tt> for spatial data, and <tt>keyword</tt> and <tt>ngram</tt> for textual (string) data. An index can be created on a nested field (or fields) by providing a valid path expression as an index field identifier. An index field is not required to be part of the datatype associated with a dataset if that datatype is declared as open and the field&#x2019;s type is provided along with its type and the <tt>enforced</tt> keyword is specified in the end of index definition. <tt>Enforcing</tt> an open field will introduce a check that will make sure that the actual type of an indexed field (if the field exists in the record) always matches this specified (open) field type.</p>
+<p>The following example creates a btree index called fbAuthorIdx on the author-id field of the FacebookMessages dataset. This index can be useful for accelerating exact-match queries, range search queries, and joins involving the author-id field.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+</pre></div></div>
+<p>The following example creates an open btree index called fbSendTimeIdx on the open send-time field of the FacebookMessages dataset having datetime type. This index can be useful for accelerating exact-match queries, range search queries, and joins involving the send-time field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbSendTimeIdx on FacebookMessages(send-time:datetime) type btree enforced;
+</pre></div></div>
+<p>The following example creates a btree index called twUserScrNameIdx on the screen-name field, which is a nested field of the user field in the TweetMessages dataset. This index can be useful for accelerating exact-match queries, range search queries, and joins involving the screen-name field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index twUserScrNameIdx on TweetMessages(user.screen-name) type btree;
+</pre></div></div>
+<p>The following example creates an rtree index called fbSenderLocIdx on the sender-location field of the FacebookMessages dataset. This index can be useful for accelerating queries that use the <a href="functions.html#spatial-intersect"><tt>spatial-intersect</tt> function</a> in a predicate involving the sender-location field.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+</pre></div></div>
+<p>The following example creates a 3-gram index called fbUserIdx on the name field of the FacebookUsers dataset. This index can be used to accelerate some similarity or substring maching queries on the name field. For details refer to the <a href="similarity.html#NGram_Index">document on similarity queries</a>.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbUserIdx on FacebookUsers(name) type ngram(3);
+</pre></div></div>
+<p>The following example creates a keyword index called fbMessageIdx on the message field of the FacebookMessages dataset. This keyword index can be used to optimize queries with token-based similarity predicates on the message field. For details refer to the <a href="similarity.html#Keyword_Index">document on similarity queries</a>.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create index fbMessageIdx on FacebookMessages(message) type keyword;
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Functions"></a>Functions</h4>
+<p>The create function statement creates a named function that can then be used and reused in AQL queries. The body of a function can be any AQL expression involving the function&#x2019;s parameters.</p>
+
+<div class="source">
+<div class="source">
+<pre>FunctionSpecification ::= &quot;function&quot; FunctionOrTypeName IfNotExists ParameterList &quot;{&quot; Expression &quot;}&quot;
+</pre></div></div>
+<p>The following is a very simple example of a create function statement. It differs from the declare function example shown previously in that it results in a function that is persistently registered by name in the specified dataverse.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>create function add($a, $b) {
+  $a + $b
+};
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Removal"></a>Removal</h4>
+
+<div class="source">
+<div class="source">
+<pre>DropStatement       ::= &quot;drop&quot; ( &quot;dataverse&quot; Identifier IfExists
+                               | &quot;type&quot; FunctionOrTypeName IfExists
+                               | &quot;dataset&quot; QualifiedName IfExists
+                               | &quot;index&quot; DoubleQualifiedName IfExists
+                               | &quot;function&quot; FunctionSignature IfExists )
+IfExists            ::= ( &quot;if&quot; &quot;exists&quot; )?
+</pre></div></div>
+<p>The drop statement in AQL is the inverse of the create statement. It can be used to drop dataverses, datatypes, datasets, indexes, and functions.</p>
+<p>The following examples illustrate uses of the drop statement.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>drop dataset FacebookUsers if exists;
+
+drop index FacebookUsers.fbSenderLocIndex;
+
+drop type FacebookUserType;
+
+drop dataverse TinySocial;
+
+drop function add;
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="ImportExport_Statements"></a>Import/Export Statements</h3>
+
+<div class="source">
+<div class="source">
+<pre>LoadStatement  ::= &quot;load&quot; &quot;dataset&quot; QualifiedName &quot;using&quot; AdapterName Configuration ( &quot;pre-sorted&quot; )?
+</pre></div></div>
+<p>The load statement is used to initially populate a dataset via bulk loading of data from an external file. An appropriate adapter must be selected to handle the nature of the desired external data. The load statement accepts the same adapters and the same parameters as external datasets. (See the <a href="externaldata.html">guide to external data</a> for more information on the available adapters.) If a dataset has an auto-generated primary key field, a file to be imported should not include that field in it.</p>
+<p>The following example shows how to bulk load the FacebookUsers dataset from an external file containing data that has been prepared in ADM format.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>load dataset FacebookUsers using localfs
+((&quot;path&quot;=&quot;localhost:///Users/zuck/AsterixDB/load/fbu.adm&quot;),(&quot;format&quot;=&quot;adm&quot;));
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Modification_Statements"></a>Modification Statements</h3>
+<div class="section">
+<h4><a name="Insert"></a>Insert</h4>
+
+<div class="source">
+<div class="source">
+<pre>InsertStatement ::= &quot;insert&quot; &quot;into&quot; &quot;dataset&quot; QualifiedName Query
+</pre></div></div>
+<p>The AQL insert statement is used to insert data into a dataset. The data to be inserted comes from an AQL query expression. The expression can be as simple as a constant expression, or in general it can be any legal AQL query. Inserts in AsterixDB are processed transactionally, with the scope of each insert transaction being the insertion of a single object plus its affiliated secondary index entries (if any). If the query part of an insert returns a single object, then the insert statement itself will be a single, atomic transaction. If the query part returns multiple objects, then each object inserted will be handled independently as a tranaction. If a dataset has an auto-generated primary key field, an insert statement should not include a value for that field in it. (The system will automatically extend the provided record with this additional field and a corresponding value.)</p>
+<p>The following example illustrates a query-based insertion.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>insert into dataset UsersCopy (for $user in dataset FacebookUsers return $user)
+</pre></div></div></div></div>
+<div class="section">
+<h4><a name="Delete"></a>Delete</h4>
+
+<div class="source">
+<div class="source">
+<pre>DeleteStatement ::= &quot;delete&quot; Variable &quot;from&quot; &quot;dataset&quot; QualifiedName ( &quot;where&quot; Expression )?
+</pre></div></div>
+<p>The AQL delete statement is used to delete data from a target dataset. The data to be deleted is identified by a boolean expression involving the variable bound to the target dataset in the delete statement. Deletes in AsterixDB are processed transactionally, with the scope of each delete transaction being the deletion of a single object plus its affiliated secondary index entries (if any). If the boolean expression for a delete identifies a single object, then the delete statement itself will be a single, atomic transaction. If the expression identifies multiple objects, then each object deleted will be handled independently as a transaction.</p>
+<p>The following example illustrates a single-object deletion.</p>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>delete $user from dataset FacebookUsers where $user.id = 8;
+</pre></div></div>
+<p>We close this guide to AQL with one final example of a query expression.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>for $praise in {{ &quot;great&quot;, &quot;brilliant&quot;, &quot;awesome&quot; }}
+return
+   string-concat([&quot;AsterixDB is &quot;, $praise])
+</pre></div></div></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[13/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/aql/functions.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/aql/functions.html b/docs/0.8.8-incubating/aql/functions.html
new file mode 100644
index 0000000..5e74ac3
--- /dev/null
+++ b/docs/0.8.8-incubating/aql/functions.html
@@ -0,0 +1,5111 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Asterix: Using Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Functions</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Asterix: Using Functions</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#NumericFunctions">Numeric Functions</a></li>
+  
+<li><a href="#StringFunctions">String Functions</a></li>
+  
+<li><a href="#AggregateFunctions">Aggregate Functions</a></li>
+  
+<li><a href="#SpatialFunctions">Spatial Functions</a></li>
+  
+<li><a href="#SimilarityFunctions">Similarity Functions</a></li>
+  
+<li><a href="#TokenizingFunctions">Tokenizing Functions</a></li>
+  
+<li><a href="#TemporalFunctions">Temporal Functions</a></li>
+  
+<li><a href="#RecordFunctions">Record Functions</a></li>
+  
+<li><a href="#OtherFunctions">Other Functions</a></li>
+</ul>
+<p>Asterix provides various classes of functions to support operations on numeric, string, spatial, and temporal data. This document explains how to use these functions.</p></div>
+<div class="section">
+<h2><a name="Numeric_Functions_Back_to_TOC"></a><a name="NumericFunctions" id="NumericFunctions">Numeric Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="abs"></a>abs</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>abs(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the absolute value of the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The absolute value of the argument with the same type as the input argument, or <tt>null</tt> if the argument is a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := abs(2013)
+let $v2 := abs(-4036)
+let $v3 := abs(0)
+let $v4 := abs(float(&quot;-2013.5&quot;))
+let $v5 := abs(double(&quot;-2013.593823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: 4036, &quot;v3&quot;: 0, &quot;v4&quot;: 2013.5f, &quot;v5&quot;: 2013.5938237483274d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="ceiling"></a>ceiling</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ceiling(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the smallest (closest to negative infinity) number with no fractional part that is not less than the value of the argument. If the argument is already equal to mathematical integer, then the result is the same as the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The ceiling value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := ceiling(2013)
+let $v2 := ceiling(-4036)
+let $v3 := ceiling(0.3)
+let $v4 := ceiling(float(&quot;-2013.2&quot;))
+let $v5 := ceiling(double(&quot;-2013.893823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 1.0d, &quot;v4&quot;: -2013.0f, &quot;v5&quot;: -2013.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>floor(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the largest (closest to positive infinity) number with no fractional part that is not greater than the value. If the argument is already equal to mathematical integer, then the result is the same as the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The floor value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := floor(2013)
+let $v2 := floor(-4036)
+let $v3 := floor(0.8)
+let $v4 := floor(float(&quot;-2013.2&quot;))
+let $v5 := floor(double(&quot;-2013.893823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 0.0d, &quot;v4&quot;: -2014.0f, &quot;v5&quot;: -2014.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="round"></a>round</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>round(numeric_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Computes the number with no fractional part that is closest (and also closest to positive infinity) to the argument.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The rounded value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := round(2013)
+let $v2 := round(-4036)
+let $v3 := round(0.8)
+let $v4 := round(float(&quot;-2013.256&quot;))
+let $v5 := round(double(&quot;-2013.893823748327284&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 1.0d, &quot;v4&quot;: -2013.0f, &quot;v5&quot;: -2014.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="round-half-to-even"></a>round-half-to-even</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>round-half-to-even(numeric_expression, [precision])
+</pre></div></div></li>
+  
+<li>
+<p>Computes the closest numeric value to <tt>numeric_expression</tt> that is a multiple of ten to the power of minus <tt>precision</tt>. <tt>precision</tt> is optional and by default value <tt>0</tt> is used.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>numeric_expression</tt>: A <tt>int8</tt>/<tt>int16</tt>/<tt>int32</tt>/<tt>int64</tt>/<tt>float</tt>/<tt>double</tt> value.</li>
+    
+<li><tt>precision</tt>: An optional integer field representing the number of digits in the fraction of the the result</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The rounded value for the given number in the same type as the input argument, or <tt>null</tt> if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := round-half-to-even(2013)
+let $v2 := round-half-to-even(-4036)
+let $v3 := round-half-to-even(0.8)
+let $v4 := round-half-to-even(float(&quot;-2013.256&quot;))
+let $v5 := round-half-to-even(double(&quot;-2013.893823748327284&quot;))
+let $v6 := round-half-to-even(double(&quot;-2013.893823748327284&quot;), 2)
+let $v7 := round-half-to-even(2013, 4)
+let $v8 := round-half-to-even(float(&quot;-2013.256&quot;), 5)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4, &quot;v5&quot;: $v5, &quot;v6&quot;: $v6, &quot;v7&quot;: $v7, &quot;v8&quot;: $v8 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, &quot;v3&quot;: 1.0d, &quot;v4&quot;: -2013.0f, &quot;v5&quot;: -2014.0d, &quot;v6&quot;: -2013.89d, &quot;v7&quot;: 2013, &quot;v8&quot;: -2013.256f }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="String_Functions_Back_to_TOC"></a><a name="StringFunctions" id="StringFunctions">String Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="string-to-codepoint"></a>string-to-codepoint</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-to-codepoint(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts the string <tt>string_expression</tt> to its code-based representation.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that will be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> of the code points for the string <tt>string_expression</tt>.</li>
+  </ul></li>
+</ul></div>
+<div class="section">
+<h3><a name="codepoint-to-string"></a>codepoint-to-string</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>codepoint-to-string(list_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts the ordered code-based representation <tt>list_expression</tt> to the corresponding string.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression</tt> : An <tt>OrderedList</tt> of code-points.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> representation of <tt>list_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $s := &quot;Hello ASTERIX!&quot;
+let $l := string-to-codepoint($s)
+let $ss := codepoint-to-string($l)
+return {&quot;codes&quot;: $l, &quot;string&quot;: $ss}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;codes&quot;: [ 72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33 ], &quot;string&quot;: &quot;Hello ASTERIX!&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="contains"></a>contains</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>contains(string_expression, substring_to_contain)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> contains the string <tt>substring_to_contain</tt></p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the given substring.</li>
+    
+<li><tt>substring_to_contain</tt> : A target <tt>string</tt> that might be contained.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt> value, <tt>true</tt> if <tt>string_expression</tt> contains <tt>substring_to_contain</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where contains($i.message, &quot;phone&quot;)
+return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;mid&quot;: 2, &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot; }
+{ &quot;mid&quot;: 13, &quot;message&quot;: &quot; dislike iphone the voice-command is bad:(&quot; }
+{ &quot;mid&quot;: 15, &quot;message&quot;: &quot; like iphone the voicemail-service is awesome&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="like"></a>like</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>like(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> contains the string pattern <tt>string_pattern</tt>. Compared to the <tt>contains</tt> function, the <tt>like</tt> function also supports regular expressions.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the pattern or <tt>null</tt>.</li>
+    
+<li><tt>string_pattern</tt> : A pattern <tt>string</tt> that might be contained or <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt> value, <tt>true</tt> if <tt>string_expression</tt> contains the pattern <tt>string_pattern</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where like($i.message, &quot;%at&amp;t%&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; can't stand at&amp;t the network is horrible:(&quot;
+&quot; can't stand at&amp;t its plan is terrible&quot;
+&quot; love at&amp;t its 3G is good:)&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="starts-with"></a>starts-with</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>starts-with(string_expression, substring_to_start_with)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> starts with the string <tt>substring_to_start_with</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might start with the given string.</li>
+    
+<li><tt>substring_to_start_with</tt> : A <tt>string</tt> that might be contained as the starting substring.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt>, returns <tt>true</tt> if <tt>string_expression</tt> starts with the string <tt>substring_to_start_with</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where starts-with($i.message, &quot; like&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; like samsung the plan is amazing&quot;
+&quot; like t-mobile its platform is mind-blowing&quot;
+&quot; like verizon the 3G is awesome:)&quot;
+&quot; like iphone the voicemail-service is awesome&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="ends-with"></a>ends-with</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ends-with(string_expression, substring_to_end_with)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> ends with the string <tt>substring_to_end_with</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might end with the given string.</li>
+    
+<li><tt>substring_to_end_with</tt> : A <tt>string</tt> that might be contained as the ending substring.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt>, returns <tt>true</tt> if <tt>string_expression</tt> ends with the string <tt>substring_to_end_with</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where ends-with($i.message, &quot;:)&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; love sprint its shortcut-menu is awesome:)&quot;
+&quot; like verizon the 3G is awesome:)&quot;
+&quot; love at&amp;t its 3G is good:)&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string-concat"></a>string-concat</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-concat(list_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Concatenates a list of strings <tt>list_expression</tt> into a single string.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression</tt> : An <tt>OrderedList</tt> or <tt>UnorderedList</tt> of <tt>string</tt>s (could be <tt>null</tt>) to be concatenated.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns the concatenated <tt>string</tt> value.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $i := &quot;ASTERIX&quot;
+let $j := &quot; &quot;
+let $k := &quot;ROCKS!&quot;
+return string-concat([$i, $j, $k])
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;ASTERIX ROCKS!&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string-join"></a>string-join</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-join(list_expression, string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Joins a list of strings <tt>list_expression</tt> with the given separator <tt>string_expression</tt> into a single string.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression</tt> : An <tt>OrderedList</tt> or <tt>UnorderedList</tt> of strings (could be <tt>null</tt>) to be joined.</li>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> as the separator.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns the joined <tt>String</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := [&quot;ASTERIX&quot;, &quot;ROCKS~&quot;]
+return string-join($i, &quot;!! &quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;ASTERIX!! ROCKS~&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="lowercase"></a>lowercase</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>lowercase(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts a given string <tt>string_expression</tt> to its lowercase form.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> as the lowercase form of the given <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := &quot;ASTERIX&quot;
+return lowercase($i)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>asterix
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="uppercase"></a>uppercase</h3>
+
+<ul>
+  
+<li>Syntax:</li>
+</ul>
+<p>uppercase(string_expression)</p>
+
+<ul>
+  
+<li>Converts a given string <tt>string_expression</tt> to its uppercase form.</li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> as the uppercase form of the given <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := &quot;asterix&quot;
+return uppercase($i)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ASTERIX
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="uppercase"></a>uppercase</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>uppercase(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Converts a given string <tt>string_expression</tt> to its uppercase form.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be converted.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> as the uppercase form of the given <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $i := &quot;asterix&quot;
+return uppercase($i)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ASTERIX
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="matches"></a>matches</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>matches(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the strings <tt>string_expression</tt> matches the given pattern <tt>string_pattern</tt> (A Java regular expression pattern).</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the pattern.</li>
+    
+<li><tt>string_pattern</tt> : A pattern <tt>string</tt> to be matched.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt>, returns <tt>true</tt> if <tt>string_expression</tt> matches the pattern <tt>string_pattern</tt>, and <tt>false</tt> otherwise.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where matches($i.message, &quot;dislike iphone&quot;)
+return $i.message
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; dislike iphone its touch-screen is horrible&quot;
+&quot; dislike iphone the voice-command is bad:(&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="replace"></a>replace</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>replace(string_expression, string_pattern, string_replacement[, string_flags])
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether the string <tt>string_expression</tt> matches the given pattern <tt>string_pattern</tt>, and replace the matched pattern <tt>string_pattern</tt> with the new pattern <tt>string_replacement</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that might contain the pattern.</li>
+    
+<li><tt>string_pattern</tt> : A pattern <tt>string</tt> to be matched.</li>
+    
+<li><tt>string_replacement</tt> : A pattern <tt>string</tt> to be used as the replacement.</li>
+    
+<li><tt>string_flag</tt> : (Optional) A <tt>string</tt> with flags to be used during replace.</li>
+    
+<li>The following modes are enabled with these flags: dotall (s), multiline (m), case-insenitive (i), and comments and whitespace (x).</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>Returns a <tt>string</tt> that is obtained after the replacements.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where matches($i.message, &quot; like iphone&quot;)
+return replace($i.message, &quot; like iphone&quot;, &quot;like android&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;like android the voicemail-service is awesome&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string-length"></a>string-length</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>string-length(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the length of the string <tt>string_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> or <tt>null</tt> that represents the string to be checked.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> that represents the length of <tt>string_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+return {&quot;mid&quot;: $i.message-id, &quot;message-len&quot;: string-length($i.message)}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;mid&quot;: 1, &quot;message-len&quot;: 43 }
+{ &quot;mid&quot;: 2, &quot;message-len&quot;: 44 }
+{ &quot;mid&quot;: 3, &quot;message-len&quot;: 33 }
+{ &quot;mid&quot;: 4, &quot;message-len&quot;: 43 }
+{ &quot;mid&quot;: 5, &quot;message-len&quot;: 46 }
+{ &quot;mid&quot;: 6, &quot;message-len&quot;: 43 }
+{ &quot;mid&quot;: 7, &quot;message-len&quot;: 37 }
+{ &quot;mid&quot;: 8, &quot;message-len&quot;: 33 }
+{ &quot;mid&quot;: 9, &quot;message-len&quot;: 34 }
+{ &quot;mid&quot;: 10, &quot;message-len&quot;: 50 }
+{ &quot;mid&quot;: 11, &quot;message-len&quot;: 38 }
+{ &quot;mid&quot;: 12, &quot;message-len&quot;: 52 }
+{ &quot;mid&quot;: 13, &quot;message-len&quot;: 42 }
+{ &quot;mid&quot;: 14, &quot;message-len&quot;: 27 }
+{ &quot;mid&quot;: 15, &quot;message-len&quot;: 45 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substring"></a>substring</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring(string_expression, offset[, length])
+</pre></div></div></li>
+  
+<li>
+<p>Returns the substring from the given string <tt>string_expression</tt> based on the given start offset <tt>offset</tt> with the optional <tt>length</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be extracted.</li>
+    
+<li><tt>offset</tt> : An <tt>int64</tt> as the starting offset of the substring in <tt>string_expression</tt>.</li>
+    
+<li><tt>length</tt> : (Optional) An <tt>int64</tt> as the length of the substring.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> that represents the substring.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where string-length($i.message) &gt; 50
+return substring($i.message, 50)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;G:(&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substring-before"></a>substring-before</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring-before(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the substring from the given string <tt>string_expression</tt> before the given pattern <tt>string_pattern</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be extracted.</li>
+    
+<li><tt>string_pattern</tt> : A <tt>string</tt> pattern to be searched.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> that represents the substring.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where contains($i.message, &quot;iphone&quot;)
+return substring-before($i.message, &quot;iphone&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; dislike &quot;
+&quot; dislike &quot;
+&quot; like &quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substring-after"></a>substring-after</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring-after(string_expression, string_pattern)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the substring from the given string <tt>string_expression</tt> after the given pattern <tt>string_pattern</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> to be extracted.</li>
+    
+<li><tt>string_pattern</tt> : A <tt>string</tt> pattern to be searched.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>string</tt> that represents the substring.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $i in dataset('FacebookMessages')
+where contains($i.message, &quot;iphone&quot;)
+return substring-after($i.message, &quot;iphone&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; its touch-screen is horrible&quot;
+&quot; the voice-command is bad:(&quot;
+&quot; the voicemail-service is awesome&quot;
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Aggregate_Functions_Back_to_TOC"></a><a name="AggregateFunctions" id="AggregateFunctions">Aggregate Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="count"></a>count</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>count(list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the number of items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be counted, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> value representing the number of items in the given list. <tt>0i64</tt> is returned if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l1 := ['hello', 'world', 1, 2, 3]
+let $l2 := for $i in dataset TwitterUsers return $i
+return {&quot;count1&quot;: count($l1), &quot;count2&quot;: count($l2)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;count1&quot;: 5i64, &quot;count2&quot;: 4i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="avg"></a>avg</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>avg(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the average value of the items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>double</tt> value representing the average of the numbers in the given list. <tt>null</tt> is returned if the input is <tt>null</tt>, or the input list contains <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l := for $i in dataset TwitterUsers return $i.friends_count
+return {&quot;avg_friend_count&quot;: avg($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;avg_friend_count&quot;: 191.5d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sum"></a>sum</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sum(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the sum of the items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The sum of the numbers in the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. <tt>null</tt> is returned if the input is <tt>null</tt>, or the input list contains <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l := for $i in dataset TwitterUsers return $i.friends_count
+return {&quot;sum_friend_count&quot;: sum($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;sum_friend_count&quot;: 766 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="minmax"></a>min/max</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>min(num_list), max(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the min/max value of numeric items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be compared, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The min/max value of the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. <tt>null</tt> is returned if the input is <tt>null</tt>, or the input list contains <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $l := for $i in dataset TwitterUsers return $i. friends_count
+return {&quot;min_friend_count&quot;: min($l), &quot;max_friend_count&quot;: max($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;min_friend_count&quot;: 18, &quot;max_friend_count&quot;: 445 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-count"></a>sql-count</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-count(list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the number of non-null items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be counted, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> value representing the number of non-null items in the given list. The value <tt>0i64</tt> is returned if the input is <tt>null</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p></li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>    let $l1 := ['hello', 'world', 1, 2, 3, null]
+    return {&quot;count&quot;: sql-count($l1)}
+</pre></div></div>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;count&quot;: 5i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-avg"></a>sql-avg</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-avg(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the average value of the non-null items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> value representing the average of the non-null numbers in the given list. The <tt>null</tt> value is returned if the input is <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $l := [1.2, 2.3, 3.4, 0, null]
+return {&quot;avg&quot;: sql-avg($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;avg&quot;: 1.725d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-sum"></a>sql-sum</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-sum(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the sum of the non-null items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing numeric or null values, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The sum of the non-null numbers in the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. The value <tt>null</tt> is returned if the input is <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $l := [1.2, 2.3, 3.4, 0, null]
+return {&quot;sum&quot;: sql-sum($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;sum&quot;: 6.9d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="sql-minmax"></a>sql-min/max</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>sql-min(num_list), sql-max(num_list)
+</pre></div></div></li>
+  
+<li>
+<p>Gets the min/max value of the non-null numeric items in the given list.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>num_list</tt>: An <tt>orderedList</tt> or <tt>unorderedList</tt> containing the items to be compared, or a <tt>null</tt> value.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>The min/max value of the given list. The returning type is decided by the item type with the highest order in the numeric type promotion order (<tt>int8</tt>-&gt; <tt>int16</tt>-&gt;<tt>int32</tt>-&gt;<tt>int64</tt>-&gt;<tt>float</tt>-&gt;<tt>double</tt>) among items. The value <tt>null</tt> is returned if the input is <tt>null</tt>. Non-numeric types in the input list will cause an error.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $l := [1.2, 2.3, 3.4, 0, null]
+return {&quot;min&quot;: sql-min($l), &quot;max&quot;: sql-max($l)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;min&quot;: 0.0d, &quot;max&quot;: 3.4d }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Spatial_Functions_Back_to_TOC"></a><a name="SpatialFunctions" id="SpatialFunctions">Spatial Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="create-point"></a>create-point</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-point(x, y)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>point</tt> using an <tt>x</tt> and <tt>y</tt> value.</p></li>
+  
+<li>Arguments:</li>
+  
+<li><tt>x</tt> : A <tt>double</tt> that represents the x-coordinate.</li>
+  
+<li><tt>y</tt> : A <tt>double</tt> that represents the y-coordinate.</li>
+  
+<li>Return Value:</li>
+  
+<li>A <tt>point</tt> representing the ordered pair (<tt>x</tt>, <tt>y</tt>).</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-point(30.0,70.0)
+return {&quot;point&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: point(&quot;30.0,70.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-line"></a>create-line</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-line(point_expression1, point_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>line</tt> using <tt>point_expression1</tt> and <tt>point_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt> that represents the start point of the line.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt> that represents the end point of the line.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A spatial <tt>line</tt> created using the points provided in <tt>point_expression1</tt> and <tt>point_expression2</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-line(create-point(30.0,70.0), create-point(50.0,90.0))
+return {&quot;line&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;line&quot;: line(&quot;30.0,70.0 50.0,90.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-rectangle"></a>create-rectangle</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-rectangle(point_expression1, point_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>rectangle</tt> using <tt>point_expression1</tt> and <tt>point_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt> that represents the lower-left point of the rectangle.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt> that represents the upper-right point of the rectangle.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A spatial <tt>rectangle</tt> created using the points provided in <tt>point_expression1</tt> and <tt>point_expression2</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-rectangle(create-point(30.0,70.0), create-point(50.0,90.0))
+return {&quot;rectangle&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;rectangle&quot;: rectangle(&quot;30.0,70.0 50.0,90.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-circle"></a>create-circle</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-circle(point_expression, radius)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>circle</tt> using <tt>point_expression</tt> and <tt>radius</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression</tt> : A <tt>point</tt> that represents the center of the circle.</li>
+    
+<li><tt>radius</tt> : A <tt>double</tt> that represents the radius of the circle.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A spatial <tt>circle</tt> created using the center point and the radius provided in <tt>point_expression</tt> and <tt>radius</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-circle(create-point(30.0,70.0), 5.0)
+return {&quot;circle&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;circle&quot;: circle(&quot;30.0,70.0 5.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="create-polygon"></a>create-polygon</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>create-polygon(list_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>polygon</tt> using the double values provided in the argument <tt>list_expression</tt>. Each two consecutive double values represent a point starting from the first double value in the list. Note that at least six double values should be specified, meaning a total of three points.</p></li>
+  
+<li>Arguments:</li>
+  
+<li><tt>list_expression</tt> : An OrderedList of doubles representing the points of the polygon.</li>
+  
+<li>Return Value:</li>
+  
+<li>A <tt>polygon</tt>, represents a spatial simple polygon created using the points provided in <tt>list_expression</tt>.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $c :=  create-polygon([1.0,1.0,2.0,2.0,3.0,3.0,4.0,4.0])
+return {&quot;polygon&quot;: $c}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;polygon&quot;: polygon(&quot;1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="get-xget-y"></a>get-x/get-y</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>get-x(point_expression) or get-y(point_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the x or y coordinates of a point <tt>point_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression</tt> : A <tt>point</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> representing the x or y coordinates of the point <tt>point_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $point := create-point(2.3,5.0)
+return {&quot;x-coordinate&quot;: get-x($point), &quot;y-coordinate&quot;: get-y($point)}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;x-coordinate&quot;: 2.3d, &quot;y-coordinate&quot;: 5.0d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="get-points"></a>get-points</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>get-points(spatial_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns an ordered list of the points forming the spatial object <tt>spatial_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>spatial_expression</tt> : A <tt>point</tt>, <tt>line</tt>, <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> of the points forming the spatial object <tt>spatial_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $line := create-line(create-point(100.6,99.4), create-point(-72.0,-76.9))
+let $rectangle := create-rectangle(create-point(9.2,49.0), create-point(77.8,111.1))
+let $polygon := create-polygon([1.0,1.0,2.0,2.0,3.0,3.0,4.0,4.0])
+let $line_list := get-points($line)
+let $rectangle_list := get-points($rectangle)
+let $polygon_list := get-points($polygon)
+return {&quot;line-first-point&quot;: $line_list[0], &quot;line-second-point&quot;: $line_list[1], &quot;rectangle-left-bottom-point&quot;: $rectangle_list[0], &quot;rectangle-top-upper-point&quot;: $rectangle_list[1], &quot;polygon-first-point&quot;: $polygon_list[0], &quot;polygon-second-point&quot;: $polygon_list[1], &quot;polygon-third-point&quot;: $polygon_list[2], &quot;polygon-forth-point&quot;: $polygon_list[3]}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;line-first-point&quot;: point(&quot;100.6,99.4&quot;), &quot;line-second-point&quot;: point(&quot;-72.0,-76.9&quot;), &quot;rectangle-left-bottom-point&quot;: point(&quot;9.2,49.0&quot;), &quot;rectangle-top-upper-point&quot;: point(&quot;77.8,111.1&quot;), &quot;polygon-first-point&quot;: point(&quot;1.0,1.0&quot;), &quot;polygon-second-point&quot;: point(&quot;2.0,2.0&quot;), &quot;polygon-third-point&quot;: point(&quot;3.0,3.0&quot;), &quot;polygon-forth-point&quot;: point(&quot;4.0,4.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="get-centerget-radius"></a>get-center/get-radius</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>get-center(circle_expression) or get-radius(circle_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the center and the radius of a circle <tt>circle_expression</tt>, respectively.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>circle_expression</tt> : A <tt>circle</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>point</tt> or <tt>double</tt>, represent the center or radius of the circle <tt>circle_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $circle := create-circle(create-point(6.0,3.0), 1.0)
+return {&quot;circle-radius&quot;: get-radius($circle), &quot;circle-center&quot;: get-center($circle)}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;circle-radius&quot;: 1.0d, &quot;circle-center&quot;: point(&quot;6.0,3.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-distance"></a>spatial-distance</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-distance(point_expression1, point_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the Euclidean distance between <tt>point_expression1</tt> and <tt>point_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt>.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> as the Euclidean distance between <tt>point_expression1</tt> and <tt>point_expression2</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+let $d :=  spatial-distance($t.sender-location, create-point(30.0,70.0))
+return {&quot;point&quot;: $t.sender-location, &quot;distance&quot;: $d}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: point(&quot;47.44,80.65&quot;), &quot;distance&quot;: 20.434678857275934d }
+{ &quot;point&quot;: point(&quot;29.15,76.53&quot;), &quot;distance&quot;: 6.585089217315132d }
+{ &quot;point&quot;: point(&quot;37.59,68.42&quot;), &quot;distance&quot;: 7.752709203884797d }
+{ &quot;point&quot;: point(&quot;24.82,94.63&quot;), &quot;distance&quot;: 25.168816023007512d }
+{ &quot;point&quot;: point(&quot;32.84,67.14&quot;), &quot;distance&quot;: 4.030533463451212d }
+{ &quot;point&quot;: point(&quot;29.72,75.8&quot;), &quot;distance&quot;: 5.806754687430835d }
+{ &quot;point&quot;: point(&quot;39.28,70.48&quot;), &quot;distance&quot;: 9.292405501268227d }
+{ &quot;point&quot;: point(&quot;40.09,92.69&quot;), &quot;distance&quot;: 24.832321679617472d }
+{ &quot;point&quot;: point(&quot;47.51,83.99&quot;), &quot;distance&quot;: 22.41250097601782d }
+{ &quot;point&quot;: point(&quot;36.21,72.6&quot;), &quot;distance&quot;: 6.73231758015024d }
+{ &quot;point&quot;: point(&quot;46.05,93.34&quot;), &quot;distance&quot;: 28.325926286707734d }
+{ &quot;point&quot;: point(&quot;36.86,74.62&quot;), &quot;distance&quot;: 8.270671073135482d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-area"></a>spatial-area</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-area(spatial_2d_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the spatial area of <tt>spatial_2d_expression</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>spatial_2d_expression</tt> : A <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>double</tt> representing the area of <tt>spatial_2d_expression</tt>.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+let $circleArea := spatial-area(create-circle(create-point(0.0,0.0), 5.0))
+return {&quot;Area&quot;:$circleArea}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;Area&quot;: 78.53981625d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-intersect"></a>spatial-intersect</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-intersect(spatial_expression1, spatial_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether <tt>@arg1</tt> and <tt>@arg2</tt> spatially intersect each other.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>spatial_expression1</tt> : A <tt>point</tt>, <tt>line</tt>, <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+    
+<li><tt>spatial_expression2</tt> : A <tt>point</tt>, <tt>line</tt>, <tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>boolean</tt> representing whether <tt>spatial_expression1</tt> and <tt>spatial_expression2</tt> spatially overlap with each other.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+where spatial-intersect($t.sender-location, create-rectangle(create-point(30.0,70.0), create-point(40.0,80.0)))
+return $t
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;tweetid&quot;: &quot;4&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;39.28,70.48&quot;), &quot;send-time&quot;: datetime(&quot;2011-12-26T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;sprint&quot;, &quot;voice-command&quot; }}, &quot;message-text&quot;: &quot; like sprint the voice-command is mind-blowing:)&quot; }
+{ &quot;tweetid&quot;: &quot;7&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;ChangEwing_573&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 182, &quot;statuses_count&quot;: 394, &quot;name&quot;: &quot;Chang Ewing&quot;, &quot;followers_count&quot;: 32136 }, &quot;sender-location&quot;: point(&quot;36.21,72.6&quot;), &quot;send-time&quot;: datetime(&quot;2011-08-25T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;samsung&quot;, &quot;platform&quot; }}, &quot;message-text&quot;: &quot; like samsung the platform is good&quot; }
+{ &quot;tweetid&quot;: &quot;9&quot;, &quot;user&quot;: { &quot;screen-name&quot;: &quot;NathanGiesen@211&quot;, &quot;lang&quot;: &quot;en&quot;, &quot;friends_count&quot;: 39339, &quot;statuses_count&quot;: 473, &quot;name&quot;: &quot;Nathan Giesen&quot;, &quot;followers_count&quot;: 49416 }, &quot;sender-location&quot;: point(&quot;36.86,74.62&quot;), &quot;send-time&quot;: datetime(&quot;2012-07-21T10:10:00.000Z&quot;), &quot;referred-topics&quot;: {{ &quot;verizon&quot;, &quot;voicemail-service&quot; }}, &quot;message-text&quot;: &quot; love verizon its voicemail-service is awesome&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="spatial-cell"></a>spatial-cell</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>spatial-cell(point_expression1, point_expression2, x_increment, y_increment)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the grid cell that <tt>point_expression1</tt> belongs to.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>point_expression1</tt> : A <tt>point</tt> representing the point of interest that its grid cell will be returned.</li>
+    
+<li><tt>point_expression2</tt> : A <tt>point</tt> representing the origin of the grid.</li>
+    
+<li><tt>x_increment</tt> : A <tt>double</tt>, represents X increments.</li>
+    
+<li><tt>y_increment</tt> : A <tt>double</tt>, represents Y increments.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>rectangle</tt> representing the grid cell that <tt>point_expression1</tt> belongs to.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+group by $c :=  spatial-cell($t.sender-location, create-point(20.0,50.0), 5.5, 6.0) with $t
+let $num :=  count($t)
+return { &quot;cell&quot;: $c, &quot;count&quot;: $num}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;cell&quot;: rectangle(&quot;20.0,92.0 25.5,98.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;25.5,74.0 31.0,80.0&quot;), &quot;count&quot;: 2i64 }
+{ &quot;cell&quot;: rectangle(&quot;31.0,62.0 36.5,68.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;31.0,68.0 36.5,74.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;36.5,68.0 42.0,74.0&quot;), &quot;count&quot;: 2i64 }
+{ &quot;cell&quot;: rectangle(&quot;36.5,74.0 42.0,80.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;36.5,92.0 42.0,98.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;42.0,80.0 47.5,86.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;42.0,92.0 47.5,98.0&quot;), &quot;count&quot;: 1i64 }
+{ &quot;cell&quot;: rectangle(&quot;47.5,80.0 53.0,86.0&quot;), &quot;count&quot;: 1i64 }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Similarity_Functions_Back_to_TOC"></a><a name="SimilarityFunctions" id="SimilarityFunctions">Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports queries with different similarity functions, including <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> and <a class="externalLink" href="https://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a>.</p>
+<div class="section">
+<h3><a name="edit-distance"></a>edit-distance</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>edit-distance(expression1, expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the edit distance of <tt>expression1</tt> and <tt>expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>expression1</tt> : A <tt>string</tt> or a homogeneous <tt>OrderedList</tt> of a comparable item type.</li>
+    
+<li><tt>expression2</tt> : The same type as <tt>expression1</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>int64</tt> that represents the edit distance between <tt>expression1</tt> and <tt>expression2</tt>.</li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+where $ed &lt;= 2
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ]
+}
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="edit-distance-check"></a>edit-distance-check</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>edit-distance-check(expression1, expression2, threshold)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether <tt>expression1</tt> and <tt>expression2</tt> have an <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> within a given threshold. The &#x201c;check&#x201d; version of edit distance is faster than the &#x201c;non-check&#x201d; version because the former can detect whether two items satisfy a given threshold using early-termination techniques, as opposed to computing their real distance. Although possible, it is not necessary for the user to write queries using the &#x201c;check&#x201d; versions explicitly, since a rewrite rule can perform an appropriate transformation from a &#x201c;non-check&#x201d; version to a &#x201c;check&#x201d; version.</p></li>
+  
+<li>
+<p>Arguments:</p>
+  
+<ul>
+    
+<li><tt>expression1</tt> : A <tt>string</tt> or a homogeneous <tt>OrderedList</tt> of a comparable item type.</li>
+    
+<li><tt>expression2</tt> : The same type as <tt>expression1</tt>.</li>
+    
+<li><tt>threshold</tt> : An <tt>int64</tt> that represents the distance threshold.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> with two items:
+    
+<ul>
+      
+<li>The first item contains a <tt>boolean</tt> value representing whether <tt>expression1</tt> and <tt>expression2</tt> are similar.</li>
+      
+<li>The second item contains an <tt>int64</tt> that represents the edit distance of <tt>expression1</tt> and <tt>expression2</tt> if it is within the threshold, or 0 otherwise.</li>
+    </ul></li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
+where $ed[0]
+return $ed[1]
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>2
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="edit-distance-contains"></a>edit-distance-contains</h3>
+
+<ul>
+  
+<li>Syntax:</li>
+</ul>
+<p>edit-distance-contains(expression1, expression2, threshold)</p>
+
+<ul>
+  
+<li>
+<p>Checks whether <tt>expression1</tt> contains <tt>expression2</tt> with an <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> within a given threshold.</p></li>
+  
+<li>
+<p>Arguments:</p>
+  
+<ul>
+    
+<li><tt>expression1</tt> : A <tt>string</tt> or a homogeneous <tt>OrderedList</tt> of a comparable item type.</li>
+    
+<li><tt>expression2</tt> : The same type as <tt>expression1</tt>.</li>
+    
+<li><tt>threshold</tt> : An <tt>int32</tt> that represents the distance threshold.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> with two items:
+    
+<ul>
+      
+<li>The first item contains a <tt>boolean</tt> value representing whether <tt>expression1</tt> can contain <tt>expression2</tt>.</li>
+      
+<li>The second item contains an <tt>int32</tt> that represents the required edit distance for <tt>expression1</tt> to contain <tt>expression2</tt> if the first item is true.</li>
+    </ul></li>
+  </ul></li>
+  
+<li>Note: An <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">n-gram index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $i := edit-distance-contains(&quot;happy&quot;,&quot;hapr&quot;,2)
+return $i;
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ true, 1 ]
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="similarity-jaccard"></a>similarity-jaccard</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>similarity-jaccard(list_expression1, list_expression2)
+</pre></div></div></li>
+  
+<li>
+<p>Returns the <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard similarity</a> of <tt>list_expression1</tt> and <tt>list_expression2</tt>.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>list_expression1</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+    
+<li><tt>list_expression2</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>A <tt>float</tt> that represents the Jaccard similarity of <tt>list_expression1</tt> and <tt>list_expression2</tt>.</li>
+  </ul></li>
+  
+<li>Note: A <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">keyword index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+where $sim &gt;= 0.6f
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ]
+}
+{
+&quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ]
+}
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="similarity-jaccard-check"></a>similarity-jaccard-check</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>similarity-jaccard-check(list_expression1, list_expression2, threshold)
+</pre></div></div></li>
+  
+<li>
+<p>Checks whether <tt>list_expression1</tt> and <tt>list_expression2</tt> have a <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard similarity</a> greater than or equal to threshold. Again, the &#x201c;check&#x201d; version of Jaccard is faster than the &#x201c;non-check&#x201d; version.</p></li>
+  
+<li>
+<p>Arguments:</p>
+  
+<ul>
+    
+<li><tt>list_expression1</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+    
+<li><tt>list_expression2</tt> : An <tt>UnorderedList</tt> or <tt>OrderedList</tt>.</li>
+    
+<li><tt>threshold</tt> : A <tt>float</tt> that represents the similarity threshold.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> with two items:</li>
+    
+<li>The first item contains a <tt>boolean</tt> value representing whether <tt>list_expression1</tt> and <tt>list_expression2</tt> are similar.</li>
+    
+<li>The second item contains a <tt>float</tt> that represents the Jaccard similarity of <tt>list_expression1</tt> and <tt>list_expression2</tt> if it is greater than or equal to the threshold, or 0 otherwise.</li>
+  </ul></li>
+  
+<li>Note: A <a href="similarity.html#UsingIndexesToSupportSimilarityQueries">keyword index</a> can be utilized for this function.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $user in dataset('FacebookUsers')
+let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
+where $sim[0]
+return $sim[1]
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>0.75f
+1.0f
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Similarity_Operator_"></a>Similarity Operator ~=</h3>
+
+<ul>
+  
+<li>&#x201c;<tt>~=</tt>&#x201d; is syntactic sugar for expressing a similarity condition with a given similarity threshold.</li>
+  
+<li>The similarity function and threshold for &#x201c;<tt>~=</tt>&#x201d; are controlled via &#x201c;set&#x201d; directives.</li>
+  
+<li>The &#x201c;<tt>~=</tt>&#x201d; operator returns a <tt>boolean</tt> value that represents whether the operands are similar.</li>
+  
+<li>
+<p>Example for Jaccard similarity:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+set simfunction &quot;jaccard&quot;;
+set simthreshold &quot;0.6f&quot;;
+
+for $user in dataset('FacebookUsers')
+where $user.friend-ids ~= [1,5,9,10]
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 3, &quot;alias&quot;: &quot;Emory&quot;, &quot;name&quot;: &quot;EmoryUnk&quot;, &quot;user-since&quot;: datetime(&quot;2012-07-10T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 8, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;geomedia&quot;, &quot;start-date&quot;: date(&quot;2010-06-17&quot;), &quot;end-date&quot;: date(&quot;2010-01-26&quot;) } ]
+}
+{
+&quot;id&quot;: 10, &quot;alias&quot;: &quot;Bram&quot;, &quot;name&quot;: &quot;BramHatch&quot;, &quot;user-since&quot;: datetime(&quot;2010-10-16T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 1, 5, 9 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;physcane&quot;, &quot;start-date&quot;: date(&quot;2007-06-05&quot;), &quot;end-date&quot;: date(&quot;2011-11-05&quot;) } ]
+}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example for edit-distance similarity:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+set simfunction &quot;edit-distance&quot;;
+set simthreshold &quot;2&quot;;
+
+for $user in dataset('FacebookUsers')
+where $user.name ~= &quot;Suzanna Tilson&quot;
+return $user
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected output is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+&quot;id&quot;: 7, &quot;alias&quot;: &quot;Suzanna&quot;, &quot;name&quot;: &quot;SuzannaTillson&quot;, &quot;user-since&quot;: datetime(&quot;2012-08-07T10:10:00.000Z&quot;), &quot;friend-ids&quot;: {{ 6 }},
+&quot;employment&quot;: [ { &quot;organization-name&quot;: &quot;Labzatron&quot;, &quot;start-date&quot;: date(&quot;2011-04-19&quot;), &quot;end-date&quot;: null } ]
+}
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Tokenizing_Functions_Back_to_TOC"></a><a name="TokenizingFunctions" id="TokenizingFunctions">Tokenizing Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="word-tokens"></a>word-tokens</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>word-tokens(string_expression)
+</pre></div></div></li>
+  
+<li>
+<p>Returns a list of word tokens of <tt>string_expression</tt> using non-alphanumeric characters as delimiters.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>string_expression</tt> : A <tt>string</tt> that will be tokenized.</li>
+  </ul></li>
+  
+<li>Return Value:
+  
+<ul>
+    
+<li>An <tt>OrderedList</tt> of <tt>string</tt> word tokens.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>use dataverse TinySocial;
+
+for $t in dataset('TweetMessages')
+let $tokens := word-tokens($t.message-text)
+where $t.send-time &gt;= datetime('2012-01-01T00:00:00')
+return {
+&quot;tweetid&quot;: $t.tweetid,
+&quot;word-tokens&quot;: $tokens
+}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;tweetid&quot;: &quot;9&quot;, &quot;word-tokens&quot;: [ &quot;love&quot;, &quot;verizon&quot;, &quot;its&quot;, &quot;voicemail&quot;, &quot;service&quot;, &quot;is&quot;, &quot;awesome&quot; ] }
+</pre></div></div></li>
+</ul>
+<!-- ### hashed-word-tokens ###
+ * Syntax:
+
+        hashed-word-tokens(string_expression)
+
+ * Returns a list of hashed word tokens of `string_expression`.
+ * Arguments:
+    * `string_expression` : A `string` that will be tokenized.
+ * Return Value:
+   * An `OrderedList` of `int32` hashed tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := hashed-word-tokens($t.message-text)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "hashed-word-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        { "tweetid": "9", "hashed-word-tokens": [ -1217719622, -447857469, -1884722688, -325178649, 210976949, 285049676, 1916743959 ] }
+
+
+### counthashed-word-tokens ###
+ * Syntax:
+
+        counthashed-word-tokens(string_expression)
+
+ * Returns a list of hashed word tokens of `string_expression`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+ * Return Value:
+    * An `OrderedList` of `Int32` hashed tokens.
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := counthashed-word-tokens($t.message-text)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "counthashed-word-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        { "tweetid": "9", "counthashed-word-tokens": [ -1217719622, -447857469, -1884722688, -325178649, 210976949, 285049676, 1916743959 ] }
+
+
+### gram-tokens ###
+ * Syntax:
+
+        gram-tokens(string_expression, gram_length, boolean_expression)
+
+ * Returns a list of gram tokens of `string_expression`, which can be obtained by scanning the characters using a sliding window of a fixed length.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+    * `gram_length` : An `Int32` as the length of grams.
+   * `boolean_expression` : A `Boolean` value to indicate whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+ * Return Value:
+    * An `OrderedList` of String gram tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := gram-tokens($t.message-text, 3, true)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "gram-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        {
+        "tweetid": "9",
+        "gram-tokens": [ "## ", "# l", " lo", "lov", "ove", "ve ", "e v", " ve", "ver", "eri", "riz", "izo", "zon", "on ", "n i", " it", "its", "ts ", "s v", " vo", "voi", "oic", "ice",
+        "cem", "ema", "mai", "ail", "il-", "l-s", "-se", "ser", "erv", "rvi", "vic", "ice", "ce ", "e i", " is", "is ", "s a", " aw", "awe", "wes", "eso", "som", "ome", "me$", "e$$" ]
+        }
+
+
+### hashed-gram-tokens ###
+ * Syntax:
+
+        hashed-gram-tokens(string_expression, gram_length, boolean_expression)
+
+ * Returns a list of hashed gram tokens of `string_expression`.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+    * `gram_length` : An `Int32` as the length of grams.
+    * `boolean_expression` : A `Boolean` to indicate whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+ * Return Value:
+    * An `OrderedList` of `Int32` hashed gram tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := hashed-gram-tokens($t.message-text, 3, true)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "hashed-gram-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        {
+        "tweetid": "9",
+        "hashed-gram-tokens": [ 40557178, -2002241593, 161665899, -856104603, -500544946, 693410611, 395674299, -1015235909, 1115608337, 1187999872, -31006095, -219180466, -1676061637,
+        1040194153, -1339307841, -1527110163, -1884722688, -179148713, -431014627, -1789789823, -1209719926, 684519765, -486734513, 1734740619, -1971673751, -932421915, -2064668066,
+        -937135958, -790946468, -69070309, 1561601454, 26169001, -160734571, 1330043462, -486734513, -18796768, -470303314, 113421364, 1615760212, 1688217556, 1223719184, 536568131,
+        1682609873, 2935161, -414769471, -1027490137, 1602276102, 1050490461 ]
+        }
+
+
+### counthashed-gram-tokens ###
+ * Syntax:
+
+        counthashed-gram-tokens(string_expression, gram_length, boolean_expression)
+
+ * Returns a list of hashed gram tokens of `string_expression`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
+ * Arguments:
+    * `string_expression` : A `String` that will be tokenized.
+    * `gram_length` : An `Int32`, length of grams to generate.
+    * `boolean_expression` : A `Boolean`, whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+ * Return Value:
+    * An `OrderedList` of `Int32` hashed gram tokens.
+
+ * Example:
+
+        use dataverse TinySocial;
+
+        for $t in dataset('TweetMessages')
+        let $tokens := counthashed-gram-tokens($t.message-text, 3, true)
+        where $t.send-time >= datetime('2012-01-01T00:00:00')
+        return {
+        "tweetid": $t.tweetid,
+        "counthashed-gram-tokens": $tokens
+        }
+
+
+ * The expected result is:
+
+        {
+        "tweetid": "9",
+        "counthashed-gram-tokens": [ 40557178, -2002241593, 161665899, -856104603, -500544946, 693410611, 395674299, -1015235909, 1115608337, 1187999872, -31006095, -219180466, -1676061637,
+        1040194153, -1339307841, -1527110163, -1884722688, -179148713, -431014627, -1789789823, -1209719926, 684519765, -486734513, 1734740619, -1971673751, -932421915, -2064668066, -937135958,
+        -790946468, -69070309, 1561601454, 26169001, -160734571, 1330043462, -48

<TRUNCATED>


[17/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js b/content/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js
new file mode 100644
index 0000000..677e611
--- /dev/null
+++ b/content/docs/0.8.8-incubating/js/apache-maven-fluido-1.3.0.min.js
@@ -0,0 +1,21 @@
+/*!
+ * jQuery JavaScript Library v1.8.0
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Thu Aug 09 2012 16:24:48 GMT-0400 (Eastern Daylight Time)
+ */
+(function(a2,aB){var x,af,o=a2.document,aI=a2.location,d=a2.navigator,bg=a2.jQuery,I=a2.$,am=Array.prototype.push,a4=Array.prototype.slice,aK=Array.prototype.indexOf,A=Object.prototype.toString,V=Object.prototype.hasOwnProperty,aN=String.prototype.trim,bG=function(e,bZ){return new bG.fn.init(e,bZ,x)},bx=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,aa=/\S/,aV=/\s+/,D=aa.test("\xA0")?(/^[\s\xA0]+|[\s\xA0]+$/g):/^\s+|\s+$/g,bo=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bf=/^[\],:{}\s]*$/,bi=/(?:^|:|,)(?:\s*\[)+/g,bD=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,a0=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,bP=/^-ms-/,aU=/-([\da-z])/gi,N=function(e,bZ){return(bZ+"").toUpperCase()},aF=function(){if(o.addEventListener){o.removeEventListener("DOMContentLoaded",aF,false);bG.ready()}else{if(o.readyState==="complete"){o.detachEvent("onreadystatechange",aF);bG.ready()}}},Z={};bG.fn=bG.prototype={constructor:bG,init:function(e,b2,b1){var b0,b3,b
 Z,b4;if(!e){return this}if(e.nodeType){this.context=this[0]=e;this.length=1;return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b0=[null,e,null]}else{b0=bo.exec(e)}if(b0&&(b0[1]||!b2)){if(b0[1]){b2=b2 instanceof bG?b2[0]:b2;b4=(b2&&b2.nodeType?b2.ownerDocument||b2:o);e=bG.parseHTML(b0[1],b4,true);if(a.test(b0[1])&&bG.isPlainObject(b2)){this.attr.call(e,b2,true)}return bG.merge(this,e)}else{b3=o.getElementById(b0[2]);if(b3&&b3.parentNode){if(b3.id!==b0[2]){return b1.find(e)}this.length=1;this[0]=b3}this.context=o;this.selector=e;return this}}else{if(!b2||b2.jquery){return(b2||b1).find(e)}else{return this.constructor(b2).find(e)}}}else{if(bG.isFunction(e)){return b1.ready(e)}}if(e.selector!==aB){this.selector=e.selector;this.context=e.context}return bG.makeArray(e,this)},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return a4.call(this)},get:function(e){return e==null?this.toArray():(e<0?this[t
 his.length+e]:this[e])},pushStack:function(bZ,b1,e){var b0=bG.merge(this.constructor(),bZ);b0.prevObject=this;b0.context=this.context;if(b1==="find"){b0.selector=this.selector+(this.selector?" ":"")+e}else{if(b1){b0.selector=this.selector+"."+b1+"("+e+")"}}return b0},each:function(bZ,e){return bG.each(this,bZ,e)},ready:function(e){bG.ready.promise().done(e);return this},eq:function(e){e=+e;return e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(a4.apply(this,arguments),"slice",a4.call(arguments).join(","))},map:function(e){return this.pushStack(bG.map(this,function(b0,bZ){return e.call(b0,bZ,b0)}))},end:function(){return this.prevObject||this.constructor(null)},push:am,sort:[].sort,splice:[].splice};bG.fn.init.prototype=bG.fn;bG.extend=bG.fn.extend=function(){var b7,b0,e,bZ,b4,b5,b3=arguments[0]||{},b2=1,b1=arguments.length,b6=false;if(typeof b3==="boolean"){b6=b3;b3=arguments[1]||{
 };b2=2}if(typeof b3!=="object"&&!bG.isFunction(b3)){b3={}}if(b1===b2){b3=this;--b2}for(;b2<b1;b2++){if((b7=arguments[b2])!=null){for(b0 in b7){e=b3[b0];bZ=b7[b0];if(b3===bZ){continue}if(b6&&bZ&&(bG.isPlainObject(bZ)||(b4=bG.isArray(bZ)))){if(b4){b4=false;b5=e&&bG.isArray(e)?e:[]}else{b5=e&&bG.isPlainObject(e)?e:{}}b3[b0]=bG.extend(b6,b5,bZ)}else{if(bZ!==aB){b3[b0]=bZ}}}}}return b3};bG.extend({noConflict:function(e){if(a2.$===bG){a2.$=I}if(e&&a2.jQuery===bG){a2.jQuery=bg}return bG},isReady:false,readyWait:1,holdReady:function(e){if(e){bG.readyWait++}else{bG.ready(true)}},ready:function(e){if(e===true?--bG.readyWait:bG.isReady){return}if(!o.body){return setTimeout(bG.ready,1)}bG.isReady=true;if(e!==true&&--bG.readyWait>0){return}af.resolveWith(o,[bG]);if(bG.fn.trigger){bG(o).trigger("ready").off("ready")}},isFunction:function(e){return bG.type(e)==="function"},isArray:Array.isArray||function(e){return bG.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:fu
 nction(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):Z[A.call(e)]||"object"},isPlainObject:function(b1){if(!b1||bG.type(b1)!=="object"||b1.nodeType||bG.isWindow(b1)){return false}try{if(b1.constructor&&!V.call(b1,"constructor")&&!V.call(b1.constructor.prototype,"isPrototypeOf")){return false}}catch(b0){return false}var bZ;for(bZ in b1){}return bZ===aB||V.call(b1,bZ)},isEmptyObject:function(bZ){var e;for(e in bZ){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(b1,b0,e){var bZ;if(!b1||typeof b1!=="string"){return null}if(typeof b0==="boolean"){e=b0;b0=0}b0=b0||o;if((bZ=a.exec(b1))){return[b0.createElement(bZ[1])]}bZ=bG.buildFragment([b1],b0,e?null:[]);return bG.merge([],(bZ.cacheable?bG.clone(bZ.fragment):bZ.fragment).childNodes)},parseJSON:function(e){if(!e||typeof e!=="string"){return null}e=bG.trim(e);if(a2.JSON&&a2.JSON.parse){return a2.JSON.parse(e)}if(bf.test(e.replace(bD,"@").replace(a0,"]").replace(bi
 ,""))){return(new Function("return "+e))()}bG.error("Invalid JSON: "+e)},parseXML:function(b1){var bZ,b0;if(!b1||typeof b1!=="string"){return null}try{if(a2.DOMParser){b0=new DOMParser();bZ=b0.parseFromString(b1,"text/xml")}else{bZ=new ActiveXObject("Microsoft.XMLDOM");bZ.async="false";bZ.loadXML(b1)}}catch(b2){bZ=aB}if(!bZ||!bZ.documentElement||bZ.getElementsByTagName("parsererror").length){bG.error("Invalid XML: "+b1)}return bZ},noop:function(){},globalEval:function(e){if(e&&aa.test(e)){(a2.execScript||function(bZ){a2["eval"].call(a2,bZ)})(e)}},camelCase:function(e){return e.replace(bP,"ms-").replace(aU,N)},nodeName:function(bZ,e){return bZ.nodeName&&bZ.nodeName.toUpperCase()===e.toUpperCase()},each:function(b3,b4,b0){var bZ,b1=0,b2=b3.length,e=b2===aB||bG.isFunction(b3);if(b0){if(e){for(bZ in b3){if(b4.apply(b3[bZ],b0)===false){break}}}else{for(;b1<b2;){if(b4.apply(b3[b1++],b0)===false){break}}}}else{if(e){for(bZ in b3){if(b4.call(b3[bZ],bZ,b3[bZ])===false){break}}}else{for(;b1<b
 2;){if(b4.call(b3[b1],b1,b3[b1++])===false){break}}}}return b3},trim:aN?function(e){return e==null?"":aN.call(e)}:function(e){return e==null?"":e.toString().replace(D,"")},makeArray:function(e,b0){var b1,bZ=b0||[];if(e!=null){b1=bG.type(e);if(e.length==null||b1==="string"||b1==="function"||b1==="regexp"||bG.isWindow(e)){am.call(bZ,e)}else{bG.merge(bZ,e)}}return bZ},inArray:function(b1,bZ,b0){var e;if(bZ){if(aK){return aK.call(bZ,b1,b0)}e=bZ.length;b0=b0?b0<0?Math.max(0,e+b0):b0:0;for(;b0<e;b0++){if(b0 in bZ&&bZ[b0]===b1){return b0}}}return -1},merge:function(b2,b0){var e=b0.length,b1=b2.length,bZ=0;if(typeof e==="number"){for(;bZ<e;bZ++){b2[b1++]=b0[bZ]}}else{while(b0[bZ]!==aB){b2[b1++]=b0[bZ++]}}b2.length=b1;return b2},grep:function(bZ,b4,e){var b3,b0=[],b1=0,b2=bZ.length;e=!!e;for(;b1<b2;b1++){b3=!!b4(bZ[b1],b1);if(e!==b3){b0.push(bZ[b1])}}return b0},map:function(e,b5,b6){var b3,b4,b2=[],b0=0,bZ=e.length,b1=e instanceof bG||bZ!==aB&&typeof bZ==="number"&&((bZ>0&&e[0]&&e[bZ-1])||bZ
 ===0||bG.isArray(e));if(b1){for(;b0<bZ;b0++){b3=b5(e[b0],b0,b6);if(b3!=null){b2[b2.length]=b3}}}else{for(b4 in e){b3=b5(e[b4],b4,b6);if(b3!=null){b2[b2.length]=b3}}}return b2.concat.apply([],b2)},guid:1,proxy:function(b2,b1){var b0,e,bZ;if(typeof b1==="string"){b0=b2[b1];b1=b2;b2=b0}if(!bG.isFunction(b2)){return aB}e=a4.call(arguments,2);bZ=function(){return b2.apply(b1,e.concat(a4.call(arguments)))};bZ.guid=b2.guid=b2.guid||bZ.guid||bG.guid++;return bZ},access:function(e,b4,b7,b5,b2,b8,b6){var b0,b3=b7==null,b1=0,bZ=e.length;if(b7&&typeof b7==="object"){for(b1 in b7){bG.access(e,b4,b1,b7[b1],1,b8,b5)}b2=1}else{if(b5!==aB){b0=b6===aB&&bG.isFunction(b5);if(b3){if(b0){b0=b4;b4=function(ca,b9,cb){return b0.call(bG(ca),cb)}}else{b4.call(e,b5);b4=null}}if(b4){for(;b1<bZ;b1++){b4(e[b1],b7,b0?b5.call(e[b1],b1,b4(e[b1],b7)):b5,b6)}}b2=1}}return b2?e:b3?b4.call(e):bZ?b4(e[0],b7):b8},now:function(){return(new Date()).getTime()}});bG.ready.promise=function(b2){if(!af){af=bG.Deferred();if(o.rea
 dyState==="complete"||(o.readyState!=="loading"&&o.addEventListener)){setTimeout(bG.ready,1)}else{if(o.addEventListener){o.addEventListener("DOMContentLoaded",aF,false);a2.addEventListener("load",bG.ready,false)}else{o.attachEvent("onreadystatechange",aF);a2.attachEvent("onload",bG.ready);var b1=false;try{b1=a2.frameElement==null&&o.documentElement}catch(b0){}if(b1&&b1.doScroll){(function bZ(){if(!bG.isReady){try{b1.doScroll("left")}catch(b3){return setTimeout(bZ,50)}bG.ready()}})()}}}}return af.promise(b2)};bG.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(bZ,e){Z["[object "+e+"]"]=e.toLowerCase()});x=bG(o);var bU={};function ac(bZ){var e=bU[bZ]={};bG.each(bZ.split(aV),function(b1,b0){e[b0]=true});return e}bG.Callbacks=function(b8){b8=typeof b8==="string"?(bU[b8]||ac(b8)):bG.extend({},b8);var b1,e,b2,b0,b3,b4,b5=[],b6=!b8.once&&[],bZ=function(b9){b1=b8.memory&&b9;e=true;b4=b0||0;b0=0;b3=b5.length;b2=true;for(;b5&&b4<b3;b4++){if(b5[b4].apply(b9[0]
 ,b9[1])===false&&b8.stopOnFalse){b1=false;break}}b2=false;if(b5){if(b6){if(b6.length){bZ(b6.shift())}}else{if(b1){b5=[]}else{b7.disable()}}}},b7={add:function(){if(b5){var ca=b5.length;(function b9(cb){bG.each(cb,function(cd,cc){if(bG.isFunction(cc)&&(!b8.unique||!b7.has(cc))){b5.push(cc)}else{if(cc&&cc.length){b9(cc)}}})})(arguments);if(b2){b3=b5.length}else{if(b1){b0=ca;bZ(b1)}}}return this},remove:function(){if(b5){bG.each(arguments,function(cb,b9){var ca;while((ca=bG.inArray(b9,b5,ca))>-1){b5.splice(ca,1);if(b2){if(ca<=b3){b3--}if(ca<=b4){b4--}}}})}return this},has:function(b9){return bG.inArray(b9,b5)>-1},empty:function(){b5=[];return this},disable:function(){b5=b6=b1=aB;return this},disabled:function(){return !b5},lock:function(){b6=aB;if(!b1){b7.disable()}return this},locked:function(){return !b6},fireWith:function(ca,b9){b9=b9||[];b9=[ca,b9.slice?b9.slice():b9];if(b5&&(!e||b6)){if(b2){b6.push(b9)}else{bZ(b9)}}return this},fire:function(){b7.fireWith(this,arguments);return th
 is},fired:function(){return !!e}};return b7};bG.extend({Deferred:function(b0){var bZ=[["resolve","done",bG.Callbacks("once memory"),"resolved"],["reject","fail",bG.Callbacks("once memory"),"rejected"],["notify","progress",bG.Callbacks("memory")]],b1="pending",b2={state:function(){return b1},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var b3=arguments;return bG.Deferred(function(b4){bG.each(bZ,function(b6,b5){var b8=b5[0],b7=b3[b6];e[b5[1]](bG.isFunction(b7)?function(){var b9=b7.apply(this,arguments);if(b9&&bG.isFunction(b9.promise)){b9.promise().done(b4.resolve).fail(b4.reject).progress(b4.notify)}else{b4[b8+"With"](this===e?b4:this,[b9])}}:b4[b8])});b3=null}).promise()},promise:function(b3){return typeof b3==="object"?bG.extend(b3,b2):b2}},e={};b2.pipe=b2.then;bG.each(bZ,function(b4,b3){var b6=b3[2],b5=b3[3];b2[b3[1]]=b6.add;if(b5){b6.add(function(){b1=b5},bZ[b4^1][2].disable,bZ[2][2].lock)}e[b3[0]]=b6.fire;e[b3[0]+"With"]=b6.fireWith});b2.promi
 se(e);if(b0){b0.call(e,e)}return e},when:function(b2){var b0=0,b4=a4.call(arguments),e=b4.length,bZ=e!==1||(b2&&bG.isFunction(b2.promise))?e:0,b7=bZ===1?b2:bG.Deferred(),b1=function(b9,ca,b8){return function(cb){ca[b9]=this;b8[b9]=arguments.length>1?a4.call(arguments):cb;if(b8===b6){b7.notifyWith(ca,b8)}else{if(!(--bZ)){b7.resolveWith(ca,b8)}}}},b6,b3,b5;if(e>1){b6=new Array(e);b3=new Array(e);b5=new Array(e);for(;b0<e;b0++){if(b4[b0]&&bG.isFunction(b4[b0].promise)){b4[b0].promise().done(b1(b0,b5,b4)).fail(b7.reject).progress(b1(b0,b3,b6))}else{--bZ}}}if(!bZ){b7.resolveWith(b5,b4)}return b7.promise()}});bG.support=(function(){var cb,ca,b8,b9,b2,b7,b6,b4,b3,b1,bZ,b0=o.createElement("div");b0.setAttribute("className","t");b0.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";ca=b0.getElementsByTagName("*");b8=b0.getElementsByTagName("a")[0];b8.style.cssText="top:1px;float:left;opacity:.5";if(!ca||!ca.length||!b8){return{}}b9=o.createElement("select");b2=b9.
 appendChild(o.createElement("option"));b7=b0.getElementsByTagName("input")[0];cb={leadingWhitespace:(b0.firstChild.nodeType===3),tbody:!b0.getElementsByTagName("tbody").length,htmlSerialize:!!b0.getElementsByTagName("link").length,style:/top/.test(b8.getAttribute("style")),hrefNormalized:(b8.getAttribute("href")==="/a"),opacity:/^0.5/.test(b8.style.opacity),cssFloat:!!b8.style.cssFloat,checkOn:(b7.value==="on"),optSelected:b2.selected,getSetAttribute:b0.className!=="t",enctype:!!o.createElement("form").enctype,html5Clone:o.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",boxModel:(o.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};b7.checked=true;cb.noCloneChecked=b7.cloneNode(true).checked;b9.disabled=true;cb.optDisabled=!b2.disabled;try{delete b0.test}catch(b5){cb.deleteExp
 ando=false}if(!b0.addEventListener&&b0.attachEvent&&b0.fireEvent){b0.attachEvent("onclick",bZ=function(){cb.noCloneEvent=false});b0.cloneNode(true).fireEvent("onclick");b0.detachEvent("onclick",bZ)}b7=o.createElement("input");b7.value="t";b7.setAttribute("type","radio");cb.radioValue=b7.value==="t";b7.setAttribute("checked","checked");b7.setAttribute("name","t");b0.appendChild(b7);b6=o.createDocumentFragment();b6.appendChild(b0.lastChild);cb.checkClone=b6.cloneNode(true).cloneNode(true).lastChild.checked;cb.appendChecked=b7.checked;b6.removeChild(b7);b6.appendChild(b0);if(b0.attachEvent){for(b3 in {submit:true,change:true,focusin:true}){b4="on"+b3;b1=(b4 in b0);if(!b1){b0.setAttribute(b4,"return;");b1=(typeof b0[b4]==="function")}cb[b3+"Bubbles"]=b1}}bG(function(){var cc,cg,ce,cf,cd="padding:0;margin:0;border:0;display:block;overflow:hidden;",e=o.getElementsByTagName("body")[0];if(!e){return}cc=o.createElement("div");cc.style.cssText="visibility:hidden;border:0;width:0;height:0;posi
 tion:static;top:0;margin-top:1px";e.insertBefore(cc,e.firstChild);cg=o.createElement("div");cc.appendChild(cg);cg.innerHTML="<table><tr><td></td><td>t</td></tr></table>";ce=cg.getElementsByTagName("td");ce[0].style.cssText="padding:0;margin:0;border:0;display:none";b1=(ce[0].offsetHeight===0);ce[0].style.display="";ce[1].style.display="none";cb.reliableHiddenOffsets=b1&&(ce[0].offsetHeight===0);cg.innerHTML="";cg.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";cb.boxSizing=(cg.offsetWidth===4);cb.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a2.getComputedStyle){cb.pixelPosition=(a2.getComputedStyle(cg,null)||{}).top!=="1%";cb.boxSizingReliable=(a2.getComputedStyle(cg,null)||{width:"4px"}).width==="4px";cf=o.createElement("div");cf.style.cssText=cg.style.cssText=cd;cf.style.marginRight=cf.style.width="0";cg.style.width="1px";cg.appendChild(cf)
 ;cb.reliableMarginRight=!parseFloat((a2.getComputedStyle(cf,null)||{}).marginRight)}if(typeof cg.style.zoom!=="undefined"){cg.innerHTML="";cg.style.cssText=cd+"width:1px;padding:1px;display:inline;zoom:1";cb.inlineBlockNeedsLayout=(cg.offsetWidth===3);cg.style.display="block";cg.style.overflow="visible";cg.innerHTML="<div></div>";cg.firstChild.style.width="5px";cb.shrinkWrapBlocks=(cg.offsetWidth!==3);cc.style.zoom=1}e.removeChild(cc);cc=cg=ce=cf=null});b6.removeChild(b0);ca=b8=b9=b2=b7=b6=b0=null;return cb})();var bt=/^(?:\{.*\}|\[.*\])$/,aL=/([A-Z])/g;bG.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(bG.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?bG.cache[e[bG.expando]]:e[bG.expando];return !!e&&!O(e)},data:function(b1,bZ,b3,b2){if(!bG.acceptData(b1)){return}var b4,b6,b7=bG.expando,b5=typeof bZ==="string",b8=b1.nodeType,e=b8?bG.cache:b1,b0=b8?b1[b7]:b1[b7]&&
 b7;if((!b0||!e[b0]||(!b2&&!e[b0].data))&&b5&&b3===aB){return}if(!b0){if(b8){b1[b7]=b0=bG.deletedIds.pop()||++bG.uuid}else{b0=b7}}if(!e[b0]){e[b0]={};if(!b8){e[b0].toJSON=bG.noop}}if(typeof bZ==="object"||typeof bZ==="function"){if(b2){e[b0]=bG.extend(e[b0],bZ)}else{e[b0].data=bG.extend(e[b0].data,bZ)}}b4=e[b0];if(!b2){if(!b4.data){b4.data={}}b4=b4.data}if(b3!==aB){b4[bG.camelCase(bZ)]=b3}if(b5){b6=b4[bZ];if(b6==null){b6=b4[bG.camelCase(bZ)]}}else{b6=b4}return b6},removeData:function(b1,bZ,b2){if(!bG.acceptData(b1)){return}var b5,b4,b3,b6=b1.nodeType,e=b6?bG.cache:b1,b0=b6?b1[bG.expando]:bG.expando;if(!e[b0]){return}if(bZ){b5=b2?e[b0]:e[b0].data;if(b5){if(!bG.isArray(bZ)){if(bZ in b5){bZ=[bZ]}else{bZ=bG.camelCase(bZ);if(bZ in b5){bZ=[bZ]}else{bZ=bZ.split(" ")}}}for(b4=0,b3=bZ.length;b4<b3;b4++){delete b5[bZ[b4]]}if(!(b2?O:bG.isEmptyObject)(b5)){return}}}if(!b2){delete e[b0].data;if(!O(e[b0])){return}}if(b6){bG.cleanData([b1],true)}else{if(bG.support.deleteExpando||e!=e.window){delete
  e[b0]}else{e[b0]=null}}},_data:function(bZ,e,b0){return bG.data(bZ,e,b0,true)},acceptData:function(bZ){var e=bZ.nodeName&&bG.noData[bZ.nodeName.toLowerCase()];return !e||e!==true&&bZ.getAttribute("classid")===e}});bG.fn.extend({data:function(b7,b6){var b2,bZ,b5,e,b1,b0=this[0],b4=0,b3=null;if(b7===aB){if(this.length){b3=bG.data(b0);if(b0.nodeType===1&&!bG._data(b0,"parsedAttrs")){b5=b0.attributes;for(b1=b5.length;b4<b1;b4++){e=b5[b4].name;if(e.indexOf("data-")===0){e=bG.camelCase(e.substring(5));bv(b0,e,b3[e])}}bG._data(b0,"parsedAttrs",true)}}return b3}if(typeof b7==="object"){return this.each(function(){bG.data(this,b7)})}b2=b7.split(".",2);b2[1]=b2[1]?"."+b2[1]:"";bZ=b2[1]+"!";return bG.access(this,function(b8){if(b8===aB){b3=this.triggerHandler("getData"+bZ,[b2[0]]);if(b3===aB&&b0){b3=bG.data(b0,b7);b3=bv(b0,b7,b3)}return b3===aB&&b2[1]?this.data(b2[0]):b3}b2[1]=b8;this.each(function(){var b9=bG(this);b9.triggerHandler("setData"+bZ,b2);bG.data(this,b7,b8);b9.triggerHandler("cha
 ngeData"+bZ,b2)})},null,b6,arguments.length>1,null,false)},removeData:function(e){return this.each(function(){bG.removeData(this,e)})}});function bv(b1,b0,b2){if(b2===aB&&b1.nodeType===1){var bZ="data-"+b0.replace(aL,"-$1").toLowerCase();b2=b1.getAttribute(bZ);if(typeof b2==="string"){try{b2=b2==="true"?true:b2==="false"?false:b2==="null"?null:+b2+""===b2?+b2:bt.test(b2)?bG.parseJSON(b2):b2}catch(b3){}bG.data(b1,b0,b2)}else{b2=aB}}return b2}function O(bZ){var e;for(e in bZ){if(e==="data"&&bG.isEmptyObject(bZ[e])){continue}if(e!=="toJSON"){return false}}return true}bG.extend({queue:function(b0,bZ,b1){var e;if(b0){bZ=(bZ||"fx")+"queue";e=bG._data(b0,bZ);if(b1){if(!e||bG.isArray(b1)){e=bG._data(b0,bZ,bG.makeArray(b1))}else{e.push(b1)}}return e||[]}},dequeue:function(b3,b2){b2=b2||"fx";var bZ=bG.queue(b3,b2),b1=bZ.shift(),e=bG._queueHooks(b3,b2),b0=function(){bG.dequeue(b3,b2)};if(b1==="inprogress"){b1=bZ.shift()}if(b1){if(b2==="fx"){bZ.unshift("inprogress")}delete e.stop;b1.call(b3,b0,
 e)}if(!bZ.length&&e){e.empty.fire()}},_queueHooks:function(b0,bZ){var e=bZ+"queueHooks";return bG._data(b0,e)||bG._data(b0,e,{empty:bG.Callbacks("once memory").add(function(){bG.removeData(b0,bZ+"queue",true);bG.removeData(b0,e,true)})})}});bG.fn.extend({queue:function(e,bZ){var b0=2;if(typeof e!=="string"){bZ=e;e="fx";b0--}if(arguments.length<b0){return bG.queue(this[0],e)}return bZ===aB?this:this.each(function(){var b1=bG.queue(this,e,bZ);bG._queueHooks(this,e);if(e==="fx"&&b1[0]!=="inprogress"){bG.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){bG.dequeue(this,e)})},delay:function(bZ,e){bZ=bG.fx?bG.fx.speeds[bZ]||bZ:bZ;e=e||"fx";return this.queue(e,function(b1,b0){var b2=setTimeout(b1,bZ);b0.stop=function(){clearTimeout(b2)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(b0,b4){var bZ,b1=1,b5=bG.Deferred(),b3=this,e=this.length,b2=function(){if(!(--b1)){b5.resolveWith(b3,[b3])}};if(typeof b0!=="string"){b4=b0;b0=aB}b0=b0||"fx";while(
 e--){if((bZ=bG._data(b3[e],b0+"queueHooks"))&&bZ.empty){b1++;bZ.empty.add(b2)}}b2();return b5.promise(b4)}});var a7,bV,n,bJ=/[\t\r\n]/g,ai=/\r/g,j=/^(?:button|input)$/i,aA=/^(?:button|input|object|select|textarea)$/i,E=/^a(?:rea|)$/i,M=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,bL=bG.support.getSetAttribute;bG.fn.extend({attr:function(e,bZ){return bG.access(this,bG.attr,e,bZ,arguments.length>1)},removeAttr:function(e){return this.each(function(){bG.removeAttr(this,e)})},prop:function(e,bZ){return bG.access(this,bG.prop,e,bZ,arguments.length>1)},removeProp:function(e){e=bG.propFix[e]||e;return this.each(function(){try{this[e]=aB;delete this[e]}catch(bZ){}})},addClass:function(b2){var b4,b0,bZ,b1,b3,b5,e;if(bG.isFunction(b2)){return this.each(function(b6){bG(this).addClass(b2.call(this,b6,this.className))})}if(b2&&typeof b2==="string"){b4=b2.split(aV);for(b0=0,bZ=this.length;b0<bZ;b0++){b1=this[b0];if(b
 1.nodeType===1){if(!b1.className&&b4.length===1){b1.className=b2}else{b3=" "+b1.className+" ";for(b5=0,e=b4.length;b5<e;b5++){if(!~b3.indexOf(" "+b4[b5]+" ")){b3+=b4[b5]+" "}}b1.className=bG.trim(b3)}}}}return this},removeClass:function(b4){var b1,b2,b3,b5,bZ,b0,e;if(bG.isFunction(b4)){return this.each(function(b6){bG(this).removeClass(b4.call(this,b6,this.className))})}if((b4&&typeof b4==="string")||b4===aB){b1=(b4||"").split(aV);for(b0=0,e=this.length;b0<e;b0++){b3=this[b0];if(b3.nodeType===1&&b3.className){b2=(" "+b3.className+" ").replace(bJ," ");for(b5=0,bZ=b1.length;b5<bZ;b5++){while(b2.indexOf(" "+b1[b5]+" ")>-1){b2=b2.replace(" "+b1[b5]+" "," ")}}b3.className=b4?bG.trim(b2):""}}}return this},toggleClass:function(b1,bZ){var b0=typeof b1,e=typeof bZ==="boolean";if(bG.isFunction(b1)){return this.each(function(b2){bG(this).toggleClass(b1.call(this,b2,this.className,bZ),bZ)})}return this.each(function(){if(b0==="string"){var b4,b3=0,b2=bG(this),b5=bZ,b6=b1.split(aV);while((b4=b6[
 b3++])){b5=e?b5:!b2.hasClass(b4);b2[b5?"addClass":"removeClass"](b4)}}else{if(b0==="undefined"||b0==="boolean"){if(this.className){bG._data(this,"__className__",this.className)}this.className=this.className||b1===false?"":bG._data(this,"__className__")||""}}})},hasClass:function(e){var b1=" "+e+" ",b0=0,bZ=this.length;for(;b0<bZ;b0++){if(this[b0].nodeType===1&&(" "+this[b0].className+" ").replace(bJ," ").indexOf(b1)>-1){return true}}return false},val:function(b1){var e,bZ,b2,b0=this[0];if(!arguments.length){if(b0){e=bG.valHooks[b0.type]||bG.valHooks[b0.nodeName.toLowerCase()];if(e&&"get" in e&&(bZ=e.get(b0,"value"))!==aB){return bZ}bZ=b0.value;return typeof bZ==="string"?bZ.replace(ai,""):bZ==null?"":bZ}return}b2=bG.isFunction(b1);return this.each(function(b4){var b5,b3=bG(this);if(this.nodeType!==1){return}if(b2){b5=b1.call(this,b4,b3.val())}else{b5=b1}if(b5==null){b5=""}else{if(typeof b5==="number"){b5+=""}else{if(bG.isArray(b5)){b5=bG.map(b5,function(b6){return b6==null?"":b6+""}
 )}}}e=bG.valHooks[this.type]||bG.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b5,"value")===aB){this.value=b5}})}});bG.extend({valHooks:{option:{get:function(e){var bZ=e.attributes.value;return !bZ||bZ.specified?e.value:e.text}},select:{get:function(e){var b4,bZ,b3,b1,b2=e.selectedIndex,b5=[],b6=e.options,b0=e.type==="select-one";if(b2<0){return null}bZ=b0?b2:0;b3=b0?b2+1:b6.length;for(;bZ<b3;bZ++){b1=b6[bZ];if(b1.selected&&(bG.support.optDisabled?!b1.disabled:b1.getAttribute("disabled")===null)&&(!b1.parentNode.disabled||!bG.nodeName(b1.parentNode,"optgroup"))){b4=bG(b1).val();if(b0){return b4}b5.push(b4)}}if(b0&&!b5.length&&b6.length){return bG(b6[b2]).val()}return b5},set:function(bZ,b0){var e=bG.makeArray(b0);bG(bZ).find("option").each(function(){this.selected=bG.inArray(bG(this).val(),e)>=0});if(!e.length){bZ.selectedIndex=-1}return e}}},attrFn:{},attr:function(b4,b1,b5,b3){var b0,e,b2,bZ=b4.nodeType;if(!b4||bZ===3||bZ===8||bZ===2){return}if(b3&&bG.isF
 unction(bG.fn[b1])){return bG(b4)[b1](b5)}if(typeof b4.getAttribute==="undefined"){return bG.prop(b4,b1,b5)}b2=bZ!==1||!bG.isXMLDoc(b4);if(b2){b1=b1.toLowerCase();e=bG.attrHooks[b1]||(M.test(b1)?bV:a7)}if(b5!==aB){if(b5===null){bG.removeAttr(b4,b1);return}else{if(e&&"set" in e&&b2&&(b0=e.set(b4,b5,b1))!==aB){return b0}else{b4.setAttribute(b1,""+b5);return b5}}}else{if(e&&"get" in e&&b2&&(b0=e.get(b4,b1))!==null){return b0}else{b0=b4.getAttribute(b1);return b0===null?aB:b0}}},removeAttr:function(b1,b3){var b2,b4,bZ,e,b0=0;if(b3&&b1.nodeType===1){b4=b3.split(aV);for(;b0<b4.length;b0++){bZ=b4[b0];if(bZ){b2=bG.propFix[bZ]||bZ;e=M.test(bZ);if(!e){bG.attr(b1,bZ,"")}b1.removeAttribute(bL?bZ:b2);if(e&&b2 in b1){b1[b2]=false}}}}},attrHooks:{type:{set:function(e,bZ){if(j.test(e.nodeName)&&e.parentNode){bG.error("type property can't be changed")}else{if(!bG.support.radioValue&&bZ==="radio"&&bG.nodeName(e,"input")){var b0=e.value;e.setAttribute("type",bZ);if(b0){e.value=b0}return bZ}}}},value:{
 get:function(bZ,e){if(a7&&bG.nodeName(bZ,"button")){return a7.get(bZ,e)}return e in bZ?bZ.value:null},set:function(bZ,b0,e){if(a7&&bG.nodeName(bZ,"button")){return a7.set(bZ,b0,e)}bZ.value=b0}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(b3,b1,b4){var b0,e,b2,bZ=b3.nodeType;if(!b3||bZ===3||bZ===8||bZ===2){return}b2=bZ!==1||!bG.isXMLDoc(b3);if(b2){b1=bG.propFix[b1]||b1;e=bG.propHooks[b1]}if(b4!==aB){if(e&&"set" in e&&(b0=e.set(b3,b4,b1))!==aB){return b0}else{return(b3[b1]=b4)}}else{if(e&&"get" in e&&(b0=e.get(b3,b1))!==null){return b0}else{return b3[b1]}}},propHooks:{tabIndex:{get:function(bZ){var e=bZ.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):aA.test(bZ.nodeName)||E.test(bZ.nodeName)&&bZ.href?0:aB}}}});bV={get:func
 tion(bZ,e){var b1,b0=bG.prop(bZ,e);return b0===true||typeof b0!=="boolean"&&(b1=bZ.getAttributeNode(e))&&b1.nodeValue!==false?e.toLowerCase():aB},set:function(bZ,b1,e){var b0;if(b1===false){bG.removeAttr(bZ,e)}else{b0=bG.propFix[e]||e;if(b0 in bZ){bZ[b0]=true}bZ.setAttribute(e,e.toLowerCase())}return e}};if(!bL){n={name:true,id:true,coords:true};a7=bG.valHooks.button={get:function(b0,bZ){var e;e=b0.getAttributeNode(bZ);return e&&(n[bZ]?e.value!=="":e.specified)?e.value:aB},set:function(b0,b1,bZ){var e=b0.getAttributeNode(bZ);if(!e){e=o.createAttribute(bZ);b0.setAttributeNode(e)}return(e.value=b1+"")}};bG.each(["width","height"],function(bZ,e){bG.attrHooks[e]=bG.extend(bG.attrHooks[e],{set:function(b0,b1){if(b1===""){b0.setAttribute(e,"auto");return b1}}})});bG.attrHooks.contenteditable={get:a7.get,set:function(bZ,b0,e){if(b0===""){b0="false"}a7.set(bZ,b0,e)}}}if(!bG.support.hrefNormalized){bG.each(["href","src","width","height"],function(bZ,e){bG.attrHooks[e]=bG.extend(bG.attrHooks[
 e],{get:function(b1){var b0=b1.getAttribute(e,2);return b0===null?aB:b0}})})}if(!bG.support.style){bG.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||aB},set:function(e,bZ){return(e.style.cssText=""+bZ)}}}if(!bG.support.optSelected){bG.propHooks.selected=bG.extend(bG.propHooks.selected,{get:function(bZ){var e=bZ.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!bG.support.enctype){bG.propFix.enctype="encoding"}if(!bG.support.checkOn){bG.each(["radio","checkbox"],function(){bG.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}bG.each(["radio","checkbox"],function(){bG.valHooks[this]=bG.extend(bG.valHooks[this],{set:function(e,bZ){if(bG.isArray(bZ)){return(e.checked=bG.inArray(bG(e).val(),bZ)>=0)}}})});var bE=/^(?:textarea|input|select)$/i,br=/^([^\.]*|)(?:\.(.+)|)$/,ba=/(?:^|\s)hover(\.\S+|)\b/,a3=/^key/,bK=/^(?:mouse|contextmenu)|click/,by=/^(?:focusinfocus|focusoutblur)$/,aq=f
 unction(e){return bG.event.special.hover?e:e.replace(ba,"mouseenter$1 mouseleave$1")};bG.event={add:function(b1,b5,cc,b3,b2){var b6,b4,cd,cb,ca,b8,e,b9,bZ,b0,b7;if(b1.nodeType===3||b1.nodeType===8||!b5||!cc||!(b6=bG._data(b1))){return}if(cc.handler){bZ=cc;cc=bZ.handler;b2=bZ.selector}if(!cc.guid){cc.guid=bG.guid++}cd=b6.events;if(!cd){b6.events=cd={}}b4=b6.handle;if(!b4){b6.handle=b4=function(ce){return typeof bG!=="undefined"&&(!ce||bG.event.triggered!==ce.type)?bG.event.dispatch.apply(b4.elem,arguments):aB};b4.elem=b1}b5=bG.trim(aq(b5)).split(" ");for(cb=0;cb<b5.length;cb++){ca=br.exec(b5[cb])||[];b8=ca[1];e=(ca[2]||"").split(".").sort();b7=bG.event.special[b8]||{};b8=(b2?b7.delegateType:b7.bindType)||b8;b7=bG.event.special[b8]||{};b9=bG.extend({type:b8,origType:ca[1],data:b3,handler:cc,guid:cc.guid,selector:b2,namespace:e.join(".")},bZ);b0=cd[b8];if(!b0){b0=cd[b8]=[];b0.delegateCount=0;if(!b7.setup||b7.setup.call(b1,b3,e,b4)===false){if(b1.addEventListener){b1.addEventListener(b8
 ,b4,false)}else{if(b1.attachEvent){b1.attachEvent("on"+b8,b4)}}}}if(b7.add){b7.add.call(b1,b9);if(!b9.handler.guid){b9.handler.guid=cc.guid}}if(b2){b0.splice(b0.delegateCount++,0,b9)}else{b0.push(b9)}bG.event.global[b8]=true}b1=null},global:{},remove:function(b1,b6,cc,b2,b5){var cd,ce,b9,b0,bZ,b3,b4,cb,b8,e,ca,b7=bG.hasData(b1)&&bG._data(b1);if(!b7||!(cb=b7.events)){return}b6=bG.trim(aq(b6||"")).split(" ");for(cd=0;cd<b6.length;cd++){ce=br.exec(b6[cd])||[];b9=b0=ce[1];bZ=ce[2];if(!b9){for(b9 in cb){bG.event.remove(b1,b9+b6[cd],cc,b2,true)}continue}b8=bG.event.special[b9]||{};b9=(b2?b8.delegateType:b8.bindType)||b9;e=cb[b9]||[];b3=e.length;bZ=bZ?new RegExp("(^|\\.)"+bZ.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(b4=0;b4<e.length;b4++){ca=e[b4];if((b5||b0===ca.origType)&&(!cc||cc.guid===ca.guid)&&(!bZ||bZ.test(ca.namespace))&&(!b2||b2===ca.selector||b2==="**"&&ca.selector)){e.splice(b4--,1);if(ca.selector){e.delegateCount--}if(b8.remove){b8.remove.call(b1,ca)}}}if(e.le
 ngth===0&&b3!==e.length){if(!b8.teardown||b8.teardown.call(b1,bZ,b7.handle)===false){bG.removeEvent(b1,b9,b7.handle)}delete cb[b9]}}if(bG.isEmptyObject(cb)){delete b7.handle;bG.removeData(b1,"events",true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bZ,b6,b4,cd){if(b4&&(b4.nodeType===3||b4.nodeType===8)){return}var e,b1,b7,cb,b3,b2,b9,b8,b5,cc,ca=bZ.type||bZ,b0=[];if(by.test(ca+bG.event.triggered)){return}if(ca.indexOf("!")>=0){ca=ca.slice(0,-1);b1=true}if(ca.indexOf(".")>=0){b0=ca.split(".");ca=b0.shift();b0.sort()}if((!b4||bG.event.customEvent[ca])&&!bG.event.global[ca]){return}bZ=typeof bZ==="object"?bZ[bG.expando]?bZ:new bG.Event(ca,bZ):new bG.Event(ca);bZ.type=ca;bZ.isTrigger=true;bZ.exclusive=b1;bZ.namespace=b0.join(".");bZ.namespace_re=bZ.namespace?new RegExp("(^|\\.)"+b0.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b2=ca.indexOf(":")<0?"on"+ca:"";if(!b4){e=bG.cache;for(b7 in e){if(e[b7].events&&e[b7].events[ca]){bG.event.trigger(bZ,b6,e[b7].handle.ele
 m,true)}}return}bZ.result=aB;if(!bZ.target){bZ.target=b4}b6=b6!=null?bG.makeArray(b6):[];b6.unshift(bZ);b9=bG.event.special[ca]||{};if(b9.trigger&&b9.trigger.apply(b4,b6)===false){return}b5=[[b4,b9.bindType||ca]];if(!cd&&!b9.noBubble&&!bG.isWindow(b4)){cc=b9.delegateType||ca;cb=by.test(cc+ca)?b4:b4.parentNode;for(b3=b4;cb;cb=cb.parentNode){b5.push([cb,cc]);b3=cb}if(b3===(b4.ownerDocument||o)){b5.push([b3.defaultView||b3.parentWindow||a2,cc])}}for(b7=0;b7<b5.length&&!bZ.isPropagationStopped();b7++){cb=b5[b7][0];bZ.type=b5[b7][1];b8=(bG._data(cb,"events")||{})[bZ.type]&&bG._data(cb,"handle");if(b8){b8.apply(cb,b6)}b8=b2&&cb[b2];if(b8&&bG.acceptData(cb)&&b8.apply(cb,b6)===false){bZ.preventDefault()}}bZ.type=ca;if(!cd&&!bZ.isDefaultPrevented()){if((!b9._default||b9._default.apply(b4.ownerDocument,b6)===false)&&!(ca==="click"&&bG.nodeName(b4,"a"))&&bG.acceptData(b4)){if(b2&&b4[ca]&&((ca!=="focus"&&ca!=="blur")||bZ.target.offsetWidth!==0)&&!bG.isWindow(b4)){b3=b4[b2];if(b3){b4[b2]=null}bG
 .event.triggered=ca;b4[ca]();bG.event.triggered=aB;if(b3){b4[b2]=b3}}}}return bZ.result},dispatch:function(cb){cb=bG.event.fix(cb||a2.event);var cd,ca,b2,b4,ce,cc,b5,b0,e,b9,cf,b7=((bG._data(this,"events")||{})[cb.type]||[]),b6=b7.delegateCount,b1=[].slice.call(arguments),b8=!cb.exclusive&&!cb.namespace,b3=bG.event.special[cb.type]||{},bZ=[];b1[0]=cb;cb.delegateTarget=this;if(b3.preDispatch&&b3.preDispatch.call(this,cb)===false){return}if(b6&&!(cb.button&&cb.type==="click")){b4=bG(this);b4.context=this;for(b2=cb.target;b2!=this;b2=b2.parentNode||this){if(b2.disabled!==true||cb.type!=="click"){cc={};b0=[];b4[0]=b2;for(cd=0;cd<b6;cd++){e=b7[cd];b9=e.selector;if(cc[b9]===aB){cc[b9]=b4.is(b9)}if(cc[b9]){b0.push(e)}}if(b0.length){bZ.push({elem:b2,matches:b0})}}}}if(b7.length>b6){bZ.push({elem:this,matches:b7.slice(b6)})}for(cd=0;cd<bZ.length&&!cb.isPropagationStopped();cd++){b5=bZ[cd];cb.currentTarget=b5.elem;for(ca=0;ca<b5.matches.length&&!cb.isImmediatePropagationStopped();ca++){e=b5.m
 atches[ca];if(b8||(!cb.namespace&&!e.namespace)||cb.namespace_re&&cb.namespace_re.test(e.namespace)){cb.data=e.data;cb.handleObj=e;ce=((bG.event.special[e.origType]||{}).handle||e.handler).apply(b5.elem,b1);if(ce!==aB){cb.result=ce;if(ce===false){cb.preventDefault();cb.stopPropagation()}}}}}if(b3.postDispatch){b3.postDispatch.call(this,cb)}return cb.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bZ,e){if(bZ.which==null){bZ.which=e.charCode!=null?e.charCode:e.keyCode}return bZ}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(b1,b0){var b2,b3,e,bZ=b0.button,b4=b0.fromElement;if(b1.pageX==null&&b0.clientX!=null){b2=b1.target.ownerDocument||o;b3=b2.documentElement;e=b2.bo
 dy;b1.pageX=b0.clientX+(b3&&b3.scrollLeft||e&&e.scrollLeft||0)-(b3&&b3.clientLeft||e&&e.clientLeft||0);b1.pageY=b0.clientY+(b3&&b3.scrollTop||e&&e.scrollTop||0)-(b3&&b3.clientTop||e&&e.clientTop||0)}if(!b1.relatedTarget&&b4){b1.relatedTarget=b4===b1.target?b0.toElement:b4}if(!b1.which&&bZ!==aB){b1.which=(bZ&1?1:(bZ&2?3:(bZ&4?2:0)))}return b1}},fix:function(b0){if(b0[bG.expando]){return b0}var bZ,b3,e=b0,b1=bG.event.fixHooks[b0.type]||{},b2=b1.props?this.props.concat(b1.props):this.props;b0=bG.Event(e);for(bZ=b2.length;bZ;){b3=b2[--bZ];b0[b3]=e[b3]}if(!b0.target){b0.target=e.srcElement||o}if(b0.target.nodeType===3){b0.target=b0.target.parentNode}b0.metaKey=!!b0.metaKey;return b1.filter?b1.filter(b0,e):b0},special:{ready:{setup:bG.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(b0,bZ,e){if(bG.isWindow(this)){this.onbeforeunload=e}},teardown:function(bZ,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}
 ,simulate:function(b0,b2,b1,bZ){var b3=bG.extend(new bG.Event(),b1,{type:b0,isSimulated:true,originalEvent:{}});if(bZ){bG.event.trigger(b3,null,b2)}else{bG.event.dispatch.call(b2,b3)}if(b3.isDefaultPrevented()){b1.preventDefault()}}};bG.event.handle=bG.event.dispatch;bG.removeEvent=o.removeEventListener?function(bZ,e,b0){if(bZ.removeEventListener){bZ.removeEventListener(e,b0,false)}}:function(b0,bZ,b1){var e="on"+bZ;if(b0.detachEvent){if(typeof b0[e]==="undefined"){b0[e]=null}b0.detachEvent(e,b1)}};bG.Event=function(bZ,e){if(!(this instanceof bG.Event)){return new bG.Event(bZ,e)}if(bZ&&bZ.type){this.originalEvent=bZ;this.type=bZ.type;this.isDefaultPrevented=(bZ.defaultPrevented||bZ.returnValue===false||bZ.getPreventDefault&&bZ.getPreventDefault())?R:X}else{this.type=bZ}if(e){bG.extend(this,e)}this.timeStamp=bZ&&bZ.timeStamp||bG.now();this[bG.expando]=true};function X(){return false}function R(){return true}bG.Event.prototype={preventDefault:function(){this.isDefaultPrevented=R;var b
 Z=this.originalEvent;if(!bZ){return}if(bZ.preventDefault){bZ.preventDefault()}else{bZ.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=R;var bZ=this.originalEvent;if(!bZ){return}if(bZ.stopPropagation){bZ.stopPropagation()}bZ.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=R;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};bG.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bZ,e){bG.event.special[bZ]={delegateType:e,bindType:e,handle:function(b3){var b1,b5=this,b4=b3.relatedTarget,b2=b3.handleObj,b0=b2.selector;if(!b4||(b4!==b5&&!bG.contains(b5,b4))){b3.type=b2.origType;b1=b2.handler.apply(this,arguments);b3.type=e}return b1}}});if(!bG.support.submitBubbles){bG.event.special.submit={setup:function(){if(bG.nodeName(this,"form")){return false}bG.event.add(this,"click._submit keypress._submit",function(b1){var b0=b1.target,bZ=bG.nodeName(b0,"input")||bG.nodeN
 ame(b0,"button")?b0.form:aB;if(bZ&&!bG._data(bZ,"_submit_attached")){bG.event.add(bZ,"submit._submit",function(e){e._submit_bubble=true});bG._data(bZ,"_submit_attached",true)}})},postDispatch:function(e){if(e._submit_bubble){delete e._submit_bubble;if(this.parentNode&&!e.isTrigger){bG.event.simulate("submit",this.parentNode,e,true)}}},teardown:function(){if(bG.nodeName(this,"form")){return false}bG.event.remove(this,"._submit")}}}if(!bG.support.changeBubbles){bG.event.special.change={setup:function(){if(bE.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){bG.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});bG.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false}bG.event.simulate("change",this,e,true)})}return false}bG.event.add(this,"beforeactivate._change",function(b0){var bZ=b0.target;if(bE.test(bZ.nodeName)&&!bG._data(bZ,"_change_attach
 ed")){bG.event.add(bZ,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){bG.event.simulate("change",this.parentNode,e,true)}});bG._data(bZ,"_change_attached",true)}})},handle:function(bZ){var e=bZ.target;if(this!==e||bZ.isSimulated||bZ.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bZ.handleObj.handler.apply(this,arguments)}},teardown:function(){bG.event.remove(this,"._change");return bE.test(this.nodeName)}}}if(!bG.support.focusinBubbles){bG.each({focus:"focusin",blur:"focusout"},function(b1,e){var bZ=0,b0=function(b2){bG.event.simulate(e,b2.target,bG.event.fix(b2),true)};bG.event.special[e]={setup:function(){if(bZ++===0){o.addEventListener(b1,b0,true)}},teardown:function(){if(--bZ===0){o.removeEventListener(b1,b0,true)}}}})}bG.fn.extend({on:function(b0,e,b3,b2,bZ){var b4,b1;if(typeof b0==="object"){if(typeof e!=="string"){b3=b3||e;e=aB}for(b1 in b0){this.on(b1,e,b3,b0[b1],bZ)}return this}if(b3==null&&b2==null){b2=e;b3=e=aB}else{if(b2==null){
 if(typeof e==="string"){b2=b3;b3=aB}else{b2=b3;b3=e;e=aB}}}if(b2===false){b2=X}else{if(!b2){return this}}if(bZ===1){b4=b2;b2=function(b5){bG().off(b5);return b4.apply(this,arguments)};b2.guid=b4.guid||(b4.guid=bG.guid++)}return this.each(function(){bG.event.add(this,b0,b2,b3,e)})},one:function(bZ,e,b1,b0){return this.on(bZ,e,b1,b0,1)},off:function(b0,e,b2){var bZ,b1;if(b0&&b0.preventDefault&&b0.handleObj){bZ=b0.handleObj;bG(b0.delegateTarget).off(bZ.namespace?bZ.origType+"."+bZ.namespace:bZ.origType,bZ.selector,bZ.handler);return this}if(typeof b0==="object"){for(b1 in b0){this.off(b1,e,b0[b1])}return this}if(e===false||typeof e==="function"){b2=e;e=aB}if(b2===false){b2=X}return this.each(function(){bG.event.remove(this,b0,b2,e)})},bind:function(e,b0,bZ){return this.on(e,null,b0,bZ)},unbind:function(e,bZ){return this.off(e,null,bZ)},live:function(e,b0,bZ){bG(this.context).on(e,this.selector,b0,bZ);return this},die:function(e,bZ){bG(this.context).off(e,this.selector||"**",bZ);return 
 this},delegate:function(e,bZ,b1,b0){return this.on(bZ,e,b1,b0)},undelegate:function(e,bZ,b0){return arguments.length==1?this.off(e,"**"):this.off(bZ,e||"**",b0)},trigger:function(e,bZ){return this.each(function(){bG.event.trigger(e,bZ,this)})},triggerHandler:function(e,bZ){if(this[0]){return bG.event.trigger(e,bZ,this[0],true)}},toggle:function(b1){var bZ=arguments,e=b1.guid||bG.guid++,b0=0,b2=function(b3){var b4=(bG._data(this,"lastToggle"+b1.guid)||0)%b0;bG._data(this,"lastToggle"+b1.guid,b4+1);b3.preventDefault();return bZ[b4].apply(this,arguments)||false};b2.guid=e;while(b0<bZ.length){bZ[b0++].guid=e}return this.click(b2)},hover:function(e,bZ){return this.mouseenter(e).mouseleave(bZ||e)}});bG.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(bZ,e){bG.fn[e]=function(b1,b0){if(b0==null){b0=b1;b1=null}retu
 rn arguments.length>0?this.on(e,null,b1,b0):this.trigger(e)};if(a3.test(e)){bG.event.fixHooks[e]=bG.event.keyHooks}if(bK.test(e)){bG.event.fixHooks[e]=bG.event.mouseHooks}});
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2012 jQuery Foundation and other contributors
+ *  Released under the MIT license
+ *  http://sizzlejs.com/
+ */
+(function(cO,cg){var cT,co,cf,b2,b8,b6=cO.document,b9=b6.documentElement,cw="undefined",ca=false,b7=true,ce=0,cj=[].slice,cS=[].push,cW=("sizcache"+Math.random()).replace(".",""),cz="[\\x20\\t\\r\\n\\f]",ci="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",ch=ci.replace("w","w#"),c1="([*^$|!~]?=)",cL="\\["+cz+"*("+ci+")"+cz+"*(?:"+c1+cz+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ch+")|)|)"+cz+"*\\]",c2=":("+ci+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",cB=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",cd=cz+"*([\\x20\\t\\r\\n\\f>+~])"+cz+"*",cc="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+cL+"|"+c2.replace(2,7)+"|[^\\\\(),])+",cU=new RegExp("^"+cz+"+|((?:^|[^\\\\])(?:\\\\.)*)"+cz+"+$","g"),cF=new RegExp("^"+cd),ct=new RegExp(cc+"?(?="+cz+"*,|$)","g"),cJ=new RegExp("^(?:(?!,)(?:(?:^|,)"+cz+"*"+cc+")*?|"+cz+"*(.*?))(\\)|$)"),cZ=new RegExp(cc.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+cd,"g"),cK=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,c
 P=/[\x20\t\r\n\f]*[+~]/,cX=/:not\($/,cp=/h\d/i,cM=/input|select|textarea|button/i,cs=/\\(?!\\)/g,cE={ID:new RegExp("^#("+ci+")"),CLASS:new RegExp("^\\.("+ci+")"),NAME:new RegExp("^\\[name=['\"]?("+ci+")['\"]?\\]"),TAG:new RegExp("^("+ci.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+cL),PSEUDO:new RegExp("^"+c2),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+cz+"*(even|odd|(([+-]|)(\\d*)n|)"+cz+"*(?:([+-]|)"+cz+"*(\\d+)|))"+cz+"*\\)|)","i"),POS:new RegExp(cB,"ig"),needsContext:new RegExp("^"+cz+"*[>+~]|"+cB,"i")},cR={},cq=[],cl={},cu=[],cY=function(e){e.sizzleFilter=true;return e},b3=function(e){return function(c3){return c3.nodeName.toLowerCase()==="input"&&c3.type===e}},cr=function(e){return function(c4){var c3=c4.nodeName.toLowerCase();return(c3==="input"||c3==="button")&&c4.type===e}},cH=function(c3){var c4=false,c6=b6.createElement("div");try{c4=c3(c6)}catch(c5){}c6=null;return c4},cn=cH(function(c3){c3.innerHTML="<select></select>";var e=typeof c3.lastChild.getAttribut
 e("multiple");return e!=="boolean"&&e!=="string"}),b0=cH(function(c3){c3.id=cW+0;c3.innerHTML="<a name='"+cW+"'></a><div name='"+cW+"'></div>";b9.insertBefore(c3,b9.firstChild);var e=b6.getElementsByName&&b6.getElementsByName(cW).length===2+b6.getElementsByName(cW+0).length;b8=!b6.getElementById(cW);b9.removeChild(c3);return e}),b5=cH(function(e){e.appendChild(b6.createComment(""));return e.getElementsByTagName("*").length===0}),cD=cH(function(e){e.innerHTML="<a href='#'></a>";return e.firstChild&&typeof e.firstChild.getAttribute!==cw&&e.firstChild.getAttribute("href")==="#"}),cC=cH(function(e){e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return false}e.lastChild.className="e";return e.getElementsByClassName("e").length!==1});var cN=function(c5,e,c7,da){c7=c7||[];e=e||b6;var c8,c3,c9,c4,c6=e.nodeType;if(c6!==1&&c6!==9){return[]}if(!c5||typeof c5!=="string"){return c7}c9=ck(e);if(!c9&&!da)
 {if((c8=cK.exec(c5))){if((c4=c8[1])){if(c6===9){c3=e.getElementById(c4);if(c3&&c3.parentNode){if(c3.id===c4){c7.push(c3);return c7}}else{return c7}}else{if(e.ownerDocument&&(c3=e.ownerDocument.getElementById(c4))&&cA(e,c3)&&c3.id===c4){c7.push(c3);return c7}}}else{if(c8[2]){cS.apply(c7,cj.call(e.getElementsByTagName(c5),0));return c7}else{if((c4=c8[3])&&cC&&e.getElementsByClassName){cS.apply(c7,cj.call(e.getElementsByClassName(c4),0));return c7}}}}}return cV(c5,e,c7,da,c9)};var cG=cN.selectors={cacheLength:50,match:cE,order:["ID","TAG"],attrHandle:{},createPseudo:cY,find:{ID:b8?function(c5,c4,c3){if(typeof c4.getElementById!==cw&&!c3){var e=c4.getElementById(c5);return e&&e.parentNode?[e]:[]}}:function(c5,c4,c3){if(typeof c4.getElementById!==cw&&!c3){var e=c4.getElementById(c5);return e?e.id===c5||typeof e.getAttributeNode!==cw&&e.getAttributeNode("id").value===c5?[e]:cg:[]}},TAG:b5?function(e,c3){if(typeof c3.getElementsByTagName!==cw){return c3.getElementsByTagName(e)}}:function(e
 ,c6){var c5=c6.getElementsByTagName(e);if(e==="*"){var c7,c4=[],c3=0;for(;(c7=c5[c3]);c3++){if(c7.nodeType===1){c4.push(c7)}}return c4}return c5}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(cs,"");e[3]=(e[4]||e[5]||"").replace(cs,"");if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1]==="nth"){if(!e[2]){cN.error(e[0])}e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd"));e[4]=+((e[6]+e[7])||e[2]==="odd")}else{if(e[2]){cN.error(e[0])}}return e},PSEUDO:function(e){var c3,c4=e[4];if(cE.CHILD.test(e[0])){return null}if(c4&&(c3=cJ.exec(c4))&&c3.pop()){e[0]=e[0].slice(0,c3[0].length-c4.length-1);c4=c3[0].slice(0,-1)}e.splice(2,3,c4||e[3]);return e}},filter:{ID:b8?function(e){e=e.replace(cs,"");return function(c3){return c3.getAttribute("id")===e}}:function(e){e=e.replace(cs,"");return function(c
 4){var c3=typeof c4.getAttributeNode!==cw&&c4.getAttributeNode("id");return c3&&c3.value===e}},TAG:function(e){if(e==="*"){return function(){return true}}e=e.replace(cs,"").toLowerCase();return function(c3){return c3.nodeName&&c3.nodeName.toLowerCase()===e}},CLASS:function(e){var c3=cR[e];if(!c3){c3=cR[e]=new RegExp("(^|"+cz+")"+e+"("+cz+"|$)");cq.push(e);if(cq.length>cG.cacheLength){delete cR[cq.shift()]}}return function(c4){return c3.test(c4.className||(typeof c4.getAttribute!==cw&&c4.getAttribute("class"))||"")}},ATTR:function(c4,c3,e){if(!c3){return function(c5){return cN.attr(c5,c4)!=null}}return function(c6){var c5=cN.attr(c6,c4),c7=c5+"";if(c5==null){return c3==="!="}switch(c3){case"=":return c7===e;case"!=":return c7!==e;case"^=":return e&&c7.indexOf(e)===0;case"*=":return e&&c7.indexOf(e)>-1;case"$=":return e&&c7.substr(c7.length-e.length)===e;case"~=":return(" "+c7+" ").indexOf(e)>-1;case"|=":return c7===e||c7.substr(0,e.length+1)===e+"-"}}},CHILD:function(c3,c5,c6,c4){if(
 c3==="nth"){var e=ce++;return function(da){var c7,db,c9=0,c8=da;if(c6===1&&c4===0){return true}c7=da.parentNode;if(c7&&(c7[cW]!==e||!da.sizset)){for(c8=c7.firstChild;c8;c8=c8.nextSibling){if(c8.nodeType===1){c8.sizset=++c9;if(c8===da){break}}}c7[cW]=e}db=da.sizset-c4;if(c6===0){return db===0}else{return(db%c6===0&&db/c6>=0)}}}return function(c8){var c7=c8;switch(c3){case"only":case"first":while((c7=c7.previousSibling)){if(c7.nodeType===1){return false}}if(c3==="first"){return true}c7=c8;case"last":while((c7=c7.nextSibling)){if(c7.nodeType===1){return false}}return true}}},PSEUDO:function(c6,c5,c3,e){var c4=cG.pseudos[c6]||cG.pseudos[c6.toLowerCase()];if(!c4){cN.error("unsupported pseudo: "+c6)}if(!c4.sizzleFilter){return c4}return c4(c5,c3,e)}},pseudos:{not:cY(function(e,c4,c3){var c5=cb(e.replace(cU,"$1"),c4,c3);return function(c6){return !c5(c6)}}),enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var c3=e.nodeName.to
 LowerCase();return(c3==="input"&&!!e.checked)||(c3==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !cG.pseudos.empty(e)},empty:function(c3){var e;c3=c3.firstChild;while(c3){if(c3.nodeName>"@"||(e=c3.nodeType)===3||e===4){return false}c3=c3.nextSibling}return true},contains:cY(function(e){return function(c3){return(c3.textContent||c3.innerText||bZ(c3)).indexOf(e)>-1}}),has:cY(function(e){return function(c3){return cN(e,c3).length>0}}),header:function(e){return cp.test(e.nodeName)},text:function(c4){var c3,e;return c4.nodeName.toLowerCase()==="input"&&(c3=c4.type)==="text"&&((e=c4.getAttribute("type"))==null||e.toLowerCase()===c3)},radio:b3("radio"),checkbox:b3("checkbox"),file:b3("file"),password:b3("password"),image:b3("image"),submit:cr("submit"),reset:cr("reset"),button:function(c3){var e=c3.nodeName.toLowerCase();return e==="input"&&c3.type==="button"||e==="button"},input:function(e){r
 eturn cM.test(e.nodeName)},focus:function(e){var c3=e.ownerDocument;return e===c3.activeElement&&(!c3.hasFocus||c3.hasFocus())&&!!(e.type||e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(c4,c3,e){return e?c4.slice(1):[c4[0]]},last:function(c5,c4,c3){var e=c5.pop();return c3?c5:[e]},even:function(c7,c6,c5){var c4=[],c3=c5?1:0,e=c7.length;for(;c3<e;c3=c3+2){c4.push(c7[c3])}return c4},odd:function(c7,c6,c5){var c4=[],c3=c5?0:1,e=c7.length;for(;c3<e;c3=c3+2){c4.push(c7[c3])}return c4},lt:function(c4,c3,e){return e?c4.slice(+c3):c4.slice(0,+c3)},gt:function(c4,c3,e){return e?c4.slice(0,+c3+1):c4.slice(+c3+1)},eq:function(c5,c4,c3){var e=c5.splice(+c4,1);return c3?c5:e}}};cG.setFilters.nth=cG.setFilters.eq;cG.filters=cG.pseudos;if(!cD){cG.attrHandle={href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}}}if(b0){cG.order.push("NAME");cG.find.NAME=function(e,c3){if(typeof c3.getElementsByName!==cw)
 {return c3.getElementsByName(e)}}}if(cC){cG.order.splice(1,0,"CLASS");cG.find.CLASS=function(c4,c3,e){if(typeof c3.getElementsByClassName!==cw&&!e){return c3.getElementsByClassName(c4)}}}try{cj.call(b9.childNodes,0)[0].nodeType}catch(c0){cj=function(c3){var c4,e=[];for(;(c4=this[c3]);c3++){e.push(c4)}return e}}var ck=cN.isXML=function(e){var c3=e&&(e.ownerDocument||e).documentElement;return c3?c3.nodeName!=="HTML":false};var cA=cN.contains=b9.compareDocumentPosition?function(c3,e){return !!(c3.compareDocumentPosition(e)&16)}:b9.contains?function(c3,e){var c5=c3.nodeType===9?c3.documentElement:c3,c4=e.parentNode;return c3===c4||!!(c4&&c4.nodeType===1&&c5.contains&&c5.contains(c4))}:function(c3,e){while((e=e.parentNode)){if(e===c3){return true}}return false};var bZ=cN.getText=function(c6){var c5,c3="",c4=0,e=c6.nodeType;if(e){if(e===1||e===9||e===11){if(typeof c6.textContent==="string"){return c6.textContent}else{for(c6=c6.firstChild;c6;c6=c6.nextSibling){c3+=bZ(c6)}}}else{if(e===3||e
 ===4){return c6.nodeValue}}}else{for(;(c5=c6[c4]);c4++){c3+=bZ(c5)}}return c3};cN.attr=function(c5,c4){var e,c3=ck(c5);if(!c3){c4=c4.toLowerCase()}if(cG.attrHandle[c4]){return cG.attrHandle[c4](c5)}if(cn||c3){return c5.getAttribute(c4)}e=c5.getAttributeNode(c4);return e?typeof c5[c4]==="boolean"?c5[c4]?c4:null:e.specified?e.value:null:null};cN.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};[0,0].sort(function(){return(b7=0)});if(b9.compareDocumentPosition){cf=function(c3,e){if(c3===e){ca=true;return 0}return(!c3.compareDocumentPosition||!e.compareDocumentPosition?c3.compareDocumentPosition:c3.compareDocumentPosition(e)&4)?-1:1}}else{cf=function(da,c9){if(da===c9){ca=true;return 0}else{if(da.sourceIndex&&c9.sourceIndex){return da.sourceIndex-c9.sourceIndex}}var c7,c3,c4=[],e=[],c6=da.parentNode,c8=c9.parentNode,db=c6;if(c6===c8){return b2(da,c9)}else{if(!c6){return -1}else{if(!c8){return 1}}}while(db){c4.unshift(db);db=db.parentNode}db=c8;while(db){e.
 unshift(db);db=db.parentNode}c7=c4.length;c3=e.length;for(var c5=0;c5<c7&&c5<c3;c5++){if(c4[c5]!==e[c5]){return b2(c4[c5],e[c5])}}return c5===c7?b2(da,e[c5],-1):b2(c4[c5],c9,1)};b2=function(c3,e,c4){if(c3===e){return c4}var c5=c3.nextSibling;while(c5){if(c5===e){return -1}c5=c5.nextSibling}return 1}}cN.uniqueSort=function(c3){var c4,e=1;if(cf){ca=b7;c3.sort(cf);if(ca){for(;(c4=c3[e]);e++){if(c4===c3[e-1]){c3.splice(e--,1)}}}}return c3};function cm(c3,c7,c6,c4){var c5=0,e=c7.length;for(;c5<e;c5++){cN(c3,c7[c5],c6,c4)}}function cI(e,c4,c8,c9,c3,c7){var c5,c6=cG.setFilters[c4.toLowerCase()];if(!c6){cN.error(c4)}if(e||!(c5=c3)){cm(e||"*",c9,(c5=[]),c3)}return c5.length>0?c6(c5,c8,c7):[]}function cQ(dc,e,da,c4,dg){var c7,c3,c6,di,c9,dh,db,df,dd=0,de=dg.length,c5=cE.POS,c8=new RegExp("^"+c5.source+"(?!"+cz+")","i"),dj=function(){var dl=1,dk=arguments.length-2;for(;dl<dk;dl++){if(arguments[dl]===cg){c7[dl]=cg}}};for(;dd<de;dd++){c5.exec("");dc=dg[dd];di=[];c6=0;c9=c4;while((c7=c5.exec(dc))
 ){df=c5.lastIndex=c7.index+c7[0].length;if(df>c6){db=dc.slice(c6,c7.index);c6=df;dh=[e];if(cF.test(db)){if(c9){dh=c9}c9=c4}if((c3=cX.test(db))){db=db.slice(0,-5).replace(cF,"$&*")}if(c7.length>1){c7[0].replace(c8,dj)}c9=cI(db,c7[1],c7[2],dh,c9,c3)}}if(c9){di=di.concat(c9);if((db=dc.slice(c6))&&db!==")"){if(cF.test(db)){cm(db,di,da,c4)}else{cN(db,e,da,c4?c4.concat(c9):c9)}}else{cS.apply(da,di)}}else{cN(dc,e,da,c4)}}return de===1?da:cN.uniqueSort(da)}function b1(c8,c4,db){var dd,dc,de,c6=[],c9=0,da=cJ.exec(c8),c3=!da.pop()&&!da.pop(),df=c3&&c8.match(ct)||[""],e=cG.preFilter,c5=cG.filter,c7=!db&&c4!==b6;for(;(dc=df[c9])!=null&&c3;c9++){c6.push(dd=[]);if(c7){dc=" "+dc}while(dc){c3=false;if((da=cF.exec(dc))){dc=dc.slice(da[0].length);c3=dd.push({part:da.pop().replace(cU," "),captures:da})}for(de in c5){if((da=cE[de].exec(dc))&&(!e[de]||(da=e[de](da,c4,db)))){dc=dc.slice(da.shift().length);c3=dd.push({part:de,captures:da})}}if(!c3){break}}}if(!c3){cN.error(c8)}return c6}function cx(c6,c5,
 c4){var e=c5.dir,c3=ce++;if(!c6){c6=function(c7){return c7===c4}}return c5.first?function(c8,c7){while((c8=c8[e])){if(c8.nodeType===1){return c6(c8,c7)&&c8}}}:function(c9,c8){var c7,da=c3+"."+co,db=da+"."+cT;while((c9=c9[e])){if(c9.nodeType===1){if((c7=c9[cW])===db){return c9.sizset}else{if(typeof c7==="string"&&c7.indexOf(da)===0){if(c9.sizset){return c9}}else{c9[cW]=db;if(c6(c9,c8)){c9.sizset=true;return c9}c9.sizset=false}}}}}}function cv(e,c3){return e?function(c6,c5){var c4=c3(c6,c5);return c4&&e(c4===true?c6:c4,c5)}:c3}function cy(c7,c5,e){var c4,c6,c3=0;for(;(c4=c7[c3]);c3++){if(cG.relative[c4.part]){c6=cx(c6,cG.relative[c4.part],c5)}else{c4.captures.push(c5,e);c6=cv(c6,cG.filter[c4.part].apply(null,c4.captures))}}return c6}function b4(e){return function(c5,c4){var c6,c3=0;for(;(c6=e[c3]);c3++){if(c6(c5,c4)){return true}}return false}}var cb=cN.compile=function(e,c5,c3){var c8,c7,c4,c6=cl[e];if(c6&&c6.context===c5){return c6}c7=b1(e,c5,c3);for(c4=0;(c8=c7[c4]);c4++){c7[c4]=cy
 (c8,c5,c3)}c6=cl[e]=b4(c7);c6.context=c5;c6.runs=c6.dirruns=0;cu.push(e);if(cu.length>cG.cacheLength){delete cl[cu.shift()]}return c6};cN.matches=function(c3,e){return cN(c3,null,null,e)};cN.matchesSelector=function(e,c3){return cN(c3,null,null,[e]).length>0};var cV=function(c6,c3,c8,dc,db){c6=c6.replace(cU,"$1");var e,dd,c9,de,c4,c5,dg,dh,c7,da=c6.match(ct),df=c6.match(cZ),di=c3.nodeType;if(cE.POS.test(c6)){return cQ(c6,c3,c8,dc,da)}if(dc){e=cj.call(dc,0)}else{if(da&&da.length===1){if(df.length>1&&di===9&&!db&&(da=cE.ID.exec(df[0]))){c3=cG.find.ID(da[1],c3,db)[0];if(!c3){return c8}c6=c6.slice(df.shift().length)}dh=((da=cP.exec(df[0]))&&!da.index&&c3.parentNode)||c3;c7=df.pop();c5=c7.split(":not")[0];for(c9=0,de=cG.order.length;c9<de;c9++){dg=cG.order[c9];if((da=cE[dg].exec(c5))){e=cG.find[dg]((da[1]||"").replace(cs,""),dh,db);if(e==null){continue}if(c5===c7){c6=c6.slice(0,c6.length-c7.length)+c5.replace(cE[dg],"");if(!c6){cS.apply(c8,cj.call(e,0))}}break}}}}if(c6){dd=cb(c6,c3,db);c
 o=dd.dirruns++;if(e==null){e=cG.find.TAG("*",(cP.test(c6)&&c3.parentNode)||c3)}for(c9=0;(c4=e[c9]);c9++){cT=dd.runs++;if(dd(c4,c3)){c8.push(c4)}}}return c8};if(b6.querySelectorAll){(function(){var c7,c8=cV,c6=/'|\\/g,c4=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,c3=[],e=[":active"],c5=b9.matchesSelector||b9.mozMatchesSelector||b9.webkitMatchesSelector||b9.oMatchesSelector||b9.msMatchesSelector;cH(function(c9){c9.innerHTML="<select><option selected></option></select>";if(!c9.querySelectorAll("[selected]").length){c3.push("\\["+cz+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!c9.querySelectorAll(":checked").length){c3.push(":checked")}});cH(function(c9){c9.innerHTML="<p test=''></p>";if(c9.querySelectorAll("[test^='']").length){c3.push("[*^$]="+cz+"*(?:\"\"|'')")}c9.innerHTML="<input type='hidden'>";if(!c9.querySelectorAll(":enabled").length){c3.push(":enabled",":disabled")}});c3=c3.length&&new RegExp(c3.join("|"));cV=function(de,da,df,dh,dg){if(!dh&&!dg&&(!
 c3||!c3.test(de))){if(da.nodeType===9){try{cS.apply(df,cj.call(da.querySelectorAll(de),0));return df}catch(dd){}}else{if(da.nodeType===1&&da.nodeName.toLowerCase()!=="object"){var dc=da.getAttribute("id"),c9=dc||cW,db=cP.test(de)&&da.parentNode||da;if(dc){c9=c9.replace(c6,"\\$&")}else{da.setAttribute("id",c9)}try{cS.apply(df,cj.call(db.querySelectorAll(de.replace(ct,"[id='"+c9+"'] $&")),0));return df}catch(dd){}finally{if(!dc){da.removeAttribute("id")}}}}}return c8(de,da,df,dh,dg)};if(c5){cH(function(da){c7=c5.call(da,"div");try{c5.call(da,"[test!='']:sizzle");e.push(cG.match.PSEUDO)}catch(c9){}});e=new RegExp(e.join("|"));cN.matchesSelector=function(da,dc){dc=dc.replace(c4,"='$1']");if(!ck(da)&&!e.test(dc)&&(!c3||!c3.test(dc))){try{var c9=c5.call(da,dc);if(c9||c7||da.document&&da.document.nodeType!==11){return c9}}catch(db){}}return cN(dc,null,null,[da]).length>0}}})()}cN.attr=bG.attr;bG.find=cN;bG.expr=cN.selectors;bG.expr[":"]=bG.expr.pseudos;bG.unique=cN.uniqueSort;bG.text=cN.ge
 tText;bG.isXMLDoc=cN.isXML;bG.contains=cN.contains})(a2);var ag=/Until$/,bq=/^(?:parents|prev(?:Until|All))/,al=/^.[^:#\[\.,]*$/,z=bG.expr.match.needsContext,bu={children:true,contents:true,next:true,prev:true};bG.fn.extend({find:function(e){var b2,bZ,b4,b5,b3,b1,b0=this;if(typeof e!=="string"){return bG(e).filter(function(){for(b2=0,bZ=b0.length;b2<bZ;b2++){if(bG.contains(b0[b2],this)){return true}}})}b1=this.pushStack("","find",e);for(b2=0,bZ=this.length;b2<bZ;b2++){b4=b1.length;bG.find(e,this[b2],b1);if(b2>0){for(b5=b4;b5<b1.length;b5++){for(b3=0;b3<b4;b3++){if(b1[b3]===b1[b5]){b1.splice(b5--,1);break}}}}}return b1},has:function(b1){var b0,bZ=bG(b1,this),e=bZ.length;return this.filter(function(){for(b0=0;b0<e;b0++){if(bG.contains(this,bZ[b0])){return true}}})},not:function(e){return this.pushStack(aM(this,e,false),"not",e)},filter:function(e){return this.pushStack(aM(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?z.test(e)?bG(e,this.context).index(this[
 0])>=0:bG.filter(e,this).length>0:this.filter(e).length>0)},closest:function(b2,b1){var b3,b0=0,e=this.length,bZ=[],b4=z.test(b2)||typeof b2!=="string"?bG(b2,b1||this.context):0;for(;b0<e;b0++){b3=this[b0];while(b3&&b3.ownerDocument&&b3!==b1&&b3.nodeType!==11){if(b4?b4.index(b3)>-1:bG.find.matchesSelector(b3,b2)){bZ.push(b3);break}b3=b3.parentNode}}bZ=bZ.length>1?bG.unique(bZ):bZ;return this.pushStack(bZ,"closest",b2)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return bG.inArray(this[0],bG(e))}return bG.inArray(e.jquery?e[0]:e,this)},add:function(e,bZ){var b1=typeof e==="string"?bG(e,bZ):bG.makeArray(e&&e.nodeType?[e]:e),b0=bG.merge(this.get(),b1);return this.pushStack(aR(b1[0])||aR(b0[0])?b0:bG.unique(b0))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});bG.fn.andSelf=bG.fn.addBack;function aR(e){return !e||!e.parentNode||e.parentNode.nodeType===11}function aY(bZ,e){do{bZ=bZ
 [e]}while(bZ&&bZ.nodeType!==1);return bZ}bG.each({parent:function(bZ){var e=bZ.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bG.dir(e,"parentNode")},parentsUntil:function(bZ,e,b0){return bG.dir(bZ,"parentNode",b0)},next:function(e){return aY(e,"nextSibling")},prev:function(e){return aY(e,"previousSibling")},nextAll:function(e){return bG.dir(e,"nextSibling")},prevAll:function(e){return bG.dir(e,"previousSibling")},nextUntil:function(bZ,e,b0){return bG.dir(bZ,"nextSibling",b0)},prevUntil:function(bZ,e,b0){return bG.dir(bZ,"previousSibling",b0)},siblings:function(e){return bG.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bG.sibling(e.firstChild)},contents:function(e){return bG.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bG.merge([],e.childNodes)}},function(e,bZ){bG.fn[e]=function(b2,b0){var b1=bG.map(this,bZ,b2);if(!ag.test(e)){b0=b2}if(b0&&typeof b0==="string"){b1=bG.filter(b0,b1)}b1=this.length>1&&!bu[e]?bG.unique
 (b1):b1;if(this.length>1&&bq.test(e)){b1=b1.reverse()}return this.pushStack(b1,e,a4.call(arguments).join(","))}});bG.extend({filter:function(b0,e,bZ){if(bZ){b0=":not("+b0+")"}return e.length===1?bG.find.matchesSelector(e[0],b0)?[e[0]]:[]:bG.find.matches(b0,e)},dir:function(b0,bZ,b2){var e=[],b1=b0[bZ];while(b1&&b1.nodeType!==9&&(b2===aB||b1.nodeType!==1||!bG(b1).is(b2))){if(b1.nodeType===1){e.push(b1)}b1=b1[bZ]}return e},sibling:function(b0,bZ){var e=[];for(;b0;b0=b0.nextSibling){if(b0.nodeType===1&&b0!==bZ){e.push(b0)}}return e}});function aM(b1,b0,e){b0=b0||0;if(bG.isFunction(b0)){return bG.grep(b1,function(b3,b2){var b4=!!b0.call(b3,b2,b3);return b4===e})}else{if(b0.nodeType){return bG.grep(b1,function(b3,b2){return(b3===b0)===e})}else{if(typeof b0==="string"){var bZ=bG.grep(b1,function(b2){return b2.nodeType===1});if(al.test(b0)){return bG.filter(b0,bZ,!e)}else{b0=bG.filter(b0,bZ)}}}}return bG.grep(b1,function(b3,b2){return(bG.inArray(b3,b0)>=0)===e})}function B(e){var b0=c.spli
 t("|"),bZ=e.createDocumentFragment();if(bZ.createElement){while(b0.length){bZ.createElement(b0.pop())}}return bZ}var c="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",av=/ jQuery\d+="(?:null|\d+)"/g,bY=/^\s+/,ay=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,p=/<([\w:]+)/,bT=/<tbody/i,J=/<|&#?\w+;/,aj=/<(?:script|style|link)/i,ap=/<(?:script|object|embed|option|style)/i,K=new RegExp("<(?:"+c+")[\\s/>]","i"),aE=/^(?:checkbox|radio)$/,bR=/checked\s*(?:[^=]|=\s*.checked.)/i,bw=/\/(java|ecma)script/i,aH=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,T={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_
 default:[0,"",""]},aQ=B(o),l=aQ.appendChild(o.createElement("div"));T.optgroup=T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;if(!bG.support.htmlSerialize){T._default=[1,"X<div>","</div>"]}bG.fn.extend({text:function(e){return bG.access(this,function(bZ){return bZ===aB?bG.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(bZ))},null,e,arguments.length)},wrapAll:function(e){if(bG.isFunction(e)){return this.each(function(b0){bG(this).wrapAll(e.call(this,b0))})}if(this[0]){var bZ=bG(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bZ.insertBefore(this[0])}bZ.map(function(){var b0=this;while(b0.firstChild&&b0.firstChild.nodeType===1){b0=b0.firstChild}return b0}).append(this)}return this},wrapInner:function(e){if(bG.isFunction(e)){return this.each(function(bZ){bG(this).wrapInner(e.call(this,bZ))})}return this.each(function(){var bZ=bG(this),b0=bZ.contents();if(b0.length){b0.wrapAll(e)}else{bZ.append(e)}})},wrap:function(e){
 var bZ=bG.isFunction(e);return this.each(function(b0){bG(this).wrapAll(bZ?e.call(this,b0):e)})},unwrap:function(){return this.parent().each(function(){if(!bG.nodeName(this,"body")){bG(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11){this.insertBefore(e,this.firstChild)}})},before:function(){if(!aR(this[0])){return this.domManip(arguments,false,function(bZ){this.parentNode.insertBefore(bZ,this)})}if(arguments.length){var e=bG.clean(arguments);return this.pushStack(bG.merge(e,this),"before",this.selector)}},after:function(){if(!aR(this[0])){return this.domManip(arguments,false,function(bZ){this.parentNode.insertBefore(bZ,this.nextSibling)})}if(arguments.length){var e=bG.clean(arguments);return this.pushStack(bG.merge(this,e),"after",this.selector)}},re
 move:function(e,b1){var b0,bZ=0;for(;(b0=this[bZ])!=null;bZ++){if(!e||bG.filter(e,[b0]).length){if(!b1&&b0.nodeType===1){bG.cleanData(b0.getElementsByTagName("*"));bG.cleanData([b0])}if(b0.parentNode){b0.parentNode.removeChild(b0)}}}return this},empty:function(){var bZ,e=0;for(;(bZ=this[e])!=null;e++){if(bZ.nodeType===1){bG.cleanData(bZ.getElementsByTagName("*"))}while(bZ.firstChild){bZ.removeChild(bZ.firstChild)}}return this},clone:function(bZ,e){bZ=bZ==null?false:bZ;e=e==null?bZ:e;return this.map(function(){return bG.clone(this,bZ,e)})},html:function(e){return bG.access(this,function(b2){var b1=this[0]||{},b0=0,bZ=this.length;if(b2===aB){return b1.nodeType===1?b1.innerHTML.replace(av,""):aB}if(typeof b2==="string"&&!aj.test(b2)&&(bG.support.htmlSerialize||!K.test(b2))&&(bG.support.leadingWhitespace||!bY.test(b2))&&!T[(p.exec(b2)||["",""])[1].toLowerCase()]){b2=b2.replace(ay,"<$1></$2>");try{for(;b0<bZ;b0++){b1=this[b0]||{};if(b1.nodeType===1){bG.cleanData(b1.getElementsByTagName("
 *"));b1.innerHTML=b2}}b1=0}catch(b3){}}if(b1){this.empty().append(b2)}},null,e,arguments.length)},replaceWith:function(e){if(!aR(this[0])){if(bG.isFunction(e)){return this.each(function(b1){var b0=bG(this),bZ=b0.html();b0.replaceWith(e.call(this,b1,bZ))})}if(typeof e!=="string"){e=bG(e).detach()}return this.each(function(){var b0=this.nextSibling,bZ=this.parentNode;bG(this).remove();if(b0){bG(b0).before(e)}else{bG(bZ).append(e)}})}return this.length?this.pushStack(bG(bG.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,true)},domManip:function(b4,b8,b7){b4=[].concat.apply([],b4);var b0,b2,b3,b6,b1=0,b5=b4[0],bZ=[],e=this.length;if(!bG.support.checkClone&&e>1&&typeof b5==="string"&&bR.test(b5)){return this.each(function(){bG(this).domManip(b4,b8,b7)})}if(bG.isFunction(b5)){return this.each(function(ca){var b9=bG(this);b4[0]=b5.call(this,ca,b8?b9.html():aB);b9.domManip(b4,b8,b7)})}if(this[0]){b0=bG.buildFragment(b4,this,bZ);b3=b0.fragment;b2=b3.firstC
 hild;if(b3.childNodes.length===1){b3=b2}if(b2){b8=b8&&bG.nodeName(b2,"tr");for(b6=b0.cacheable||e-1;b1<e;b1++){b7.call(b8&&bG.nodeName(this[b1],"table")?y(this[b1],"tbody"):this[b1],b1===b6?b3:bG.clone(b3,true,true))}}b3=b2=null;if(bZ.length){bG.each(bZ,function(b9,ca){if(ca.src){if(bG.ajax){bG.ajax({url:ca.src,type:"GET",dataType:"script",async:false,global:false,"throws":true})}else{bG.error("no ajax")}}else{bG.globalEval((ca.text||ca.textContent||ca.innerHTML||"").replace(aH,""))}if(ca.parentNode){ca.parentNode.removeChild(ca)}})}}return this}});function y(bZ,e){return bZ.getElementsByTagName(e)[0]||bZ.appendChild(bZ.ownerDocument.createElement(e))}function ao(b5,bZ){if(bZ.nodeType!==1||!bG.hasData(b5)){return}var b2,b1,e,b4=bG._data(b5),b3=bG._data(bZ,b4),b0=b4.events;if(b0){delete b3.handle;b3.events={};for(b2 in b0){for(b1=0,e=b0[b2].length;b1<e;b1++){bG.event.add(bZ,b2,b0[b2][b1])}}}if(b3.data){b3.data=bG.extend({},b3.data)}}function G(bZ,e){var b0;if(e.nodeType!==1){return}i
 f(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bZ)}b0=e.nodeName.toLowerCase();if(b0==="object"){if(e.parentNode){e.outerHTML=bZ.outerHTML}if(bG.support.html5Clone&&(bZ.innerHTML&&!bG.trim(e.innerHTML))){e.innerHTML=bZ.innerHTML}}else{if(b0==="input"&&aE.test(bZ.type)){e.defaultChecked=e.checked=bZ.checked;if(e.value!==bZ.value){e.value=bZ.value}}else{if(b0==="option"){e.selected=bZ.defaultSelected}else{if(b0==="input"||b0==="textarea"){e.defaultValue=bZ.defaultValue}else{if(b0==="script"&&e.text!==bZ.text){e.text=bZ.text}}}}}e.removeAttribute(bG.expando)}bG.buildFragment=function(b1,b2,bZ){var b0,e,b3,b4=b1[0];b2=b2||o;b2=(b2[0]||b2).ownerDocument||b2[0]||b2;if(typeof b2.createDocumentFragment==="undefined"){b2=o}if(b1.length===1&&typeof b4==="string"&&b4.length<512&&b2===o&&b4.charAt(0)==="<"&&!ap.test(b4)&&(bG.support.checkClone||!bR.test(b4))&&(bG.support.html5Clone||!K.test(b4))){e=true;b0=bG.fragments[b4];b3=b0!==aB}if(!b0){b0=b2.createDocumen
 tFragment();bG.clean(b1,b2,b0,bZ);if(e){bG.fragments[b4]=b3&&b0}}return{fragment:b0,cacheable:e}};bG.fragments={};bG.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bZ){bG.fn[e]=function(b0){var b2,b4=0,b3=[],b6=bG(b0),b1=b6.length,b5=this.length===1&&this[0].parentNode;if((b5==null||b5&&b5.nodeType===11&&b5.childNodes.length===1)&&b1===1){b6[bZ](this[0]);return this}else{for(;b4<b1;b4++){b2=(b4>0?this.clone(true):this).get();bG(b6[b4])[bZ](b2);b3=b3.concat(b2)}return this.pushStack(b3,e,b6.selector)}}});function m(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function bS(e){if(aE.test(e.type)){e.defaultChecked=e.checked}}bG.extend({clone:function(b2,b4,b0){var e,bZ,b1,b3;if(bG.support.html5Clone||bG.isXMLDoc(b2)||!K.test("<"+b2.nodeName+">")){b3=b2.cloneNode(true)}else{l.inn
 erHTML=b2.outerHTML;l.removeChild(b3=l.firstChild)}if((!bG.support.noCloneEvent||!bG.support.noCloneChecked)&&(b2.nodeType===1||b2.nodeType===11)&&!bG.isXMLDoc(b2)){G(b2,b3);e=m(b2);bZ=m(b3);for(b1=0;e[b1];++b1){if(bZ[b1]){G(e[b1],bZ[b1])}}}if(b4){ao(b2,b3);if(b0){e=m(b2);bZ=m(b3);for(b1=0;e[b1];++b1){ao(e[b1],bZ[b1])}}}e=bZ=null;return b3},clean:function(cb,b0,e,b1){var b7,b3,ca,cf,b4,ce,b5,b2,bZ,b9,cd,b6,b8=0,cc=[];if(!b0||typeof b0.createDocumentFragment==="undefined"){b0=o}for(b3=b0===o&&aQ;(ca=cb[b8])!=null;b8++){if(typeof ca==="number"){ca+=""}if(!ca){continue}if(typeof ca==="string"){if(!J.test(ca)){ca=b0.createTextNode(ca)}else{b3=b3||B(b0);b5=b5||b3.appendChild(b0.createElement("div"));ca=ca.replace(ay,"<$1></$2>");cf=(p.exec(ca)||["",""])[1].toLowerCase();b4=T[cf]||T._default;ce=b4[0];b5.innerHTML=b4[1]+ca+b4[2];while(ce--){b5=b5.lastChild}if(!bG.support.tbody){b2=bT.test(ca);bZ=cf==="table"&&!b2?b5.firstChild&&b5.firstChild.childNodes:b4[1]==="<table>"&&!b2?b5.childNodes:
 [];for(b7=bZ.length-1;b7>=0;--b7){if(bG.nodeName(bZ[b7],"tbody")&&!bZ[b7].childNodes.length){bZ[b7].parentNode.removeChild(bZ[b7])}}}if(!bG.support.leadingWhitespace&&bY.test(ca)){b5.insertBefore(b0.createTextNode(bY.exec(ca)[0]),b5.firstChild)}ca=b5.childNodes;b5=b3.lastChild}}if(ca.nodeType){cc.push(ca)}else{cc=bG.merge(cc,ca)}}if(b5){b3.removeChild(b5);ca=b5=b3=null}if(!bG.support.appendChecked){for(b8=0;(ca=cc[b8])!=null;b8++){if(bG.nodeName(ca,"input")){bS(ca)}else{if(typeof ca.getElementsByTagName!=="undefined"){bG.grep(ca.getElementsByTagName("input"),bS)}}}}if(e){cd=function(cg){if(!cg.type||bw.test(cg.type)){return b1?b1.push(cg.parentNode?cg.parentNode.removeChild(cg):cg):e.appendChild(cg)}};for(b8=0;(ca=cc[b8])!=null;b8++){if(!(bG.nodeName(ca,"script")&&cd(ca))){e.appendChild(ca);if(typeof ca.getElementsByTagName!=="undefined"){b6=bG.grep(bG.merge([],ca.getElementsByTagName("script")),cd);cc.splice.apply(cc,[b8+1,0].concat(b6));b8+=b6.length}}}}return cc},cleanData:functi
 on(bZ,b7){var b2,b0,b1,b6,b3=0,b8=bG.expando,e=bG.cache,b4=bG.support.deleteExpando,b5=bG.event.special;for(;(b1=bZ[b3])!=null;b3++){if(b7||bG.acceptData(b1)){b0=b1[b8];b2=b0&&e[b0];if(b2){if(b2.events){for(b6 in b2.events){if(b5[b6]){bG.event.remove(b1,b6)}else{bG.removeEvent(b1,b6,b2.handle)}}}if(e[b0]){delete e[b0];if(b4){delete b1[b8]}else{if(b1.removeAttribute){b1.removeAttribute(b8)}else{b1[b8]=null}}bG.deletedIds.push(b0)}}}}}});(function(){var e,bZ;bG.uaMatch=function(b1){b1=b1.toLowerCase();var b0=/(chrome)[ \/]([\w.]+)/.exec(b1)||/(webkit)[ \/]([\w.]+)/.exec(b1)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b1)||/(msie) ([\w.]+)/.exec(b1)||b1.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}};e=bG.uaMatch(d.userAgent);bZ={};if(e.browser){bZ[e.browser]=true;bZ.version=e.version}if(bZ.webkit){bZ.safari=true}bG.browser=bZ;bG.sub=function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bG.extend(true,b0,this);b0.s
 uperclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bG&&!(b4 instanceof b0)){b4=b0(b4)}return bG.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(o);return b0}})();var F,az,aW,be=/alpha\([^)]*\)/i,aS=/opacity=([^)]*)/,bk=/^(top|right|bottom|left)$/,aZ=/^margin/,a8=new RegExp("^("+bx+")(.*)$","i"),W=new RegExp("^("+bx+")(?!px)[a-z%]+$","i"),S=new RegExp("^([-+])=("+bx+")","i"),bh={},a9={position:"absolute",visibility:"hidden",display:"block"},bA={letterSpacing:0,fontWeight:400,lineHeight:1},bQ=["Top","Right","Bottom","Left"],ar=["Webkit","O","Moz","ms"],aJ=bG.fn.toggle;function b(b1,bZ){if(bZ in b1){return bZ}var b2=bZ.charAt(0).toUpperCase()+bZ.slice(1),e=bZ,b0=ar.length;while(b0--){bZ=ar[b0]+b2;if(bZ in b1){return bZ}}return e}function Q(bZ,e){bZ=e||bZ;return bG.css(bZ,"display")==="none"||!bG.contains(bZ.ownerDocument,bZ)}function t(b3,e){var b2,b4,bZ=[],b0=0,b1=b3.length;for(;b0<b1;b0++)
 {b2=b3[b0];if(!b2.style){continue}bZ[b0]=bG._data(b2,"olddisplay");if(e){if(!bZ[b0]&&b2.style.display==="none"){b2.style.display=""}if(b2.style.display===""&&Q(b2)){bZ[b0]=bG._data(b2,"olddisplay",bC(b2.nodeName))}}else{b4=F(b2,"display");if(!bZ[b0]&&b4!=="none"){bG._data(b2,"olddisplay",b4)}}}for(b0=0;b0<b1;b0++){b2=b3[b0];if(!b2.style){continue}if(!e||b2.style.display==="none"||b2.style.display===""){b2.style.display=e?bZ[b0]||"":"none"}}return b3}bG.fn.extend({css:function(e,bZ){return bG.access(this,function(b1,b0,b2){return b2!==aB?bG.style(b1,b0,b2):bG.css(b1,b0)},e,bZ,arguments.length>1)},show:function(){return t(this,true)},hide:function(){return t(this)},toggle:function(b0,bZ){var e=typeof b0==="boolean";if(bG.isFunction(b0)&&bG.isFunction(bZ)){return aJ.apply(this,arguments)}return this.each(function(){if(e?b0:Q(this)){bG(this).show()}else{bG(this).hide()}})}});bG.extend({cssHooks:{opacity:{get:function(b0,bZ){if(bZ){var e=F(b0,"opacity");return e===""?"1":e}}}},cssNumber:
 {fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":bG.support.cssFloat?"cssFloat":"styleFloat"},style:function(b1,b0,b7,b2){if(!b1||b1.nodeType===3||b1.nodeType===8||!b1.style){return}var b5,b6,b8,b3=bG.camelCase(b0),bZ=b1.style;b0=bG.cssProps[b3]||(bG.cssProps[b3]=b(bZ,b3));b8=bG.cssHooks[b0]||bG.cssHooks[b3];if(b7!==aB){b6=typeof b7;if(b6==="string"&&(b5=S.exec(b7))){b7=(b5[1]+1)*b5[2]+parseFloat(bG.css(b1,b0));b6="number"}if(b7==null||b6==="number"&&isNaN(b7)){return}if(b6==="number"&&!bG.cssNumber[b3]){b7+="px"}if(!b8||!("set" in b8)||(b7=b8.set(b1,b7,b2))!==aB){try{bZ[b0]=b7}catch(b4){}}}else{if(b8&&"get" in b8&&(b5=b8.get(b1,false,b2))!==aB){return b5}return bZ[b0]}},css:function(b4,b2,b3,bZ){var b5,b1,e,b0=bG.camelCase(b2);b2=bG.cssProps[b0]||(bG.cssProps[b0]=b(b4.style,b0));e=bG.cssHooks[b2]||bG.cssHooks[b0];if(e&&"get" in e){b5=e.get(b4,true,bZ)}if(b5===aB){b5=F(b4,b2)}if(b5==="normal"&&b2 in bA){
 b5=bA[b2]}if(b3||bZ!==aB){b1=parseFloat(b5);return b3||bG.isNumeric(b1)?b1||0:b5}return b5},swap:function(b2,b1,b3){var b0,bZ,e={};for(bZ in b1){e[bZ]=b2.style[bZ];b2.style[bZ]=b1[bZ]}b0=b3.call(b2);for(bZ in b1){b2.style[bZ]=e[bZ]}return b0}});if(a2.getComputedStyle){F=function(b5,bZ){var e,b2,b1,b4,b3=getComputedStyle(b5,null),b0=b5.style;if(b3){e=b3[bZ];if(e===""&&!bG.contains(b5.ownerDocument.documentElement,b5)){e=bG.style(b5,bZ)}if(W.test(e)&&aZ.test(bZ)){b2=b0.width;b1=b0.minWidth;b4=b0.maxWidth;b0.minWidth=b0.maxWidth=b0.width=e;e=b3.width;b0.width=b2;b0.minWidth=b1;b0.maxWidth=b4}}return e}}else{if(o.documentElement.currentStyle){F=function(b2,b0){var b3,e,bZ=b2.currentStyle&&b2.currentStyle[b0],b1=b2.style;if(bZ==null&&b1&&b1[b0]){bZ=b1[b0]}if(W.test(bZ)&&!bk.test(b0)){b3=b1.left;e=b2.runtimeStyle&&b2.runtimeStyle.left;if(e){b2.runtimeStyle.left=b2.currentStyle.left}b1.left=b0==="fontSize"?"1em":bZ;bZ=b1.pixelLeft+"px";b1.left=b3;if(e){b2.runtimeStyle.left=e}}return bZ==="
 "?"auto":bZ}}}function aG(e,b0,b1){var bZ=a8.exec(b0);return bZ?Math.max(0,bZ[1]-(b1||0))+(bZ[2]||"px"):b0}function at(b1,bZ,e,b3){var b0=e===(b3?"border":"content")?4:bZ==="width"?1:0,b2=0;for(;b0<4;b0+=2){if(e==="margin"){b2+=bG.css(b1,e+bQ[b0],true)}if(b3){if(e==="content"){b2-=parseFloat(F(b1,"padding"+bQ[b0]))||0}if(e!=="margin"){b2-=parseFloat(F(b1,"border"+bQ[b0]+"Width"))||0}}else{b2+=parseFloat(F(b1,"padding"+bQ[b0]))||0;if(e!=="padding"){b2+=parseFloat(F(b1,"border"+bQ[b0]+"Width"))||0}}}return b2}function v(b1,bZ,e){var b2=bZ==="width"?b1.offsetWidth:b1.offsetHeight,b0=true,b3=bG.support.boxSizing&&bG.css(b1,"boxSizing")==="border-box";if(b2<=0){b2=F(b1,bZ);if(b2<0||b2==null){b2=b1.style[bZ]}if(W.test(b2)){return b2}b0=b3&&(bG.support.boxSizingReliable||b2===b1.style[bZ]);b2=parseFloat(b2)||0}return(b2+at(b1,bZ,e||(b3?"border":"content"),b0))+"px"}function bC(b0){if(bh[b0]){return bh[b0]}var e=bG("<"+b0+">").appendTo(o.body),bZ=e.css("display");e.remove();if(bZ==="none"||
 bZ===""){az=o.body.appendChild(az||bG.extend(o.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!aW||!az.createElement){aW=(az.contentWindow||az.contentDocument).document;aW.write("<!doctype html><html><body>");aW.close()}e=aW.body.appendChild(aW.createElement(b0));bZ=F(e,"display");o.body.removeChild(az)}bh[b0]=bZ;return bZ}bG.each(["height","width"],function(bZ,e){bG.cssHooks[e]={get:function(b2,b1,b0){if(b1){if(b2.offsetWidth!==0||F(b2,"display")!=="none"){return v(b2,e,b0)}else{return bG.swap(b2,a9,function(){return v(b2,e,b0)})}}},set:function(b1,b2,b0){return aG(b1,b2,b0?at(b1,e,b0,bG.support.boxSizing&&bG.css(b1,"boxSizing")==="border-box"):0)}}});if(!bG.support.opacity){bG.cssHooks.opacity={get:function(bZ,e){return aS.test((e&&bZ.currentStyle?bZ.currentStyle.filter:bZ.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":e?"1":""},set:function(b2,b3){var b1=b2.style,bZ=b2.currentStyle,e=bG.isNumeric(b3)?"alpha(opacity="+b3*100+")":"",b0=bZ&&bZ.filter||b1.filter||"
 ";b1.zoom=1;if(b3>=1&&bG.trim(b0.replace(be,""))===""&&b1.removeAttribute){b1.removeAttribute("filter");if(bZ&&!bZ.filter){return}}b1.filter=be.test(b0)?b0.replace(be,e):b0+" "+e}}}bG(function(){if(!bG.support.reliableMarginRight){bG.cssHooks.marginRight={get:function(bZ,e){return bG.swap(bZ,{display:"inline-block"},function(){if(e){return F(bZ,"marginRight")}})}}}if(!bG.support.pixelPosition&&bG.fn.position){bG.each(["top","left"],function(e,bZ){bG.cssHooks[bZ]={get:function(b2,b1){if(b1){var b0=F(b2,bZ);return W.test(b0)?bG(b2).position()[bZ]+"px":b0}}}})}});if(bG.expr&&bG.expr.filters){bG.expr.filters.hidden=function(e){return(e.offsetWidth===0&&e.offsetHeight===0)||(!bG.support.reliableHiddenOffsets&&((e.style&&e.style.display)||F(e,"display"))==="none")};bG.expr.filters.visible=function(e){return !bG.expr.filters.hidden(e)}}bG.each({margin:"",padding:"",border:"Width"},function(e,bZ){bG.cssHooks[e+bZ]={expand:function(b2){var b1,b3=typeof b2==="string"?b2.split(" "):[b2],b0={};
 for(b1=0;b1<4;b1++){b0[e+bQ[b1]+bZ]=b3[b1]||b3[b1-2]||b3[0]}return b0}};if(!aZ.test(e)){bG.cssHooks[e+bZ].set=aG}});var bs=/%20/g,aP=/\[\]$/,U=/\r?\n/g,bz=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aD=/^(?:select|textarea)/i;bG.fn.extend({serialize:function(){return bG.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?bG.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||aD.test(this.nodeName)||bz.test(this.type))}).map(function(e,bZ){var b0=bG(this).val();return b0==null?null:bG.isArray(b0)?bG.map(b0,function(b2,b1){return{name:bZ.name,value:b2.replace(U,"\r\n")}}):{name:bZ.name,value:b0.replace(U,"\r\n")}}).get()}});bG.param=function(e,b0){var b1,bZ=[],b2=function(b3,b4){b4=bG.isFunction(b4)?b4():(b4==null?"":b4);bZ[bZ.length]=encodeURIComponent(b3)+"="+encodeURIComponent(b4)};if(b0===aB){b0=bG.ajaxSettings&&b
 G.ajaxSettings.traditional}if(bG.isArray(e)||(e.jquery&&!bG.isPlainObject(e))){bG.each(e,function(){b2(this.name,this.value)})}else{for(b1 in e){k(b1,e[b1],b0,b2)}}return bZ.join("&").replace(bs,"+")};function k(b0,b2,bZ,b1){var e;if(bG.isArray(b2)){bG.each(b2,function(b4,b3){if(bZ||aP.test(b0)){b1(b0,b3)}else{k(b0+"["+(typeof b3==="object"?b4:"")+"]",b3,bZ,b1)}})}else{if(!bZ&&bG.type(b2)==="object"){for(e in b2){k(b0+"["+e+"]",b2[e],bZ,b1)}}else{b1(b0,b2)}}}var Y,bX,an=/#.*$/,ad=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,C=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,s=/^(?:GET|HEAD)$/,aC=/^\/\//,bN=/\?/,g=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,P=/([?&])_=[^&]*/,aT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,bW=bG.fn.load,w={},a6={},aX=["*/"]+["*"];try{Y=aI.href}catch(bd){Y=o.createElement("a");Y.href="";Y=Y.href}bX=aT.exec(Y.toLowerCase())||[];function bI(e){return function(b2,b4){if(typeof b2!=="string"){b4=b2;b2="*"}var bZ,b5,b6,b1=b2.toLowerCase().spli
 t(aV),b0=0,b3=b1.length;if(bG.isFunction(b4)){for(;b0<b3;b0++){bZ=b1[b0];b6=/^\+/.test(bZ);if(b6){bZ=bZ.substr(1)||"*"}b5=e[bZ]=e[bZ]||[];b5[b6?"unshift":"push"](b4)}}}}function r(bZ,b8,b3,b6,b5,b1){b5=b5||b8.dataTypes[0];b1=b1||{};b1[b5]=true;var b7,b4=bZ[b5],b0=0,e=b4?b4.length:0,b2=(bZ===w);for(;b0<e&&(b2||!b7);b0++){b7=b4[b0](b8,b3,b6);if(typeof b7==="string"){if(!b2||b1[b7]){b7=aB}else{b8.dataTypes.unshift(b7);b7=r(bZ,b8,b3,b6,b7,b1)}}}if((b2||!b7)&&!b1["*"]){b7=r(bZ,b8,b3,b6,"*",b1)}return b7}function u(b0,b1){var bZ,e,b2=bG.ajaxSettings.flatOptions||{};for(bZ in b1){if(b1[bZ]!==aB){(b2[bZ]?b0:(e||(e={})))[bZ]=b1[bZ]}}if(e){bG.extend(true,b0,e)}}bG.fn.load=function(b1,b4,b5){if(typeof b1!=="string"&&bW){return bW.apply(this,arguments)}if(!this.length){return this}var e,b2,b0,bZ=this,b3=b1.indexOf(" ");if(b3>=0){e=b1.slice(b3,b1.length);b1=b1.slice(0,b3)}if(bG.isFunction(b4)){b5=b4;b4=aB}else{if(typeof b4==="object"){b2="POST"}}bG.ajax({url:b1,type:b2,dataType:"html",data:b4,co
 mplete:function(b7,b6){if(b5){bZ.each(b5,b0||[b7.responseText,b6,b7])}}}).done(function(b6){b0=arguments;bZ.html(e?bG("<div>").append(b6.replace(g,"")).find(e):b6)});return this};bG.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bZ){bG.fn[bZ]=function(b0){return this.on(bZ,b0)}});bG.each(["get","post"],function(e,bZ){bG[bZ]=function(b0,b2,b3,b1){if(bG.isFunction(b2)){b1=b1||b3;b3=b2;b2=aB}return bG.ajax({type:bZ,url:b0,data:b2,success:b3,dataType:b1})}});bG.extend({getScript:function(e,bZ){return bG.get(e,aB,bZ,"script")},getJSON:function(e,bZ,b0){return bG.get(e,bZ,b0,"json")},ajaxSetup:function(bZ,e){if(e){u(bZ,bG.ajaxSettings)}else{e=bZ;bZ=bG.ajaxSettings}u(bZ,e);return bZ},ajaxSettings:{url:Y,isLocal:C.test(bX[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javas
 cript","*":aX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a2.String,"text html":true,"text json":bG.parseJSON,"text xml":bG.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:bI(w),ajaxTransport:bI(a6),ajax:function(b4,b1){if(typeof b4==="object"){b1=b4;b4=aB}b1=b1||{};var b7,cl,b2,cg,b9,cd,b0,cf,b8=bG.ajaxSetup({},b1),cn=b8.context||b8,cb=cn!==b8&&(cn.nodeType||cn instanceof bG)?bG(cn):bG.event,cm=bG.Deferred(),ci=bG.Callbacks("once memory"),b5=b8.statusCode||{},cc={},cj={},b3=0,b6="canceled",ce={readyState:0,setRequestHeader:function(co,cp){if(!b3){var e=co.toLowerCase();co=cj[e]=cj[e]||co;cc[co]=cp}return this},getAllResponseHeaders:function(){return b3===2?cl:null},getResponseHeader:function(co){var e;if(b3===2){if(!b2){b2={};while((e=ad.exec(cl))){b2[e[1].toLowerCase()]=e[2]}}e=b2[co.toLowerCase()]}return e===aB?null:e},overrideMimeType:function(e){if(!b3){b8.mimeType=e}return this},abort:fu
 nction(e){e=e||b6;if(cg){cg.abort(e)}ca(0,e);return this}};function ca(cs,co,ct,cq){var e,cw,cu,cr,cv,cp=co;if(b3===2){return}b3=2;if(b9){clearTimeout(b9)}cg=aB;cl=cq||"";ce.readyState=cs>0?4:0;if(ct){cr=h(b8,ce,ct)}if(cs>=200&&cs<300||cs===304){if(b8.ifModified){cv=ce.getResponseHeader("Last-Modified");if(cv){bG.lastModified[b7]=cv}cv=ce.getResponseHeader("Etag");if(cv){bG.etag[b7]=cv}}if(cs===304){cp="notmodified";e=true}else{e=ae(b8,cr);cp=e.state;cw=e.data;cu=e.error;e=!cu}}else{cu=cp;if(!cp||cs){cp="error";if(cs<0){cs=0}}}ce.status=cs;ce.statusText=""+(co||cp);if(e){cm.resolveWith(cn,[cw,cp,ce])}else{cm.rejectWith(cn,[ce,cp,cu])}ce.statusCode(b5);b5=aB;if(b0){cb.trigger("ajax"+(e?"Success":"Error"),[ce,b8,e?cw:cu])}ci.fireWith(cn,[ce,cp]);if(b0){cb.trigger("ajaxComplete",[ce,b8]);if(!(--bG.active)){bG.event.trigger("ajaxStop")}}}cm.promise(ce);ce.success=ce.done;ce.error=ce.fail;ce.complete=ci.add;ce.statusCode=function(co){if(co){var e;if(b3<2){for(e in co){b5[e]=[b5[e],co[e]]
 }}else{e=co[ce.status];ce.always(e)}}return this};b8.url=((b4||b8.url)+"").replace(an,"").replace(aC,bX[1]+"//");b8.dataTypes=bG.trim(b8.dataType||"*").toLowerCase().split(aV);if(b8.crossDomain==null){cd=aT.exec(b8.url.toLowerCase());b8.crossDomain=!!(cd&&(cd[1]!=bX[1]||cd[2]!=bX[2]||(cd[3]||(cd[1]==="http:"?80:443))!=(bX[3]||(bX[1]==="http:"?80:443))))}if(b8.data&&b8.processData&&typeof b8.data!=="string"){b8.data=bG.param(b8.data,b8.traditional)}r(w,b8,b1,ce);if(b3===2){return ce}b0=b8.global;b8.type=b8.type.toUpperCase();b8.hasContent=!s.test(b8.type);if(b0&&bG.active++===0){bG.event.trigger("ajaxStart")}if(!b8.hasContent){if(b8.data){b8.url+=(bN.test(b8.url)?"&":"?")+b8.data;delete b8.data}b7=b8.url;if(b8.cache===false){var bZ=bG.now(),ck=b8.url.replace(P,"$1_="+bZ);b8.url=ck+((ck===b8.url)?(bN.test(b8.url)?"&":"?")+"_="+bZ:"")}}if(b8.data&&b8.hasContent&&b8.contentType!==false||b1.contentType){ce.setRequestHeader("Content-Type",b8.contentType)}if(b8.ifModified){b7=b7||b8.url;if
 (bG.lastModified[b7]){ce.setRequestHeader("If-Modified-Since",bG.lastModified[b7])}if(bG.etag[b7]){ce.setRequestHeader("If-None-Match",bG.etag[b7])}}ce.setRequestHeader("Accept",b8.dataTypes[0]&&b8.accepts[b8.dataTypes[0]]?b8.accepts[b8.dataTypes[0]]+(b8.dataTypes[0]!=="*"?", "+aX+"; q=0.01":""):b8.accepts["*"]);for(cf in b8.headers){ce.setRequestHeader(cf,b8.headers[cf])}if(b8.beforeSend&&(b8.beforeSend.call(cn,ce,b8)===false||b3===2)){return ce.abort()}b6="abort";for(cf in {success:1,error:1,complete:1}){ce[cf](b8[cf])}cg=r(a6,b8,b1,ce);if(!cg){ca(-1,"No Transport")}else{ce.readyState=1;if(b0){cb.trigger("ajaxSend",[ce,b8])}if(b8.async&&b8.timeout>0){b9=setTimeout(function(){ce.abort("timeout")},b8.timeout)}try{b3=1;cg.send(cc,ca)}catch(ch){if(b3<2){ca(-1,ch)}else{throw ch}}}return ce},active:0,lastModified:{},etag:{}});function h(b7,b6,b3){var b2,b4,b1,e,bZ=b7.contents,b5=b7.dataTypes,b0=b7.responseFields;for(b4 in b0){if(b4 in b3){b6[b0[b4]]=b3[b4]}}while(b5[0]==="*"){b5.shift()
 ;if(b2===aB){b2=b7.mimeType||b6.getResponseHeader("content-type")}}if(b2){for(b4 in bZ){if(bZ[b4]&&bZ[b4].test(b2)){b5.unshift(b4);break}}}if(b5[0] in b3){b1=b5[0]}else{for(b4 in b3){if(!b5[0]||b7.converters[b4+" "+b5[0]]){b1=b4;break}if(!e){e=b4}}b1=b1||e}if(b1){if(b1!==b5[0]){b5.unshift(b1)}return b3[b1]}}function ae(b9,b1){var b7,bZ,b5,b3,b6=b9.dataTypes.slice(),b0=b6[0],b8={},b2=0;if(b9.dataFilter){b1=b9.dataFilter(b1,b9.dataType)}if(b6[1]){for(b7 in b9.converters){b8[b7.toLowerCase()]=b9.converters[b7]}}for(;(b5=b6[++b2]);){if(b5!=="*"){if(b0!=="*"&&b0!==b5){b7=b8[b0+

<TRUNCATED>


[04/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/data/twm.adm
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/data/twm.adm b/docs/0.8.8-incubating/data/twm.adm
new file mode 100644
index 0000000..fa764af
--- /dev/null
+++ b/docs/0.8.8-incubating/data/twm.adm
@@ -0,0 +1,12 @@
+{"tweetid":"1","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("47.44,80.65"),"send-time":datetime("2008-04-26T10:10:00"),"referred-topics":{{"t-mobile","customization"}},"message-text":" love t-mobile its customization is good:)"}
+{"tweetid":"2","user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("32.84,67.14"),"send-time":datetime("2010-05-13T10:10:00"),"referred-topics":{{"verizon","shortcut-menu"}},"message-text":" like verizon its shortcut-menu is awesome:)"}
+{"tweetid":"3","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("29.72,75.8"),"send-time":datetime("2006-11-04T10:10:00"),"referred-topics":{{"motorola","speed"}},"message-text":" like motorola the speed is good:)"}
+{"tweetid":"4","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("39.28,70.48"),"send-time":datetime("2011-12-26T10:10:00"),"referred-topics":{{"sprint","voice-command"}},"message-text":" like sprint the voice-command is mind-blowing:)"}
+{"tweetid":"5","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("40.09,92.69"),"send-time":datetime("2006-08-04T10:10:00"),"referred-topics":{{"motorola","speed"}},"message-text":" can't stand motorola its speed is terrible:("}
+{"tweetid":"6","user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("47.51,83.99"),"send-time":datetime("2010-05-07T10:10:00"),"referred-topics":{{"iphone","voice-clarity"}},"message-text":" like iphone the voice-clarity is good:)"}
+{"tweetid":"7","user":{"screen-name":"ChangEwing_573","lang":"en","friends_count":182,"statuses_count":394,"name":"Chang Ewing","followers_count":32136},"sender-location":point("36.21,72.6"),"send-time":datetime("2011-08-25T10:10:00"),"referred-topics":{{"samsung","platform"}},"message-text":" like samsung the platform is good"}
+{"tweetid":"8","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("46.05,93.34"),"send-time":datetime("2005-10-14T10:10:00"),"referred-topics":{{"t-mobile","shortcut-menu"}},"message-text":" like t-mobile the shortcut-menu is awesome:)"}
+{"tweetid":"9","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("36.86,74.62"),"send-time":datetime("2012-07-21T10:10:00"),"referred-topics":{{"verizon","voicemail-service"}},"message-text":" love verizon its voicemail-service is awesome"}
+{"tweetid":"10","user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("29.15,76.53"),"send-time":datetime("2008-01-26T10:10:00"),"referred-topics":{{"verizon","voice-clarity"}},"message-text":" hate verizon its voice-clarity is OMG:("}
+{"tweetid":"11","user":{"screen-name":"NilaMilliron_tw","lang":"en","friends_count":445,"statuses_count":164,"name":"Nila Milliron","followers_count":22649},"sender-location":point("37.59,68.42"),"send-time":datetime("2008-03-09T10:10:00"),"referred-topics":{{"iphone","platform"}},"message-text":" can't stand iphone its platform is terrible"}
+{"tweetid":"12","user":{"screen-name":"OliJackson_512","lang":"en","friends_count":445,"statuses_count":164,"name":"Oli Jackson","followers_count":22649},"sender-location":point("24.82,94.63"),"send-time":datetime("2010-02-13T10:10:00"),"referred-topics":{{"samsung","voice-command"}},"message-text":" like samsung the voice-command is amazing:)"}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/data/twu.adm
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/data/twu.adm b/docs/0.8.8-incubating/data/twu.adm
new file mode 100644
index 0000000..32a1917
--- /dev/null
+++ b/docs/0.8.8-incubating/data/twu.adm
@@ -0,0 +1,4 @@
+{"screen-name":"NathanGiesen@211","lang":"en","friends_count":18,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416}
+{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159}
+{"screen-name":"NilaMilliron_tw","lang":"en","friends_count":445,"statuses_count":164,"name":"Nila Milliron","followers_count":22649}
+{"screen-name":"ChangEwing_573","lang":"en","friends_count":182,"statuses_count":394,"name":"Chang Ewing","followers_count":32136}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/feeds/tutorial.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/feeds/tutorial.html b/docs/0.8.8-incubating/feeds/tutorial.html
new file mode 100644
index 0000000..0beea3a
--- /dev/null
+++ b/docs/0.8.8-incubating/feeds/tutorial.html
@@ -0,0 +1,425 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Support for Data Ingestion in AsterixDB</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Support for Data Ingestion in AsterixDB</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Support for Data Ingestion in AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Introduction">Introduction</a></li>
+  
+<li><a href="#FeedAdaptors">Feed Adaptors</a></li>
+  
+<li><a href="#FeedPolicies">Feed Policies</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction">Introduction</a></h2>
+<p>In this document, we describe the support for data ingestion in AsterixDB. Data feeds are a new mechanism for having continuous data arrive into a BDMS from external sources and incrementally populate a persisted dataset and associated indexes. We add a new BDMS architectural component, called a data feed, that makes a Big Data system the caretaker for functionality that used to live outside, and we show how it improves users&#x2019; lives and system performance.</p></div>
+<div class="section">
+<h2><a name="Feed_Adaptors"></a><a name="FeedAdaptors">Feed Adaptors</a></h2>
+<p>The functionality of establishing a connection with a data source and receiving, parsing and translating its data into ADM records (for storage inside AsterixDB) is contained in a feed adaptor. A feed adaptor is an implementation of an interface and its details are specific to a given data source. An adaptor may optionally be given parameters to configure its runtime behavior. Depending upon the data transfer protocol/APIs offered by the data source, a feed adaptor may operate in a push or a pull mode. Push mode involves just one initial request by the adaptor to the data source for setting up the connection. Once a connection is authorized, the data source &#x201c;pushes&#x201d; data to the adaptor without any subsequent requests by the adaptor. In contrast, when operating in a pull mode, the adaptor makes a separate request each time to receive data. AsterixDB currently provides built-in adaptors for several popular data sources such as Twitter, CNN, and RSS feeds. AsterixDB ad
 ditionally provides a generic socket-based adaptor that can be used to ingest data that is directed at a prescribed socket.</p>
+<p>In this tutorial, we shall describe building two example data ingestion pipelines that cover the popular scenario of ingesting data from (a) Twitter and (b) RSS Feed source.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Ingesting_Twitter_Stream"></a>Ingesting Twitter Stream</h4>
+<p>We shall use the built-in push-based Twitter adaptor. As a pre-requisite, we must define a Tweet using the AsterixDB Data Model (ADM) and the AsterixDB Query Language (AQL). Given below are the type definition in AQL that create a Tweet datatype which is representative of a real tweet as obtained from Twitter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    create dataverse feeds;
+    use dataverse feeds;
+
+    create type TwitterUser if not exists as open{
+        screen_name: string,
+        language: string,
+        friends_count: int32,
+        status_count: int32,
+        name: string,
+        followers_count: int32
+    };
+    create type Tweet if not exists as open{
+        id: string,
+        user: TwitterUser,
+        latitude:double,
+        longitude:double,
+        created_at:string,
+        message_text:string
+    };
+
+    create dataset Tweets (Tweet)
+    primary key id;
+</pre></div></div>
+<p>We also create a dataset that we shall use to persist the tweets in AsterixDB. Next we make use of the <tt>create feed</tt> AQL statement to define our example data feed.</p>
+<div class="section">
+<h5><a name="Using_the_push_twitter_feed_adapter"></a>Using the &#x201c;push_twitter&#x201d; feed adapter</h5>
+<p>The &#x201c;push_twitter&#x201d; adaptor requires setting up an application account with Twitter. To retrieve tweets, Twitter requires registering an application with Twitter. Registration involves providing a name and a brief description for the application. Each application has an associated OAuth authentication credential that includes OAuth keys and tokens. Accessing the Twitter API requires providing the following. 1. Consumer Key (API Key) 2. Consumer Secret (API Secret) 3. Access Token 4. Access Token Secret</p>
+<p>The &#x201c;push_twitter&#x201d; adaptor takes as configuration the above mentioned parameters. End users are required to obtain the above authentication credentials prior to using the &#x201c;push_twitter&#x201d; adaptor. For further information on obtaining OAuth keys and tokens and registering an application with Twitter, please visit <a class="externalLink" href="http://apps.twitter.com">http://apps.twitter.com</a></p>
+<p>Given below is an example AQL statement that creates a feed called &#x201c;TwitterFeed&#x201d; by using the &#x201c;push_twitter&#x201d; adaptor.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+     (&quot;consumer.key&quot;=&quot;************&quot;),
+     (&quot;consumer.secret&quot;=&quot;**************&quot;),
+     (&quot;access.token&quot;=&quot;**********&quot;),
+     (&quot;access.token.secret&quot;=&quot;*************&quot;));
+</pre></div></div>
+<p>It is required that the above authentication parameters are provided valid values. Note that the <tt>create feed</tt> statement does not initiate the flow of data from Twitter into our AsterixDB instance. Instead, the <tt>create feed</tt> statement only results in registering the feed with AsterixDB. The flow of data along a feed is initiated when it is connected to a target dataset using the connect feed statement (which we shall revisit later).</p></div></div>
+<div class="section">
+<h4><a name="Lifecycle_of_a_Feed"></a>Lifecycle of a Feed</h4>
+<p>A feed is a logical artifact that is brought to life (i.e., its data flow is initiated) only when it is connected to a dataset using the <tt>connect
+feed</tt> AQL statement. Subsequent to a <tt>connect feed</tt> statement, the feed is said to be in the connected state. Multiple feeds can simultaneously be connected to a dataset such that the contents of the dataset represent the union of the connected feeds. In a supported but unlikely scenario, one feed may also be simultaneously connected to different target datasets. Note that connecting a secondary feed does not require the parent feed (or any ancestor feed) to be in the connected state; the order in which feeds are connected to their respective datasets is not important. Furthermore, additional (secondary) feeds can be added to an existing hierarchy and connected to a dataset at any time without impeding/interrupting the flow of data along a connected ancestor feed.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets;
+</pre></div></div>
+<p>The <tt>connect feed</tt> statement above directs AsterixDB to persist the <tt>TwitterFeed</tt> feed in the <tt>Tweets</tt> dataset. If it is required (by the high-level application) to also retain the raw tweets obtained from Twitter, the end user may additionally choose to connect TwitterFeed to a different dataset.</p>
+<p>Let the feed run for a minute, then run the following query to see the latest tweets that are stored into the data set.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    for $i in dataset Tweets limit 10 return $i;
+</pre></div></div>
+<p>The flow of data from a feed into a dataset can be terminated explicitly by use of the <tt>disconnect feed</tt> statement. Disconnecting a feed from a particular dataset does not interrupt the flow of data from the feed to any other dataset(s), nor does it impact other connected feeds in the lineage.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    disconnect feed TwitterFeed from dataset Tweets;
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Ingesting_an_RSS_Feed"></a>Ingesting an RSS Feed</h4>
+<p>RSS (Rich Site Summary), originally RDF Site Summary and often called Really Simple Syndication, uses a family of standard web feed formats to publish frequently updated information: blog entries, news headlines, audio, video. An RSS document (called &#x201c;feed&#x201d;, &#x201c;web feed&#x201d;, or &#x201c;channel&#x201d;) includes full or summarized text, and metadata, like publishing date and author&#x2019;s name. RSS feeds enable publishers to syndicate data automatically.</p>
+<div class="section">
+<h5><a name="Using_the_rss_feed_feed_adapter"></a>Using the &#x201c;rss_feed&#x201d; feed adapter</h5>
+<p>AsterixDB provides a built-in feed adaptor that allows retrieving data given a collection of RSS end point URLs. As observed in the case of ingesting tweets, it is required to model an RSS data item using AQL.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create type Rss if not exists as open {
+        id: string,
+        title: string,
+        description: string,
+        link: string
+    };
+
+    create dataset RssDataset (Rss)
+    primary key id;
+</pre></div></div>
+<p>Next, we define an RSS feed using our built-in adaptor &#x201c;rss_feed&#x201d;.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create feed my_feed using
+    rss_feed (
+       (&quot;type-name&quot;=&quot;Rss&quot;),
+       (&quot;url&quot;=&quot;http://rss.cnn.com/rss/edition.rss&quot;)
+    );
+</pre></div></div>
+<p>In the above definition, the configuration parameter &#x201c;url&#x201d; can be a comma-separated list that reflects a collection of RSS URLs, where each URL corresponds to an RSS endpoint or a RSS feed. The &#x201c;rss_adaptor&#x201d; retrieves data from each of the specified RSS URLs (comma separated values) in parallel.</p>
+<p>The following statements connect the feed into the <tt>RssDataset</tt>:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    connect feed my_feed to dataset RssDataset;
+</pre></div></div>
+<p>The following statements show the latest data from the data set, and disconnect the feed from the data set.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    for $i in dataset RssDataset limit 10 return $i;
+
+    disconnect feed my_feed from dataset RssDataset;
+</pre></div></div>
+<p>AsterixDB also allows multiple feeds to be connected to form a cascade network to process data.</p></div></div></div></div>
+<div class="section">
+<h2><a name="Policies_for_Feed_Ingestion"></a><a name="FeedPolicies">Policies for Feed Ingestion</a></h2>
+<p>Multiple feeds may be concurrently operational on an AsterixDB cluster, each competing for resources (CPU cycles, network bandwidth, disk IO) to maintain pace with their respective data sources. As a data management system, AsterixDB is able to manage a set of concurrent feeds and make dynamic decisions related to the allocation of resources, resolving resource bottlenecks and the handling of failures. Each feed has its own set of constraints, influenced largely by the nature of its data source and the applications that intend to consume and process the ingested data. Consider an application that intends to discover the trending topics on Twitter by analyzing tweets that are being processed. Losing a few tweets may be acceptable. In contrast, when ingesting from a data source that provides a click-stream of ad clicks, losing data would translate to a loss of revenue for an application that tracks revenue by charging advertisers per click.</p>
+<p>AsterixDB allows a data feed to have an associated ingestion policy that is expressed as a collection of parameters and associated values. An ingestion policy dictates the runtime behavior of the feed in response to resource bottlenecks and failures. AsterixDB provides a list of policy parameters that help customize the system&#x2019;s runtime behavior when handling excess records. AsterixDB provides a set of built-in policies, each constructed by setting appropriate value(s) for the policy parameter(s) from the table below.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Policy_Parameters"></a>Policy Parameters</h4>
+
+<ul>
+  
+<li>
+<p><i>excess.records.spill</i>: Set to true if records that cannot be processed by an operator for lack of resources (referred to as excess records hereafter) should be persisted to the local disk for deferred processing. (Default: false)</p></li>
+  
+<li>
+<p><i>excess.records.discard</i>: Set to true if excess records should be discarded. (Default: false)</p></li>
+  
+<li>
+<p><i>excess.records.throttle</i>: Set to true if rate of arrival of records is required to be reduced in an adaptive manner to prevent having any excess records (Default: false)</p></li>
+  
+<li>
+<p><i>excess.records.elastic</i>: Set to true if the system should attempt to resolve resource bottlenecks by re-structuring and/or rescheduling the feed ingestion pipeline. (Default: false)</p></li>
+  
+<li>
+<p><i>recover.soft.failure</i>: Set to true if the feed must attempt to survive any runtime exception. A false value permits an early termination of a feed in such an event. (Default: true)</p></li>
+  
+<li>
+<p><i>recover.soft.failure</i>: Set to true if the feed must attempt to survive a hardware failures (loss of AsterixDB node(s)). A false value permits the early termination of a feed in the event of a hardware failure (Default: false)</p></li>
+</ul>
+<p>Note that the end user may choose to form a custom policy. For example, it is possible in AsterixDB to create a custom policy that spills excess records to disk and subsequently resorts to throttling if the spillage crosses a configured threshold. In all cases, the desired ingestion policy is specified as part of the <tt>connect feed</tt> statement or else the &#x201c;Basic&#x201d; policy will be chosen as the default. It is worth noting that a feed can be connected to a dataset at any time, which is independent from other related feeds in the hierarchy.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets
+    using policy Basic ;
+</pre></div></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/AsterixCluster.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/AsterixCluster.png b/docs/0.8.8-incubating/images/AsterixCluster.png
new file mode 100644
index 0000000..a16ee26
Binary files /dev/null and b/docs/0.8.8-incubating/images/AsterixCluster.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/accessories-text-editor.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/accessories-text-editor.png b/docs/0.8.8-incubating/images/accessories-text-editor.png
new file mode 100644
index 0000000..abc3366
Binary files /dev/null and b/docs/0.8.8-incubating/images/accessories-text-editor.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/add.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/add.gif b/docs/0.8.8-incubating/images/add.gif
new file mode 100644
index 0000000..1cb3dbf
Binary files /dev/null and b/docs/0.8.8-incubating/images/add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/apache-maven-project-2.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/apache-maven-project-2.png b/docs/0.8.8-incubating/images/apache-maven-project-2.png
new file mode 100644
index 0000000..6c096ec
Binary files /dev/null and b/docs/0.8.8-incubating/images/apache-maven-project-2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/application-certificate.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/application-certificate.png b/docs/0.8.8-incubating/images/application-certificate.png
new file mode 100644
index 0000000..cc6aff6
Binary files /dev/null and b/docs/0.8.8-incubating/images/application-certificate.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/asf_logo_wide.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/asf_logo_wide.png b/docs/0.8.8-incubating/images/asf_logo_wide.png
new file mode 100644
index 0000000..56a4369
Binary files /dev/null and b/docs/0.8.8-incubating/images/asf_logo_wide.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/asterix_webui.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/asterix_webui.png b/docs/0.8.8-incubating/images/asterix_webui.png
new file mode 100644
index 0000000..27522c4
Binary files /dev/null and b/docs/0.8.8-incubating/images/asterix_webui.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/asterixlogo.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/asterixlogo.png b/docs/0.8.8-incubating/images/asterixlogo.png
new file mode 100644
index 0000000..45cd64f
Binary files /dev/null and b/docs/0.8.8-incubating/images/asterixlogo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/contact-new.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/contact-new.png b/docs/0.8.8-incubating/images/contact-new.png
new file mode 100644
index 0000000..ebc4316
Binary files /dev/null and b/docs/0.8.8-incubating/images/contact-new.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/document-properties.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/document-properties.png b/docs/0.8.8-incubating/images/document-properties.png
new file mode 100644
index 0000000..34c2409
Binary files /dev/null and b/docs/0.8.8-incubating/images/document-properties.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/drive-harddisk.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/drive-harddisk.png b/docs/0.8.8-incubating/images/drive-harddisk.png
new file mode 100644
index 0000000..d7ce475
Binary files /dev/null and b/docs/0.8.8-incubating/images/drive-harddisk.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/egg-logo.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/egg-logo.png b/docs/0.8.8-incubating/images/egg-logo.png
new file mode 100644
index 0000000..c04e70d
Binary files /dev/null and b/docs/0.8.8-incubating/images/egg-logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/fix.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/fix.gif b/docs/0.8.8-incubating/images/fix.gif
new file mode 100644
index 0000000..b7eb3dc
Binary files /dev/null and b/docs/0.8.8-incubating/images/fix.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/hyrax_ts.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/hyrax_ts.png b/docs/0.8.8-incubating/images/hyrax_ts.png
new file mode 100644
index 0000000..001c788
Binary files /dev/null and b/docs/0.8.8-incubating/images/hyrax_ts.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/icon_error_sml.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/icon_error_sml.gif b/docs/0.8.8-incubating/images/icon_error_sml.gif
new file mode 100644
index 0000000..12e9a01
Binary files /dev/null and b/docs/0.8.8-incubating/images/icon_error_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/icon_help_sml.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/icon_help_sml.gif b/docs/0.8.8-incubating/images/icon_help_sml.gif
new file mode 100644
index 0000000..aaf20e6
Binary files /dev/null and b/docs/0.8.8-incubating/images/icon_help_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/icon_info_sml.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/icon_info_sml.gif b/docs/0.8.8-incubating/images/icon_info_sml.gif
new file mode 100644
index 0000000..b776326
Binary files /dev/null and b/docs/0.8.8-incubating/images/icon_info_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/icon_success_sml.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/icon_success_sml.gif b/docs/0.8.8-incubating/images/icon_success_sml.gif
new file mode 100644
index 0000000..0a19527
Binary files /dev/null and b/docs/0.8.8-incubating/images/icon_success_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/icon_warning_sml.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/icon_warning_sml.gif b/docs/0.8.8-incubating/images/icon_warning_sml.gif
new file mode 100644
index 0000000..ac6ad6a
Binary files /dev/null and b/docs/0.8.8-incubating/images/icon_warning_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/image-x-generic.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/image-x-generic.png b/docs/0.8.8-incubating/images/image-x-generic.png
new file mode 100644
index 0000000..ab49efb
Binary files /dev/null and b/docs/0.8.8-incubating/images/image-x-generic.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/internet-web-browser.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/internet-web-browser.png b/docs/0.8.8-incubating/images/internet-web-browser.png
new file mode 100644
index 0000000..307d6ac
Binary files /dev/null and b/docs/0.8.8-incubating/images/internet-web-browser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/logos/build-by-maven-black.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/logos/build-by-maven-black.png b/docs/0.8.8-incubating/images/logos/build-by-maven-black.png
new file mode 100644
index 0000000..919fd0f
Binary files /dev/null and b/docs/0.8.8-incubating/images/logos/build-by-maven-black.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/logos/build-by-maven-white.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/logos/build-by-maven-white.png b/docs/0.8.8-incubating/images/logos/build-by-maven-white.png
new file mode 100644
index 0000000..7d44c9c
Binary files /dev/null and b/docs/0.8.8-incubating/images/logos/build-by-maven-white.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/logos/maven-feather.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/logos/maven-feather.png b/docs/0.8.8-incubating/images/logos/maven-feather.png
new file mode 100644
index 0000000..b5ada83
Binary files /dev/null and b/docs/0.8.8-incubating/images/logos/maven-feather.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/network-server.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/network-server.png b/docs/0.8.8-incubating/images/network-server.png
new file mode 100644
index 0000000..1d12e19
Binary files /dev/null and b/docs/0.8.8-incubating/images/network-server.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/package-x-generic.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/package-x-generic.png b/docs/0.8.8-incubating/images/package-x-generic.png
new file mode 100644
index 0000000..8b7e9e6
Binary files /dev/null and b/docs/0.8.8-incubating/images/package-x-generic.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/profiles/pre-release.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/profiles/pre-release.png b/docs/0.8.8-incubating/images/profiles/pre-release.png
new file mode 100644
index 0000000..d448e85
Binary files /dev/null and b/docs/0.8.8-incubating/images/profiles/pre-release.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/profiles/retired.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/profiles/retired.png b/docs/0.8.8-incubating/images/profiles/retired.png
new file mode 100644
index 0000000..f89f6a2
Binary files /dev/null and b/docs/0.8.8-incubating/images/profiles/retired.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/profiles/sandbox.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/profiles/sandbox.png b/docs/0.8.8-incubating/images/profiles/sandbox.png
new file mode 100644
index 0000000..f88b362
Binary files /dev/null and b/docs/0.8.8-incubating/images/profiles/sandbox.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/remove.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/remove.gif b/docs/0.8.8-incubating/images/remove.gif
new file mode 100644
index 0000000..fc65631
Binary files /dev/null and b/docs/0.8.8-incubating/images/remove.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/rss.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/rss.png b/docs/0.8.8-incubating/images/rss.png
new file mode 100644
index 0000000..a9850ee
Binary files /dev/null and b/docs/0.8.8-incubating/images/rss.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/running_inst.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/running_inst.png b/docs/0.8.8-incubating/images/running_inst.png
new file mode 100644
index 0000000..66eb03a
Binary files /dev/null and b/docs/0.8.8-incubating/images/running_inst.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/update.gif
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/update.gif b/docs/0.8.8-incubating/images/update.gif
new file mode 100644
index 0000000..b2a6d0b
Binary files /dev/null and b/docs/0.8.8-incubating/images/update.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/window-new.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/window-new.png b/docs/0.8.8-incubating/images/window-new.png
new file mode 100644
index 0000000..0e12ef9
Binary files /dev/null and b/docs/0.8.8-incubating/images/window-new.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/images/yarn_clust.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/images/yarn_clust.png b/docs/0.8.8-incubating/images/yarn_clust.png
new file mode 100644
index 0000000..5e386bc
Binary files /dev/null and b/docs/0.8.8-incubating/images/yarn_clust.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/img/glyphicons-halflings-white.png b/docs/0.8.8-incubating/img/glyphicons-halflings-white.png
new file mode 100644
index 0000000..3bf6484
Binary files /dev/null and b/docs/0.8.8-incubating/img/glyphicons-halflings-white.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/img/glyphicons-halflings.png b/docs/0.8.8-incubating/img/glyphicons-halflings.png
new file mode 100644
index 0000000..a996999
Binary files /dev/null and b/docs/0.8.8-incubating/img/glyphicons-halflings.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/docs/0.8.8-incubating/index.html
----------------------------------------------------------------------
diff --git a/docs/0.8.8-incubating/index.html b/docs/0.8.8-incubating/index.html
new file mode 100644
index 0000000..b01eef2
--- /dev/null
+++ b/docs/0.8.8-incubating/index.html
@@ -0,0 +1,268 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB</h1>
+<p>AsterixDB is a BDMS (Big Data Management System) with a rich feature set that sets it apart from other Big Data platforms. Its feature set makes it well-suited to modern needs such as web data warehousing and social data storage and analysis. AsterixDB has:</p>
+
+<ul>
+  
+<li>A semistructured NoSQL style data model (ADM) resulting from extending JSON  with object database ideas</li>
+  
+<li>An expressive and declarative query language (AQL) that supports a broad  range of queries and analysis over semistructured data</li>
+  
+<li>A parallel runtime query execution engine, Hyracks, that has been  scale-tested on up to 1000+ cores and 500+ disks</li>
+  
+<li>Partitioned LSM-based data storage and indexing to support efficient  ingestion and management of semistructured data</li>
+  
+<li>Support for query access to externally stored data (e.g., data in HDFS) as  well as to data stored natively by AsterixDB</li>
+  
+<li>A rich set of primitive data types, including spatial and temporal data in  addition to integer, floating point, and textual data</li>
+  
+<li>Secondary indexing options that include B+ trees, R trees, and inverted  keyword (exact and fuzzy) index types</li>
+  
+<li>Support for fuzzy and spatial queries as well as for more traditional  parametric queries</li>
+  
+<li>Basic transactional (concurrency and recovery) capabilities akin to those of  a NoSQL store</li>
+</ul>
+<div class="section">
+<div class="section">
+<h3><a name="Disclaimer"></a>Disclaimer</h3>
+<p>Apache AsterixDB is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[18/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/install.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/install.html b/content/docs/0.8.8-incubating/install.html
new file mode 100644
index 0000000..68a5390
--- /dev/null
+++ b/content/docs/0.8.8-incubating/install.html
@@ -0,0 +1,1297 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Introduction</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Installing and Managing AsterixDB using Managix</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Introduction</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PrerequisitesForInstallingAsterixDB">Prerequisites for Installing AsterixDB</a></li>
+  
+<li><a href="#Section1SingleMachineAsterixDBInstallation">Section 1: Single-Machine AsterixDB installation</a></li>
+  
+<li><a href="#Section2SingleMachineAsterixDBInstallationAdvanced">Section 2: Single-Machine AsterixDB installation (Advanced)</a></li>
+  
+<li><a href="#Section3InstallingAsterixDBOnAClusterOfMultipleMachines">Section 3: Installing AsterixDB on a Cluster of Multiple Machines</a></li>
+  
+<li><a href="#Section4ManagingTheLifecycleOfAnAsterixDBInstance">Section 4: Managing the Lifecycle of an AsterixDB Instance</a></li>
+  
+<li><a href="#Section5FAQ">Section 5: Frequently Asked Questions</a></li>
+</ul>
+<p>This is a quickstart guide for getting AsterixDB running in a distributed environment. This guide also introduces the AsterixDB installer (nicknamed <i><i>Managix</i></i>) and describes how it can be used to create and manage an AsterixDB instance. By following the simple steps described in this guide, you will get a running instance of AsterixDB. You shall be able to use AsterixDB from its Web interface and manage its lifecycle using Managix. This document assumes that you are running some version of <i><i>Linux</i></i> or <i><i>MacOS X</i></i>.</p></div>
+<div class="section">
+<h2><a name="Prerequisites_for_Installing_AsterixDB_Back_to_TOC"></a><a name="PrerequisitesForInstallingAsterixDB" id="PrerequisitesForInstallingAsterixDB">Prerequisites for Installing AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Prerequisite:</p>
+
+<ul>
+  
+<li><a class="externalLink" href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK&gt;=7</a> (Otherwise known as JDK&gt;=1.7).</li>
+</ul>
+<p>To know the version of Java installed on your system, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ java -version
+</pre></div></div>
+<p>If your version is at least 1.7.0_x, similar to the output shown below, you are good to proceed.</p>
+
+<div class="source">
+<div class="source">
+<pre>    java version &quot;1.7.0_13&quot;
+    Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
+    Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
+</pre></div></div>
+<p>If you need to upgrade or install java, please follow the instructions below.</p>
+
+<ul>
+  
+<li>
+<p>For Linux: <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html">JDK 7 Linux Install</a> JDK would be installed at a path under /usr/lib/jvm/jdk-version .</p></li>
+  
+<li>
+<p>For Mac: <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html">JDK 7 Mac Install</a> JDK would be installed at /Library/Java/JavaVirtualMachines/jdk-version/Contents/Home .</p></li>
+</ul>
+<p>The java installation directory is referred as JAVA_HOME. Since we upgraded/installed Java, we need to ensure JAVA_HOME points to the installation directory of JDK. Modify your ~/.bash_profile (or ~/.bashrc) and define JAVA_HOME accordingly. After the modification, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ java -version
+</pre></div></div>
+<p>If the version information you obtain does not show 1.7, you need to update the PATH variable. To do so, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ echo &quot;PATH=$JAVA_HOME/bin:$PATH&quot; &gt;&gt; ~/.bash_profile (or ~/.bashrc)
+    $ source ~/.bash_profile (or ~/.bashrc)
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Section_1:_Single-Machine_AsterixDB_installation_Back_to_TOC"></a><a name="Section1SingleMachineAsterixDBInstallation" id="Section1SingleMachineAsterixDBInstallation">Section 1: Single-Machine AsterixDB installation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We assume a user called &#x201c;Joe&#x201d; with a home directory as /home/joe. On a Mac, the home directory for user Joe would be /Users/joe.</p>
+<div class="section">
+<h3><a name="Configuring_Environment"></a>Configuring Environment</h3>
+<p>Ensure that JAVA_HOME variable is defined and points to the the java installation directory on your machine. To verify, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ echo $JAVA_HOME
+</pre></div></div>
+<p>If you do not see any output, JAVA_HOME is not defined. We need to add the following line to your profile located at /home/joe/.bash_profile or /home/joe/.bashrc, whichever you are using. If you do not have any of these files, create a ~/.bash_profile file.</p>
+
+<div class="source">
+<div class="source">
+<pre>    export JAVA_HOME=&lt;Path to Java installation directory&gt;
+</pre></div></div>
+<p>After you have edited ~/.bash_profile (or ~/.bashrc), execute the following to make the changes effective in current shell:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ source /home/joe/.bash_profile (or /home/joe/.bashrc)
+</pre></div></div>
+<p>Before proceeding, verify that JAVA_HOME is defined by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ echo $JAVA_HOME
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Configuring_SSH"></a>Configuring SSH</h3>
+<p>If SSH is not enabled on your system, please follow the instruction below to enable/install it or else skip to the section <a href="#Configuring_Password-less_SSH">Configuring Password-less SSH</a>.</p>
+<div class="section">
+<h4><a name="Enabling_SSH_on_Mac"></a>Enabling SSH on Mac</h4>
+<p>The Apple Mac OS X operating system has SSH installed by default but the SSH daemon is not enabled. This means you can&#x2019;t login remotely or do remote copies until you enable it. To enable it, go to &#x2018;System Preferences&#x2019;. Under &#x2018;Internet &amp; Networking&#x2019; there is a &#x2018;Sharing&#x2019; icon. Run that. In the list that appears, check the &#x2018;Remote Login&#x2019; option. Also check the &#x201c;All users&#x201d; radio button for &#x201c;Allow access for&#x201d;. This starts the SSH daemon immediately and you can remotely login using your username. The &#x2018;Sharing&#x2019; window shows at the bottom the name and IP address to use. You can also find this out using &#x2018;whoami&#x2019; and &#x2018;ifconfig&#x2019; from the Terminal application.</p></div>
+<div class="section">
+<h4><a name="Enabling_SSH_on_Linux"></a>Enabling SSH on Linux</h4>
+
+<div class="source">
+<div class="source">
+<pre>    sudo apt-get install openssh-server
+</pre></div></div>
+<p>Assumming that you have enabled SSH on your system, let us proceed.</p></div>
+<div class="section">
+<h4><a name="Configuring_Password-less_SSH"></a>Configuring Password-less SSH</h4>
+<p>For our single-machine setup of AsterixDB, we need to configure password-less SSH access to localhost. We assume that you are on the machine where you want to install AsterixDB. To verify if you already have password-less SSH configured, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ ssh 127.0.0.1
+</pre></div></div>
+<p>If you get an output similar to one shown below, type &#x201c;yes&#x201d; and press enter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
+    RSA key fingerprint is aa:7b:51:90:74:39:c4:f6:28:a2:9d:47:c2:8d:33:31.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>If you are not prompted for a password, that is if you get an output similar to one shown below, it signifies that you already have password-less SSH configured. </p>
+
+<div class="source">
+<div class="source">
+<pre>    $ ssh 127.0.0.1
+    Last login: Sat Mar 23 22:52:49 2013
+</pre></div></div>
+<p>[Important: Password-less SSH requires the use of a (public,private) key-pair. The key-pair is located as a pair of files under  $HOME/.ssh directory. It is required that the (public,private) key-pair files have default names (id_rsa.pub, id_rsa) respectively.  If you are using different names, please rename the files to use the default names]</p>
+<p>Skip to the next section <a href="#Configuring_Managix">Configuring Managix</a>.</p>
+<p>You are here because you were prompted for a password. You need to configure password-less SSH.<br />We shall generate a (public,private) key-pair as id_rsa.pub and id_rsa respectively. If $HOME/.ssh already contains a (public,private) key-pair, please ensure the files are renamed before proceeding. Follow the instructions below.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ ssh-keygen -t rsa -P &quot;&quot;
+    Generating public/private rsa key pair.
+    Enter file in which to save the key (/home/joe/.ssh/id_rsa):   
+    [Important: Please ensure that we use the default value, so simply press enter]
+</pre></div></div>
+<p>If a key already exists, you should get an output similar to what is shown below. Press &#x2018;y&#x2019; to overwrite the existing key. It is required to use the default name. If you wish to not overwrite a pre-existing key, ensure that the pre-existing key is saved with a different name.</p>
+
+<div class="source">
+<div class="source">
+<pre>    /home/joe/.ssh/id_rsa already exists.
+    Overwrite (y/n)?
+</pre></div></div>
+<p>You should see an output similar to one shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    The key fingerprint is:
+    4d:b0:30:14:45:cc:99:86:15:48:17:0b:39:a0:05:ca joe@joe-machine
+    The key's randomart image is:
+    +--[ RSA 2048]----+
+    |  ..o+B@O=       |
+    |.. o  ==*+       |
+    |.E.    oo .      |
+    |         o       |
+    |        S .      |
+    |                 |
+    |                 |
+    |                 |
+    |                 |
+    +-----------------+
+</pre></div></div>
+<p>Note: for Linux users, you may not get an image representation of the key, but this is not an error. Next, execute the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ cat $HOME/.ssh/id_rsa.pub &gt;&gt; $HOME/.ssh/authorized_keys
+      $ chmod 700  $HOME/.ssh/authorized_keys
+</pre></div></div>
+<p>We shall now retry SSH without password.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ ssh 127.0.0.1
+</pre></div></div>
+<p>You may see an output similar to one shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
+    RSA key fingerprint is aa:7b:51:90:74:39:c4:f6:28:a2:9d:47:c2:8d:33:31.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>Type &#x2018;yes&#x2019; and press the enter key. You should see an output similar to one shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.
+    Last login: Thu Mar 28 12:27:10 2013
+</pre></div></div>
+<p>You should now be able to log in without being prompted for a password or a response.</p>
+
+<div class="source">
+<div class="source">
+<pre>    ssh 127.0.0.1
+    Last login: Sat Mar 23 22:54:40 2013
+</pre></div></div>
+<p>Execute &#x2018;exit&#x2019; to close the session.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ exit
+    logout
+    Connection to 127.0.0.1 closed.
+</pre></div></div></div></div>
+<div class="section">
+<h3><a name="Configuring_Managix"></a>Configuring Managix</h3>
+<p>You will need the AsterixDB installer (a.k.a. Managix). Download Managix from <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">here</a>; this includes the bits for Managix as well as AsterixDB.</p>
+<p>To be able to create an AsterixDB instance and manage its lifecycle, the Managix requires you to configure a set of configuration files namely:</p>
+
+<ul>
+  
+<li><tt>conf/managix-conf.xml</tt>: A configuration XML file that contains configuration settings for Managix.</li>
+  
+<li>A configuration XML file that describes the nodes in the cluster, e.g., <tt>clusters/local/local.xml</tt>.</li>
+</ul>
+<p>Since we intend to run AsterixDB on a single node, Managix can auto-configure itself and populate the above configuration files. To auto-configure Managix, execute the following in the MANAGIX_HOME directory:</p>
+
+<div class="source">
+<div class="source">
+<pre>     /home/joe/asterix-mgmt&gt; $ managix configure
+</pre></div></div>
+<p>Let us do a sample run to validate the set of configuration files auto-generated by Managix.</p>
+
+<div class="source">
+<div class="source">
+<pre>    /home/joe/asterix-mgmt&gt; $ managix validate
+      INFO: Environment [OK]
+      INFO: Managix Configuration [OK]
+
+
+    /home/joe/asterix-mgmt&gt; $ managix validate -c clusters/local/local.xml
+      INFO: Environment [OK]
+      INFO: Cluster configuration [OK]
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Creating_an_AsterixDB_instance"></a>Creating an AsterixDB instance</h3>
+<p>Now that we have configured Managix, we shall next create an AsterixDB instance. An AsterixDB instance is identified by a unique name and is created using the <tt>create</tt> command. The usage description for the <tt>create</tt> command can be obtained by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd create
+     Creates an AsterixDB instance with a specified name. Post creation, the instance is in ACTIVE state,
+     indicating its availability for executing statements/queries.
+     Usage arguments/options:
+     -n Name of the AsterixDB instance.
+     -c Path to the cluster configuration file
+</pre></div></div>
+<p>We shall now use the <tt>create</tt> command to create an AsterixDB instance by the name &#x201c;my_asterix&#x201d;. In doing so, we shall use the cluster configuration file that was auto-generated by Managix.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix create -n my_asterix -c clusters/local/local.xml
+</pre></div></div>
+<p>A sample output of the above command is shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    INFO: Name:my_asterix
+    Created:Thu Mar 07 11:14:13 PST 2013
+    Web-Url:http://127.0.0.1:19001
+    State:ACTIVE
+</pre></div></div>
+<p>The third line above shows the web-url <a class="externalLink" href="http://127.0.0.1:19001">http://127.0.0.1:19001</a> for an AsterixDB&#x2019;s web interface. The AsterixDB instance is in the &#x2018;ACTIVE&#x2019; state, indicating that you may access the web interface by navigating to the web url.</p>
+<p>Type in the following &#x201c;Hello World&#x201d; query in the box:</p>
+
+<div class="source">
+<div class="source">
+<pre>    let $message := 'Hello World!'
+    return $message
+</pre></div></div>
+<p>Press the &#x201c;Run&#x201d; button. If the query result shows on the output box, then Congratulations! You have successfully created an AsterixDB instance!</p></div></div>
+<div class="section">
+<h2><a name="Section_2:_Single-Machine_AsterixDB_installation_Advanced_Back_to_TOC"></a><a name="Section2SingleMachineAsterixDBInstallationAdvanced" id="Section2SingleMachineAsterixDBInstallationAdvanced">Section 2: Single-Machine AsterixDB installation (Advanced)</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We assume that you have successfully completed the single-machine AsterixDB installation by following the instructions above in section <a href="#Section_1:_Single-Machine_AsterixDB_installation">AsterixDB installation</a>. In this section, we shall cover advanced topics related to AsterixDB configuration. Before we proceed, it is imperative to go through some preliminary concepts related to AsterixDB runtime.</p>
+<div class="section">
+<h3><a name="AsterixDB_Runtime"></a>AsterixDB Runtime</h3>
+<p>An AsterixDB runtime comprises of a &#x2018;&#x2018;master node&#x2019;&#x2019; and a set of &#x2018;&#x2018;worker nodes&#x2019;&#x2019;, each identified by a unique id. The master node runs a &#x2018;&#x2018;Cluster Controller&#x2019;&#x2019; service (a.k.a. &#x2018;&#x2018;CC&#x2019;&#x2019;), while each worker node runs a &#x2018;&#x2018;Node Controller&#x2019;&#x2019; service (a.k.a. &#x2018;&#x2018;NC&#x2019;&#x2019;). Please note that a node in an AsterixDB cluster is a logical concept in the sense that multiple nodes may map to a single physical machine, which is the case for a single-machine AsterixDB installation. This association or mapping between an AsterixDB node and a physical machine is captured in a cluster configuration XML file. In addition, the XML file contains properties and parameters associated with each node.</p>
+<div class="section">
+<h4><a name="AsterixDB_Runtime_Configuration"></a>AsterixDB Runtime Configuration</h4>
+<p>As observed earlier, Managix can auto-configure itself for a single-machine setup. As part of auto-configuration, Managix generated the cluster XML file. Let us understand the components of the generated cluster XML file. If you have configured Managix (via the <tt>configure</tt> command), you can find a similar cluster XML file as $MANAGIX_HOME/clusters/local/local.xml. The following is a sample XML file generated on a Ubuntu (Linux) setup:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
+    &lt;cluster xmlns=&quot;cluster&quot;&gt;
+        &lt;name&gt;local&lt;/name&gt;
+        &lt;java_home&gt;/usr/lib/jvm/jdk1.7.0&lt;/java_home&gt;
+        &lt;log_dir&gt;/home/joe/asterix-mgmt/clusters/local/working_dir/logs&lt;/log_dir&gt;
+        &lt;txn_log_dir&gt;/home/joe/asterix-mgmt/clusters/local/working_dir/logs&lt;/txn_log_dir&gt;
+        &lt;iodevices&gt;/home/joe/asterix-mgmt/clusters/local/working_dir&lt;/iodevices&gt;
+        &lt;store&gt;storage&lt;/store&gt;
+        &lt;working_dir&gt;
+            &lt;dir&gt;/home/joe/asterix-mgmt/clusters/local/working_dir&lt;/dir&gt;
+            &lt;NFS&gt;true&lt;/NFS&gt;
+        &lt;/working_dir&gt;
+        &lt;master_node&gt;
+            &lt;id&gt;master&lt;/id&gt;
+            &lt;client_ip&gt;127.0.0.1&lt;/client_ip&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+            &lt;client_port&gt;1098&lt;/client_port&gt;
+            &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+            &lt;http_port&gt;8888&lt;/http_port&gt;
+        &lt;/master_node&gt;
+        &lt;node&gt;
+            &lt;id&gt;node1&lt;/id&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+    &lt;/cluster&gt;
+</pre></div></div>
+<p>We shall next explain the components of the cluster configuration XML file.</p></div>
+<div class="section">
+<h4><a name="a1_Defining_nodes_in_AsterixDB_runtime"></a>(1) Defining nodes in AsterixDB runtime</h4>
+<p>The single-machine AsterixDB instance configuration that is auto-generated by Managix (using the <tt>configure</tt> command) involves a master node (CC) and a worker node (NC). Each node is assigned a unique id and provided with an ip address (called &#x2018;&#x2018;cluster_ip&#x2019;&#x2019;) that maps a node to a physical machine. The following snippet from the above XML file captures the master/worker nodes in our AsterixDB installation.</p>
+
+<div class="source">
+<div class="source">
+<pre>        &lt;master_node&gt;
+            &lt;id&gt;master&lt;/id&gt;
+            &lt;client_ip&gt;127.0.0.1&lt;/client_ip&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+            &lt;client_port&gt;1098&lt;/client_port&gt;
+            &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+            &lt;http_port&gt;8888&lt;/http_port&gt;
+        &lt;/master_node&gt;
+        &lt;node&gt;
+            &lt;id&gt;node1&lt;/id&gt;
+            &lt;cluster_ip&gt;127.0.0.1&lt;/cluster_ip&gt;
+        &lt;/node&gt;
+</pre></div></div>
+<p>The following is a description of the different elements in the cluster configuration xml file.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Property</td>
+  
+<td>Description</td>
+</tr>
+
+<tr class="b">
+  
+<td>id</td>
+  
+<td>A unique id for a node.</td>
+</tr>
+
+<tr class="a">
+  
+<td>cluster_ip</td>
+  
+<td>IP address of the machine to which a node maps to. This address is used for all internal communication between the nodes.</td>
+</tr>
+
+<tr class="b">
+  
+<td>client_ip</td>
+  
+<td>Provided for the master node. This IP should be reachable from clients that want to connect with AsterixDB via its web interface.</td>
+</tr>
+
+<tr class="a">
+  
+<td>client_port</td>
+  
+<td>Provided for the master node. This is the port at which the Cluster Controller (CC) service listens for connections from clients.</td>
+</tr>
+
+<tr class="b">
+  
+<td>cluster_port</td>
+  
+<td>Provided for the master node. This is the port used by the Cluster Controller (CC) service to listen for connections from Node Controllers (NCs). </td>
+</tr>
+
+<tr class="a">
+  
+<td>http-port</td>
+  
+<td>Provided for the master node. This is the http port used by the Cluster Controller (CC) service. </td>
+</tr>
+
+</table></div>
+<div class="section">
+<h4><a name="a2_Properties_associated_with_a_worker_node_NC_in_AsterixDB"></a>(2) Properties associated with a worker node (NC) in AsterixDB</h4>
+<p>The following is a list of properties associated with each worker node in an AsterixDB configuration.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Property</td>
+  
+<td>Description</td>
+</tr>
+
+<tr class="b">
+  
+<td>java_home</td>
+  
+<td>Java installation directory at each node.</td>
+</tr>
+
+<tr class="a">
+  
+<td>log_dir</td>
+  
+<td>A directory where the worker node JVM may write logs.</td>
+</tr>
+
+<tr class="b">
+  
+<td>txn_log_dir</td>
+  
+<td>A directory where the worker node writes transaction logs.</td>
+</tr>
+
+<tr class="a">
+  
+<td>iodevices</td>
+  
+<td>Comma separated list of IO Device mount points.</td>
+</tr>
+
+<tr class="b">
+  
+<td>store</td>
+  
+<td>A data directory (under each iodevice) that AsterixDB uses to store data belonging to dataset(s).</td>
+</tr>
+</table>
+<p>All the above properties can be defined at the global level or a local level. In the former case, these properties apply to all the nodes in an AsterixDB configuration. In the latter case, these properties apply only to the node(s) under which they are defined. A property defined at the local level overrides the definition at the global level.</p></div>
+<div class="section">
+<h4><a name="a3_Working_directory_of_an_AsterixDB_instance"></a>(3) Working directory of an AsterixDB instance</h4>
+<p>Next we explain the following setting in the file $MANAGIX_HOME/clusters/local/local.xml.</p>
+
+<div class="source">
+<div class="source">
+<pre>        &lt;working_dir&gt;
+            &lt;dir&gt;/Users/joe/asterix-mgmt/clusters/local/working_dir&lt;/dir&gt;
+            &lt;NFS&gt;true&lt;/NFS&gt;
+        &lt;/working_dir&gt;
+</pre></div></div>
+<p>Managix associates a working directory with an AsterixDB instance and uses this directory for transferring binaries to each node. If there is a directory that is readable by each node, Managix can use it to place binaries that can be accessed and used by all the nodes in the AsterixDB set up. A network file system (NFS) provides such a functionality for a cluster of physical machines so that a path on NFS is accessible from each machine in the cluster. In the single-machine set up described above, all nodes correspond to a single physical machine. Each path on the local file system is accessible to all the nodes in the AsterixDB setup and the boolean value for NFS above is thus set to <tt>true</tt>.</p></div></div>
+<div class="section">
+<h3><a name="Managix_Configuration"></a>Managix Configuration</h3>
+<p>Managix allows creation and management of multiple AsterixDB instances and uses Zookeeper as its back-end database to keep track of information related to each instance. We need to provide a set of one or more hosts that Managix can use to run a Zookeeper instance. Zookeeper runs as a daemon process on each of the specified hosts. At each host, Zookeeper stores data under the Zookeeper home directory specified as part of the configuration. The following is an example configuration <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt> that has Zookeeper running on the localhost (127.0.0.1) :</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
+    &lt;configuration xmlns=&quot;installer&quot;&gt;
+        &lt;zookeeper&gt;
+            &lt;homeDir&gt;/home/joe/asterix/.installer/zookeeper&lt;/homeDir&gt;
+            &lt;clientPort&gt;2900&lt;/clientPort&gt;
+            &lt;servers&gt;
+                &lt;server&gt;127.0.0.1&lt;/server&gt;
+            &lt;/servers&gt;
+        &lt;/zookeeper&gt;
+    &lt;/configuration&gt;
+</pre></div></div>
+<p>It is possible to have a single host for Zookeeper. A larger number of hosts would use Zookeeper&#x2019;s replication and fault-tolerance feature such that a failure of a host running Zookeeper would not result in loss of information about existing AsterixDB instances.</p></div></div>
+<div class="section">
+<h2><a name="Section_3:_Installing_AsterixDB_on_a_Cluster_of_Multiple_MachinesBack_to_TOC"></a><a name="Section3InstallingAsterixDBOnAClusterOfMultipleMachines" id="Section3InstallingAsterixDBOnAClusterOfMultipleMachines">Section 3: Installing AsterixDB on a Cluster of Multiple Machines</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We assume that you have read the two sections above on single-machine AsterixDB setup. Next we explain how to install AsterixDB in a cluster of multiple machines. As an example, we assume we want to setup AsterixDB on a cluster of three machines, in which we use one machine (called machine A) as the master node and two other machines (called machine B and machine C) as the worker nodes, as shown in the following diagram:</p>
+<p><img src="images/AsterixCluster.png" alt="AsterixCluster" /></p>
+<p>Notice that each machine has a &#x2018;&#x2018;cluster_ip&#x2019;&#x2019; address, which is used by these machines for their intra-cluster communication. Meanwhile, the master machine also has a &#x2018;&#x2018;client_ip&#x2019;&#x2019; address, using which an end-user outside the cluster can communicate with this machine. The reason we differentiate between these two types of IP addresses is that we can have a cluster of machines using a private network. In this case they have internal ip addresses that cannot be used outside the network. In the case all the machines are on a public network, the &#x201c;client_ip&#x201d; and &#x201c;cluster_ip&#x201d; of the master machine can share the same address.</p>
+<p>Next we describe how to set up AsterixDB in this cluster, assuming no Managix has been installed on these machines.</p>
+<div class="section">
+<h3><a name="Step_1:_Configure_SSH"></a>Step (1): Configure SSH</h3>
+<p>The steps of setting up SSH are similar to those in the single-machine setup case. We assume we have a common user account called &#x201c;joe&#x201d; on each machine in the cluster.</p>
+<p>On the master machine, do the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; ssh 127.0.0.1
+</pre></div></div>
+<p>If you get an output similar to one shown below, type &#x201c;yes&#x201d; and press enter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
+    RSA key fingerprint is aa:7b:51:90:74:39:c4:f6:28:a2:9d:47:c2:8d:33:31.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>If you are not prompted for a password, that is if you get an output similar to one shown below, it signifies that you already have password-less SSH configured. </p>
+
+<div class="source">
+<div class="source">
+<pre>    $ ssh 127.0.0.1
+    Last login: Sat Mar 23 22:52:49 2013
+</pre></div></div>
+<p>[Important: Password-less SSH requires the use of a (public,private) key-pair. The key-pair is located as a pair of files under  $HOME/.ssh directory. It is required that the (public,private) key-pair files have default names (id_rsa.pub, id_rsa) respectively.  If you are using different names, please rename the files to use the default names]</p>
+<p>If you are prompted for a password, execute the following</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; ssh-keygen -t rsa -P &quot;&quot;
+    machineA&gt; cat $HOME/.ssh/id_rsa.pub &gt;&gt; $HOME/.ssh/authorized_keys
+    machineA&gt; chmod 700  $HOME/.ssh/authorized_keys
+</pre></div></div>
+<p>If $HOME is not on the NFS, copy the id_rsa.pub to the directory ~/.ssh (login with the same account) on each machine, and then do the following on each machine. (Notice that this step is not needed if the folder &#x201c;.ssh&#x201d; is on the NFS and can be accessed by all the nodes.)</p>
+
+<div class="source">
+<div class="source">
+<pre>    cd ~/.ssh
+    cat id_rsa.pub &gt;&gt; authorized_keys
+    chmod 700  $HOME/.ssh/authorized_keys
+</pre></div></div>
+<p>Then run the following step again and type &#x201c;yes&#x201d; if prompted:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; ssh 127.0.0.1
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Step_2:_Define_the_AsterixDB_cluster"></a>Step (2): Define the AsterixDB cluster</h3>
+<p>We first log into the master machine as the user &#x201c;joe&#x201d;. On this machine, download Managix from <a class="externalLink" href="http://asterixdb.ics.uci.edu/download.html">here</a> (save as above), then do the following steps similar to the single-machine case described above:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; cd ~
+    machineA&gt; mkdir asterix-mgmt
+    machineA&gt; cd asterix-mgmt
+    machineA&gt; unzip  &lt;path to the Managix zip bundle&gt;
+</pre></div></div>
+<p>Note that it is recommended that MANAGIX_HOME is not located on a network file system (NFS). Managix creates artifacts/logs that are not required to be shared. Any overhead associated with creating artifacts/logs on the NFS should be avoided.</p>
+<p>We also need an AsterixDB configuration XML file for the cluster. We give the name to the cluster, say, &#x201c;rainbow&#x201d;. We create a folder for the configuration of this cluster:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; mkdir asterix-mgmt/rainbow_cluster
+</pre></div></div>
+<p>For this cluster we create a configuration file <tt>$MANAGIX_HOME/rainbow_cluster/rainbow.xml</tt>. The following is a sample file with explanation of the properties:</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;cluster xmlns=&quot;cluster&quot;&gt;
+
+      &lt;!-- Name of the cluster --&gt;
+      &lt;name&gt;rainbow&lt;/name&gt;
+
+      &lt;!-- username, which should be valid for all the three machines --&gt;
+      &lt;username&gt;joe&lt;/username&gt;
+
+      &lt;!-- The working directory of Managix. It is recommended for the working
+           directory to be on a network file system (NFS) that can accessed by
+           all machines.
+           Managix creates the directory if it it doesn't exist. --&gt;
+      &lt;working_dir&gt;
+        &lt;dir&gt;/home/joe/managix-workingDir&lt;/dir&gt;
+        &lt;NFS&gt;true&lt;/NFS&gt;
+      &lt;/working_dir&gt;
+
+      &lt;!-- Directory for Asterix to store worker logs information for each machine.
+           Needs to be on the local file system of each machine.
+           Managix creates the directory if it doesn't exist.
+           This property can be overriden for a node by redefining at the node level. --&gt;
+      &lt;log_dir&gt;/mnt/joe/logs&lt;/log_dir&gt;
+
+      &lt;!-- Directory for Asterix to store transaction log information for each machine.
+           Needs to be on the local file system of each machine.
+           Managix creates the directory if it doesn't exist.
+           This property can be overriden for a node by redefining at the node level. --&gt;
+      &lt;txn_log_dir&gt;/mnt/joe/txn_logs&lt;/txn_log_dir&gt;
+
+      &lt;!-- Mount point of an iodevice. Use a comma separated list for a machine that
+           has multiple iodevices (disks).
+           This property can be overriden for a node by redefining at the node level. --&gt;
+      &lt;iodevices&gt;/mnt/joe&lt;/iodevices&gt;
+
+      &lt;!-- Path on each iodevice where Asterix will store its data --&gt;
+      &lt;store&gt;storage&lt;/store&gt;
+
+      &lt;!-- Java home for each machine --&gt;
+      &lt;java_home&gt;/usr/lib/jvm/jdk1.7.0&lt;/java_home&gt;
+
+      &lt;!-- IP addresses of the master machine A --&gt;
+      &lt;master_node&gt;
+        &lt;id&gt;master&lt;/id&gt;
+        &lt;client_ip&gt;128.195.52.177&lt;/client_ip&gt;
+        &lt;cluster_ip&gt;192.168.100.0&lt;/cluster_ip&gt;
+        &lt;client_port&gt;1098&lt;/client_port&gt;
+        &lt;cluster_port&gt;1099&lt;/cluster_port&gt;
+        &lt;http_port&gt;8888&lt;/http_port&gt;
+      &lt;/master_node&gt;
+
+      &lt;!-- IP address(es) of machine B --&gt;
+      &lt;node&gt;
+        &lt;id&gt;nodeB&lt;/id&gt;
+        &lt;cluster_ip&gt;192.168.100.1&lt;/cluster_ip&gt;
+      &lt;/node&gt;
+
+       &lt;!-- IP address(es) of machine C --&gt;
+      &lt;node&gt;
+        &lt;id&gt;nodeC&lt;/id&gt;
+        &lt;cluster_ip&gt;192.168.100.2&lt;/cluster_ip&gt;
+      &lt;/node&gt;
+    &lt;/cluster&gt;
+</pre></div></div>
+<p>As stated before, each of the above properties can be defined at the cluster level, in which case it applies to all the nodes in the system. Each property can also be defined at a node level.</p>
+<p>Once we have formed the cluster XML file, we can validate the configuration by doing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    managix validate -c rainbow_cluster/rainbow.xml
+</pre></div></div>
+<p>This will verify the contents of the file, and also attempt to ssh to each node in the cluster to ensure that password-less SSH is configured correctly. You may see output like</p>
+
+<div class="source">
+<div class="source">
+<pre>    The authenticity of host '192.168.100.1 (192.168.100.1)' can't be established.
+    RSA key fingerprint is 89:80:31:1f:be:51:16:d7:2b:f5:e0:b3:2c:bd:83:94.
+    Are you sure you want to continue connecting (yes/no)?
+</pre></div></div>
+<p>and this output may be repeated for each node in the cluster. Answer &#x201c;yes&#x201d; each time.</p>
+<p>If the final output contains the following lines (possibly separated by the RSA prompts mentione above):</p>
+
+<div class="source">
+<div class="source">
+<pre>    INFO: Environment [OK]
+    INFO: Cluster configuration [OK]
+</pre></div></div>
+<p>it means that the XML configuration file is correct!</p></div>
+<div class="section">
+<h3><a name="Step_3:_Configuring_Managix"></a>Step (3): Configuring Managix</h3>
+<p>Managix uses a configuration XML file at <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt> to configure its own properties, such as its Zookeeper service. We can use the <tt>configure</tt> command to auto-generate this configuration file:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix configure
+</pre></div></div>
+<p>We use the <tt>validate</tt> command to validate the Managix configuration. To do so, execute the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix validate
+    INFO: Environment [OK]
+    INFO: Managix Configuration [OK]
+</pre></div></div>
+<p>Note that the <tt>configure</tt> command also generates a cluster configuration XML file at $MANAGIX_HOME/clusters/local/local.xml. This file is not needed in the case of a cluster of machines.</p></div>
+<div class="section">
+<h3><a name="Step_4:_Creating_an_AsterixDB_instance"></a>Step (4): Creating an AsterixDB instance</h3>
+<p>Now that we have configured Managix, we shall next create an AsterixDB instance, which is identified by a unique name and is created using the <tt>create</tt> command. The usage description for the <tt>create</tt> command can be obtained by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix help -cmd create
+
+     Creates an AsterixDB instance with a specified name. Post creation, the instance is in ACTIVE state,
+     indicating its availability for executing statements/queries.
+     Usage arguments/options:
+     -n Name of the AsterixDB instance.
+     -c Path to the cluster configuration file
+</pre></div></div>
+<p>We shall now use the <tt>create</tt> command to create an AsterixDB instance called &#x201c;rainbow_asterix&#x201d;. In doing so, we shall use the cluster configuration file that was auto-generated by Managix.</p>
+
+<div class="source">
+<div class="source">
+<pre>    machineA&gt; managix create -n rainbow_asterix -c clusters/rainbow.xml
+</pre></div></div>
+<p>If the response message does not have warning, then Congratulations! You have successfully installed AsterixDB on this cluster of machines!</p>
+<p>Please refer to the section <a href="#Section_4:_Managing_the_Lifecycle_of_an_AsterixDB_Instance">Managing the Lifecycle of an AsterixDB Instance</a> for a detailed description on the set of available commands/operations that let you manage the lifecycle of an AsterixDB instance. Note that the output of the commands varies with the cluster definition and may not apply to the cluster specification you built above.</p></div></div>
+<div class="section">
+<h2><a name="Section_4:_Managing_the_Lifecycle_of_an_AsterixDB_Instance_Back_to_TOC"></a><a name="Section4ManagingTheLifecycleOfAnAsterixDBInstance" id="Section4ManagingTheLifecycleOfAnAsterixDBInstance">Section 4: Managing the Lifecycle of an AsterixDB Instance</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Now that we have an AsterixDB instance running, let us use Managix to manage the instance&#x2019;s lifecycle. Managix provides the following set of commands/operations:</p>
+<div class="section">
+<div class="section">
+<h4><a name="Managix_Commands"></a>Managix Commands</h4>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+<td>Command</td>  
+<td>Description</td></tr>
+
+<tr class="b">
+<td><a href="#Creating_an_AsterixDB_instance">create</a></td>   
+<td>Creates a new asterix instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Describe_Command">describe</a></td> 
+<td>Describes an existing asterix instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Stop_Command">stop</a></td>     
+<td>Stops an asterix instance that is in the ACTIVE state.</td></tr>
+
+<tr class="a">
+<td><a href="#Start_Command">start</a></td>    
+<td>Starts an AsterixDB instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Backup_Command">backup</a></td>   
+<td>Creates a backup for an existing AsterixDB instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Restore_Command">restore</a></td>  
+<td>Restores an AsterixDB instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Delete_Command">delete</a></td>   
+<td>Deletes an AsterixDB instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Configuring_Managix">validate</a></td> 
+<td>Validates the installer/cluster configuration.</td></tr>
+
+<tr class="b">
+<td><a href="#Configuring_Managix">configure</a></td>
+<td>Auto generates a configuration for an AsterixDB instance.</td></tr>
+
+<tr class="a">
+<td><a href="#Log_Command">log</a></td>
+<td>Produces a zip archive containing log files from each node in an AsterixDB instance.</td></tr>
+
+<tr class="b">
+<td><a href="#Shutdown_Command">shutdown</a></td> 
+<td>Shuts down the installer service.</td></tr>
+</table>
+<p>You may obtain the above listing by simply executing &#x2018;managix&#x2019; :</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix
+</pre></div></div>
+<p>We already talked about <tt>create</tt> and <tt>validate</tt> commands. We shall next explain the rest of the commands listed above. We also provide sample output messages of these commands assuming we are running an AsterixDB instance on a single machine.</p>
+<div class="section">
+<h5><a name="Describe_Command"></a>Describe Command</h5>
+<p>The <tt>describe</tt> command provides information about an AsterixDB instance. The usage can be looked up by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd describe
+
+        Provides information about an AsterixDB instance.
+        The following options are available:
+        [-n]      Name of the AsterixDB instance.
+        [-admin]  Provides a detailed description
+</pre></div></div>
+<p>The brackets indicate optional flags.</p>
+<p>The output of the <tt>describe</tt> command when used without the <tt>admin</tt> flag contains minimal information and is similar to the output of the <tt>create</tt> command. Let us try running the describe command in &#x201c;admin&#x201d; mode.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix describe -n my_asterix -admin
+     INFO: Name:my_asterix
+     Created:Thu Mar 07 19:07:00 PST 2013
+     Web-Url:http://127.0.0.1:19001
+     State:ACTIVE
+     Master node:master:127.0.0.1
+     node1:127.0.0.1
+
+     Asterix version:0.0.5
+     Asterix Configuration
+     output_dir = /tmp/asterix_output/
+     Metadata Node:node1
+     Processes
+     NC at 127.0.0.1 [ 22195 ]
+     CC at 127.0.0.1 [ 22161 ]
+
+     Asterix Configuration
+       nc.java.opts                             :-Xmx1024m
+       cc.java.opts                             :-Xmx1024m
+       storage.buffercache.pagesize             :32768
+       storage.buffercache.size                 :33554432
+       storage.buffercache.maxopenfiles         :214748364
+       storage.memorycomponent.pagesize         :32768
+       storage.memorycomponent.numpages         :1024
+       storage.memorycomponent.globalbudget     :536870192
+       storage.lsm.mergethreshold               :3
+       storage.lsm.bloomfilter.falsepositiverate:0.01
+       txn.log.buffer.numpages                  :8
+       txn.log.buffer.pagesize                  :131072
+       txn.log.partitionsize                    :2147483648
+       txn.log.disksectorsize                   :4096
+       txn.log.groupcommitinterval              :1
+       txn.log.checkpoint.lsnthreshold          :67108864
+       txn.log.checkpoint.pollfrequency         :120
+       txn.log.checkpoint.history               :0
+       txn.lock.escalationthreshold             :1000
+       txn.lock.shrinktimer                     :5000
+       txn.lock.timeout.waitthreshold           :60000
+       txn.lock.timeout.sweepthreshold          :10000
+       compiler.sortmemory                      :33554432
+       compiler.joinmemory                      :33554432
+       compiler.framesize                       :32768
+       web.port                                 :19001
+       api.port                                 :19002
+       log.level                                :INFO
+</pre></div></div>
+<p>As seen above, the instance &#x2018;my_asterix&#x2019; is configured such that all processes running at the localhost (127.0.0.1). The process id for each process (JVM) is shown next to it.</p></div>
+<div class="section">
+<h5><a name="Stop_Command"></a>Stop Command</h5>
+<p>The <tt>stop</tt> command can be used for shutting down an AsterixDB instance. After that, the instance is unavailable for executing queries. The usage can be looked up by executing the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd stop
+
+     Shuts an AsterixDB instance that is in ACTIVE state. After executing the stop command, the AsterixDB instance transits
+     to the INACTIVE state, indicating that it is no longer available for executing queries.
+
+     Available arguments/options
+     -n name of the AsterixDB instance.
+</pre></div></div>
+<p>To stop the AsterixDB instance.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix stop -n my_asterix
+       INFO: Stopped AsterixDB instance: my_asterix
+
+
+     $ managix describe -n my_asterix
+       INFO: Name: my_asterix
+       Created:Thu Mar 07 19:07:00 PST 2013
+       Web-Url:http://127.0.0.1:19001
+       State:INACTIVE (Fri Mar 08 09:49:00 PST 2013)
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Start_Command"></a>Start Command</h5>
+<p>The <tt>start</tt> command starts an AsterixDB instance that is in the INACTIVE state. The usage can be looked up by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix help -cmd start
+
+     Starts an AsterixDB instance that is in INACTIVE state. After executing the start command, the AsterixDB instance transits to the ACTIVE state,  indicating that it is now available for executing statements/queries.
+
+     Available arguments/options
+     -n name of the AsterixDB instance.
+</pre></div></div>
+<p>Let us now start the AsterixDB instance.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix start -n my_asterix
+       INFO: Name:my_asterix
+       Created:Thu Mar 07 19:07:00 PST 2013
+       Web-Url:http://127.0.0.1:19001
+       State:ACTIVE (Fri Mar 08 09:49:00 PST 2013)
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Backup_Command"></a>Backup Command</h5>
+<p>The backup command allows you to take a backup of the data stored with an AsterixDB instance. The backup can be taken on the local file system or on an HDFS instance. In either case, the snapshots are stored under a backup directory. You need to make sure the backup directory has appropriate read/write permissions. Configuring settings for backup can be found inside the Managix&#x2019;s configuration file located at <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt>.</p>
+<p><i>Configuring backup on the local file system</i></p>
+<p>We need to provide a path to a backup directory on the local file system. The backup directory can be configured be editing the Managix configuration XML, found at <tt>$MANAGIX_HOME/conf/managix-conf.xml</tt>.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;backup&gt;
+      &lt;backupDir&gt;Provide path to the backup directory here&lt;/backupDir&gt;
+    &lt;/backup&gt;
+</pre></div></div>
+<p>Prior to taking a backup of an AsterixDB instance, it is required for the instance to be in the INACTIVE state. We do so by using the <tt>stop</tt> command, as shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix stop -n my_asterix
+      INFO: Stopped AsterixDB instance: my_asterix
+</pre></div></div>
+<p>We can now take the backup by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix backup -n my_asterix
+      INFO: my_asterix backed up 0_Fri Mar 08 16:16:34 PST 2013 (LOCAL)
+</pre></div></div>
+<p><i>Configuring backup on an HDFS instance</i></p>
+<p>To configure a backup to be taken on an HDFS instance, we need to provide required information about the running HDFS instance. This information includes the HDFS version and the HDFS url. Simply edit the Managix configuration file and provide the required information.</p>
+
+<div class="source">
+<div class="source">
+<pre>    &lt;backup&gt;
+       &lt;backupDir&gt;Provide path to the backup directory here&lt;/backupDir&gt;
+       &lt;hdfs&gt;
+           &lt;version&gt;0.20.2&lt;/version&gt;
+           &lt;url&gt;&lt;/url&gt;
+       &lt;/hdfs&gt;
+    &lt;/backup&gt;
+</pre></div></div>
+<p>A sample output when a backup is taken on an HDFS is shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix backup -n my_asterix
+      INFO: my_asterix backed up 1_Fri Mar 08 17:10:38 PST 2013 (HDFS)
+</pre></div></div>
+<p>Each time we take a backup, we are provided with a unique id (a monotonically increasing value starting with 0). This id is required when we need to restore from a previously taken backup. Information about all available backup snapshots can be obtained by using the <tt>describe</tt> command in the admin mode, as shown below:</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix describe -n my_asterix -admin
+     INFO: Name:my_asterix
+     Created:Fri Mar 08 15:11:12 PST 2013
+     Web-Url:http://127.0.0.1:19001
+     State:INACTIVE (Fri Mar 08 16:14:20 PST 2013)
+     Master node:master:127.0.0.1
+     node1:127.0.0.1
+
+     Backup:0 created at Fri Mar 08 16:16:34 PST 2013 (LOCAL)
+     Backup:1 created at Fri Mar 08 17:10:38 PST 2013 (HDFS)
+
+     Asterix version:0.0.5
+     Asterix Configuration
+     Metadata Node:node1
+     Processes
+</pre></div></div>
+<p>The above output shows the available backup identified by it&#x2019;s id (0). We shall next describe the method for restoring an AsterixDB instance from a backup snapshot.</p></div>
+<div class="section">
+<h5><a name="Restore_Command"></a>Restore Command</h5>
+<p>The <tt>restore</tt> command allows you to restore an AsterixDB instance&#x2019;s data from a previously taken backup. The usage description can be obtained as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix help -cmd restore
+
+      Restores an AsterixDB instance's data from a previously taken backup.
+      Available arguments/options
+
+      -n name of the AsterixDB instance
+      -b id of the backup snapshot
+</pre></div></div>
+<p>The following command restores our AsterixDB instance from the backup snapshot identified by the id (0). Prior to restoring an instance from a backup, it is required that the instance is in the INACTIVE state.</p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix restore -n my_asterix -b 0
+     INFO: AsterixDB instance: my_asterix has been restored from backup
+</pre></div></div>
+<p>You can start the AsterixDB instance by using the start command.</p></div>
+<div class="section">
+<h5><a name="Log_Command"></a>Log Command</h5>
+<p>The <tt>log</tt> command allows you to collect the log files coresponding to each node of an AsterixDB instance into a zip archive. The zip archive is produced on the local file system of the machine running managix. </p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix help -cmd log
+
+      Creates a zip archive containing log files corresponding to each worker node (NC) and the master (CC)  for an AsterixDB instance
+
+      Available arguments/options
+      -n name of the AsterixDB instance. 
+      -d destination directory for producing the zip archive. Defaults to $MANAGIX_HOME/logdump.
+</pre></div></div>
+<p>The following is an example showing the use of the log command. </p>
+
+<div class="source">
+<div class="source">
+<pre>     $ managix log -n my_asterix -d  /Users/joe/logdump
+     INFO: Log zip archive created at /Users/joe/logdump/log_Thu_Jun_06_00:53:51_PDT_2013.zip
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Delete_Command"></a>Delete Command</h5>
+<p>As the name suggests, the <tt>delete</tt> command permanently removes an AsterixDB instance by cleaning up all associated data/artifacts. The usage can be looked up by executing the following:</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix help -cmd delete
+      Permanently deletes an AsterixDB instance. The instance must be in the INACTIVE state.
+
+      Available arguments/options
+      -n name of the AsterixDB instance.
+
+
+      $ managix delete -n my_asterix
+       INFO: AsterixDB instance my_asterix deleted.
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Shutdown_Command"></a>Shutdown Command</h5>
+<p>Managix uses Zookeeper service for storing all information about created AsterixDB instances. The Zookeeper service runs in the background and can be shut down using the <tt>shutdown</tt> command.</p>
+
+<div class="source">
+<div class="source">
+<pre>      $ managix shutdown
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Help_Command"></a>Help Command</h5>
+<p>The <tt>help</tt> command provides a usage description of a Managix command.</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix help -cmd &lt;command name&gt;
+</pre></div></div>
+<p>As an example, for looking up the help for the <tt>configure</tt> command, execute the following</p>
+
+<div class="source">
+<div class="source">
+<pre>    $ managix help -cmd configure
+
+    Auto-generates the AsterixDB installer configruation settings and AsterixDB cluster
+    configuration settings for a single node setup.
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h2><a name="Section_5:_Frequently_Asked_Questions_Back_to_TOC"></a><a name="Section5FAQ" id="Section5FAQ">Section 5: Frequently Asked Questions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>What happens if a machine acting as a node in the Asterix cluster becomes unreachable for some reason (network partition/machine failure) ?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>When a node leaves the Asterix cluster, the AsterixDB instance transits to an &#x2018;UNUSABLE&#x2019; state, indicating that it is no longer available for serving queries. To know which set of node(s) left the cluster, run the describe command with -admin flag. </p>
+
+<div class="source">
+<div class="source">
+<pre>    $ $MANAGIX_HOME/bin/managix describe -n &lt;name of the AsterixDB instance&gt;-admin
+</pre></div></div>
+<p>Above command will show the state of AsterixDB instance and list the set of nodes that have left the cluster. </p>
+<p>The failed node must be brought back to re-join the cluster. Once done, you may bring back the instance to an &#x2018;ACTIVE&#x2019; state by executing the following sequence. </p>
+<p>1) Get rid of the Asterix processes running on the nodes in the cluster:-</p>
+
+<div class="source">
+<div class="source">
+<pre>    managix stop -n my_asterix
+</pre></div></div>
+<p>The processes associated with the instance are terminated and the instance moves to the INACTIVE state.</p>
+<p>2) Start the AsterixDB instance using the start command.</p>
+
+<div class="source">
+<div class="source">
+<pre>    managix start -n &lt;name of your AsterixDB instance&gt;
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>Do I need to create all the directories/paths I put into the cluster configuration XML ?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>Managix will create a path if it is not existing. It does so using the user account mentioned in the cluster configuration xml. Please ensure that the user account has appropriate permissions for creating the missing paths. </p></div>
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>Should MANAGIX_HOME be on the network file system (NFS) ?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>It is recommended that MANAGIX_HOME is not on the NFS. Managix produces artifacts/logs on disk which are not required to be shared. As such an overhead in creating the artifacts/logs on the NFS should be avoided.</p></div>
+<div class="section">
+<h5><a name="Question"></a>Question</h5>
+<p>How do we change the underlying code (apply a code patch) for an &#x2018;active&#x2019; asterix instance?</p></div>
+<div class="section">
+<h5><a name="Answer"></a>Answer</h5>
+<p>At times, end-user (particularly asterix developer) may run into the need to altering the underlying code that is being run by an asterix instance. In the current version of managix, this can be achieved as follows:-</p>
+<p>Assume that you have an &#x2018;active&#x2019; instance by the name a1 that is running version v1 of asterix. You have a revised version of asterix - v2 that fixes some bug(s).</p>
+<p>To upgrade asterix from v1 to v2:-</p>
+<p>step 1) managix stop -n a1</p>
+<p>step 2) managix shutdown</p>
+<p>step 3) copy asterix-server zip (version v2) to asterix/</p>
+<p>step 4) managix start -n a1</p>
+<p>a1 now is running on version v2.</p>
+<p>Limitations:-</p>
+<p>a) Obviously this wont work in a situation where v2 has made a change that is incompatible with earlier version, such altering schema.</p>
+<p>b) A change in asterix zip applies to all existing instances (after a restart) and subsequent instances that user creates.</p></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[23/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/aql/similarity.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/aql/similarity.html b/content/docs/0.8.8-incubating/aql/similarity.html
new file mode 100644
index 0000000..70396f7
--- /dev/null
+++ b/content/docs/0.8.8-incubating/aql/similarity.html
@@ -0,0 +1,431 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Support of Similarity Queries</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Support of Similarity Queries</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB Support of Similarity Queries</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Motivation">Motivation</a></li>
+  
+<li><a href="#DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a></li>
+  
+<li><a href="#SimilaritySelectionQueries">Similarity Selection Queries</a></li>
+  
+<li><a href="#SimilarityJoinQueries">Similarity Join Queries</a></li>
+  
+<li><a href="#UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_Back_to_TOC"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Similarity queries are widely used in applications where users need to find records that satisfy a similarity predicate, while exact matching is not sufficient. These queries are especially important for social and Web applications, where errors, abbreviations, and inconsistencies are common. As an example, we may want to find all the movies starring Schwarzenegger, while we don&#x2019;t know the exact spelling of his last name (despite his popularity in both the movie industry and politics :-)). As another example, we want to find all the Facebook users who have similar friends. To meet this type of needs, AsterixDB supports similarity queries using efficient indexes and algorithms.</p></div>
+<div class="section">
+<h2><a name="Data_Types_and_Similarity_Functions_Back_to_TOC"></a><a name="DataTypesAndSimilarityFunctions" id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> (on strings) and <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a> (on sets). For instance, in our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, the <tt>friend-ids</tt> of a Facebook user forms a set of friends, and we can define a similarity between the sets of friends of two users. We can also convert a string to a set of grams of a length &#x201c;n&#x201d; (called &#x201c;n-grams&#x201d;) and define the Jaccard similarity between the two gram sets of the two strings. Formally, the &#x201c;n-grams&#x201d; of a string are its substrings of length &#x201c;n&#x201d;. For instance, the 3-grams of the string <tt>schwarzenegger</tt> are <tt>sch</tt>, <tt>chw</tt>, <tt>hwa</tt>, &#x2026;, <tt>ger</tt>.</p>
+<p>AsterixDB provides <a href="functions.html#Tokenizing_Functions">tokenization functions</a> to convert strings to sets, and the <a href="functions.html#Similarity_Functions">similarity functions</a>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Selection_Queries_Back_to_TOC"></a><a name="SimilaritySelectionQueries" id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The following query asks for all the Facebook users whose name is similar to <tt>Suzanna Tilson</tt>, i.e., their edit distance is at most 2.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div>
+<p>The following query asks for all the Facebook users whose set of friend ids is similar to <tt>[1,5,9,10]</tt>, i.e., their Jaccard similarity is at least 0.6.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div>
+<p>AsterixDB allows a user to use a similarity operator <tt>~=</tt> to express a condition by defining the similarity function and threshold using &#x201c;set&#x201d; statements earlier. For instance, the above query can be equivalently written as:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.6f&quot;;
+
+    for $user in dataset('FacebookUsers')
+    where $user.friend-ids ~= [1,5,9,10]
+    return $user
+</pre></div></div>
+<p>In this query, we first declare Jaccard as the similarity function using <tt>simfunction</tt> and then specify the threshold <tt>0.6f</tt> using <tt>simthreshold</tt>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Join_Queries_Back_to_TOC"></a><a name="SimilarityJoinQueries" id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports fuzzy joins between two sets. The following <a href="primer.html#Query_5_-_Fuzzy_Join">query</a> finds, for each Facebook user, all Twitter users with names similar to their name based on the edit distance.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+
+    for $fbu in dataset FacebookUsers
+    return {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: for $t in dataset TweetMessages
+                            let $tu := $t.user
+                            where $tu.name ~= $fbu.name
+                            return {
+                            &quot;twitter-screenname&quot;: $tu.screen-name,
+                            &quot;twitter-name&quot;: $tu.name
+                            }
+    };
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Using_Indexes_to_Support_Similarity_Queries_Back_to_TOC"></a><a name="UsingIndexesToSupportSimilarityQueries" id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB uses two types of indexes to support similarity queries, namely &#x201c;ngram index&#x201d; and &#x201c;keyword index&#x201d;.</p>
+<div class="section">
+<h3><a name="NGram_Index"></a>NGram Index</h3>
+<p>An &#x201c;ngram index&#x201d; is constructed on a set of strings. We generate n-grams for each string, and build an inverted list for each n-gram that includes the ids of the strings with this gram. A similarity query can be answered efficiently by accessing the inverted lists of the grams in the query and counting the number of occurrences of the string ids on these inverted lists. The similar idea can be used to answer queries with Jaccard similarity. A detailed description of these techniques is available at this <a class="externalLink" href="http://www.ics.uci.edu/~chenli/pub/icde2009-memreducer.pdf">paper</a>.</p>
+<p>For instance, the following DDL statements create an ngram index on the <tt>FacebookUsers.name</tt> attribute using an inverted index of 3-grams.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create index fbUserIdx on FacebookUsers(name) type ngram(3);
+</pre></div></div>
+<p>The number &#x201c;3&#x201d; in &#x201c;ngram(3)&#x201d; is the length &#x201c;n&#x201d; in the grams. This index can be used to optimize similarity queries on this attribute using <a href="functions.html#edit-distance">edit-distance</a>, <a href="functions.html#edit-distance-check">edit-distance-check</a>, <a href="functions.html#similarity-jaccard">similarity-jaccard</a>, or <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a> queries on this attribute where the similarity is defined on sets of 3-grams. This index can also be used to optimize queries with the &#x201c;<a href="functions.html#contains">contains()</a>&#x201d; predicate (i.e., substring matching) since it can be also be solved by counting on the inverted lists of the grams in the query string.</p>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance"></a>NGram Index usage case - <a href="functions.html#edit-distance">edit-distance</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance-check"></a>NGram Index usage case - <a href="functions.html#edit-distance-check">edit-distance-check</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
+    where $ed[0]
+    return $ed[1]
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard">similarity-jaccard</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard-check"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
+    where $sim[0]
+    return $user
+</pre></div></div></div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_contains"></a>NGram Index usage case - <a href="functions.html#contains">contains()</a></h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    for $i in dataset('FacebookMessages')
+    where contains($i.message, &quot;phone&quot;)
+    return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
+</pre></div></div></div></div>
+<div class="section">
+<h3><a name="Keyword_Index"></a>Keyword Index</h3>
+<p>A &#x201c;keyword index&#x201d; is constructed on a set of strings or sets (e.g., OrderedList, UnorderedList). Instead of generating grams as in an ngram index, we generate tokens (e.g., words) and for each token, construct an inverted list that includes the ids of the records with this token. The following two examples show how to create keyword index on two different types:</p>
+<div class="section">
+<h4><a name="Keyword_Index_on_String_Type"></a>Keyword Index on String Type</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    drop index FacebookMessages.fbMessageIdx if exists;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    for $o in dataset('FacebookMessages')
+    let $jacc := similarity-jaccard-check(word-tokens($o.message), word-tokens(&quot;love like verizon&quot;), 0.2f)
+    where $jacc[0]
+    return $o
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Keyword_Index_on_UnorderedList_Type"></a>Keyword Index on UnorderedList Type</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse TinySocial;
+
+    create index fbUserIdx_fids on FacebookUsers(friend-ids) type keyword;
+
+    for $c in dataset('FacebookUsers')
+    let $jacc := similarity-jaccard-check($c.friend-ids, {{3,10}}, 0.5f)
+    where $jacc[0]
+    return $c
+</pre></div></div>
+<p>As shown above, keyword index can be used to optimize queries with token-based similarity predicates, including <a href="functions.html#similarity-jaccard">similarity-jaccard</a> and <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a>.</p></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[19/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/data/twm.adm
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/data/twm.adm b/content/docs/0.8.8-incubating/data/twm.adm
new file mode 100644
index 0000000..fa764af
--- /dev/null
+++ b/content/docs/0.8.8-incubating/data/twm.adm
@@ -0,0 +1,12 @@
+{"tweetid":"1","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("47.44,80.65"),"send-time":datetime("2008-04-26T10:10:00"),"referred-topics":{{"t-mobile","customization"}},"message-text":" love t-mobile its customization is good:)"}
+{"tweetid":"2","user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("32.84,67.14"),"send-time":datetime("2010-05-13T10:10:00"),"referred-topics":{{"verizon","shortcut-menu"}},"message-text":" like verizon its shortcut-menu is awesome:)"}
+{"tweetid":"3","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("29.72,75.8"),"send-time":datetime("2006-11-04T10:10:00"),"referred-topics":{{"motorola","speed"}},"message-text":" like motorola the speed is good:)"}
+{"tweetid":"4","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("39.28,70.48"),"send-time":datetime("2011-12-26T10:10:00"),"referred-topics":{{"sprint","voice-command"}},"message-text":" like sprint the voice-command is mind-blowing:)"}
+{"tweetid":"5","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("40.09,92.69"),"send-time":datetime("2006-08-04T10:10:00"),"referred-topics":{{"motorola","speed"}},"message-text":" can't stand motorola its speed is terrible:("}
+{"tweetid":"6","user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("47.51,83.99"),"send-time":datetime("2010-05-07T10:10:00"),"referred-topics":{{"iphone","voice-clarity"}},"message-text":" like iphone the voice-clarity is good:)"}
+{"tweetid":"7","user":{"screen-name":"ChangEwing_573","lang":"en","friends_count":182,"statuses_count":394,"name":"Chang Ewing","followers_count":32136},"sender-location":point("36.21,72.6"),"send-time":datetime("2011-08-25T10:10:00"),"referred-topics":{{"samsung","platform"}},"message-text":" like samsung the platform is good"}
+{"tweetid":"8","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("46.05,93.34"),"send-time":datetime("2005-10-14T10:10:00"),"referred-topics":{{"t-mobile","shortcut-menu"}},"message-text":" like t-mobile the shortcut-menu is awesome:)"}
+{"tweetid":"9","user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("36.86,74.62"),"send-time":datetime("2012-07-21T10:10:00"),"referred-topics":{{"verizon","voicemail-service"}},"message-text":" love verizon its voicemail-service is awesome"}
+{"tweetid":"10","user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("29.15,76.53"),"send-time":datetime("2008-01-26T10:10:00"),"referred-topics":{{"verizon","voice-clarity"}},"message-text":" hate verizon its voice-clarity is OMG:("}
+{"tweetid":"11","user":{"screen-name":"NilaMilliron_tw","lang":"en","friends_count":445,"statuses_count":164,"name":"Nila Milliron","followers_count":22649},"sender-location":point("37.59,68.42"),"send-time":datetime("2008-03-09T10:10:00"),"referred-topics":{{"iphone","platform"}},"message-text":" can't stand iphone its platform is terrible"}
+{"tweetid":"12","user":{"screen-name":"OliJackson_512","lang":"en","friends_count":445,"statuses_count":164,"name":"Oli Jackson","followers_count":22649},"sender-location":point("24.82,94.63"),"send-time":datetime("2010-02-13T10:10:00"),"referred-topics":{{"samsung","voice-command"}},"message-text":" like samsung the voice-command is amazing:)"}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/data/twu.adm
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/data/twu.adm b/content/docs/0.8.8-incubating/data/twu.adm
new file mode 100644
index 0000000..32a1917
--- /dev/null
+++ b/content/docs/0.8.8-incubating/data/twu.adm
@@ -0,0 +1,4 @@
+{"screen-name":"NathanGiesen@211","lang":"en","friends_count":18,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416}
+{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159}
+{"screen-name":"NilaMilliron_tw","lang":"en","friends_count":445,"statuses_count":164,"name":"Nila Milliron","followers_count":22649}
+{"screen-name":"ChangEwing_573","lang":"en","friends_count":182,"statuses_count":394,"name":"Chang Ewing","followers_count":32136}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/feeds/tutorial.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/feeds/tutorial.html b/content/docs/0.8.8-incubating/feeds/tutorial.html
new file mode 100644
index 0000000..0beea3a
--- /dev/null
+++ b/content/docs/0.8.8-incubating/feeds/tutorial.html
@@ -0,0 +1,425 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Support for Data Ingestion in AsterixDB</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="../images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="../index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Support for Data Ingestion in AsterixDB</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>Support for Data Ingestion in AsterixDB</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#Introduction">Introduction</a></li>
+  
+<li><a href="#FeedAdaptors">Feed Adaptors</a></li>
+  
+<li><a href="#FeedPolicies">Feed Policies</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction">Introduction</a></h2>
+<p>In this document, we describe the support for data ingestion in AsterixDB. Data feeds are a new mechanism for having continuous data arrive into a BDMS from external sources and incrementally populate a persisted dataset and associated indexes. We add a new BDMS architectural component, called a data feed, that makes a Big Data system the caretaker for functionality that used to live outside, and we show how it improves users&#x2019; lives and system performance.</p></div>
+<div class="section">
+<h2><a name="Feed_Adaptors"></a><a name="FeedAdaptors">Feed Adaptors</a></h2>
+<p>The functionality of establishing a connection with a data source and receiving, parsing and translating its data into ADM records (for storage inside AsterixDB) is contained in a feed adaptor. A feed adaptor is an implementation of an interface and its details are specific to a given data source. An adaptor may optionally be given parameters to configure its runtime behavior. Depending upon the data transfer protocol/APIs offered by the data source, a feed adaptor may operate in a push or a pull mode. Push mode involves just one initial request by the adaptor to the data source for setting up the connection. Once a connection is authorized, the data source &#x201c;pushes&#x201d; data to the adaptor without any subsequent requests by the adaptor. In contrast, when operating in a pull mode, the adaptor makes a separate request each time to receive data. AsterixDB currently provides built-in adaptors for several popular data sources such as Twitter, CNN, and RSS feeds. AsterixDB ad
 ditionally provides a generic socket-based adaptor that can be used to ingest data that is directed at a prescribed socket.</p>
+<p>In this tutorial, we shall describe building two example data ingestion pipelines that cover the popular scenario of ingesting data from (a) Twitter and (b) RSS Feed source.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Ingesting_Twitter_Stream"></a>Ingesting Twitter Stream</h4>
+<p>We shall use the built-in push-based Twitter adaptor. As a pre-requisite, we must define a Tweet using the AsterixDB Data Model (ADM) and the AsterixDB Query Language (AQL). Given below are the type definition in AQL that create a Tweet datatype which is representative of a real tweet as obtained from Twitter.</p>
+
+<div class="source">
+<div class="source">
+<pre>    create dataverse feeds;
+    use dataverse feeds;
+
+    create type TwitterUser if not exists as open{
+        screen_name: string,
+        language: string,
+        friends_count: int32,
+        status_count: int32,
+        name: string,
+        followers_count: int32
+    };
+    create type Tweet if not exists as open{
+        id: string,
+        user: TwitterUser,
+        latitude:double,
+        longitude:double,
+        created_at:string,
+        message_text:string
+    };
+
+    create dataset Tweets (Tweet)
+    primary key id;
+</pre></div></div>
+<p>We also create a dataset that we shall use to persist the tweets in AsterixDB. Next we make use of the <tt>create feed</tt> AQL statement to define our example data feed.</p>
+<div class="section">
+<h5><a name="Using_the_push_twitter_feed_adapter"></a>Using the &#x201c;push_twitter&#x201d; feed adapter</h5>
+<p>The &#x201c;push_twitter&#x201d; adaptor requires setting up an application account with Twitter. To retrieve tweets, Twitter requires registering an application with Twitter. Registration involves providing a name and a brief description for the application. Each application has an associated OAuth authentication credential that includes OAuth keys and tokens. Accessing the Twitter API requires providing the following. 1. Consumer Key (API Key) 2. Consumer Secret (API Secret) 3. Access Token 4. Access Token Secret</p>
+<p>The &#x201c;push_twitter&#x201d; adaptor takes as configuration the above mentioned parameters. End users are required to obtain the above authentication credentials prior to using the &#x201c;push_twitter&#x201d; adaptor. For further information on obtaining OAuth keys and tokens and registering an application with Twitter, please visit <a class="externalLink" href="http://apps.twitter.com">http://apps.twitter.com</a></p>
+<p>Given below is an example AQL statement that creates a feed called &#x201c;TwitterFeed&#x201d; by using the &#x201c;push_twitter&#x201d; adaptor.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+     (&quot;consumer.key&quot;=&quot;************&quot;),
+     (&quot;consumer.secret&quot;=&quot;**************&quot;),
+     (&quot;access.token&quot;=&quot;**********&quot;),
+     (&quot;access.token.secret&quot;=&quot;*************&quot;));
+</pre></div></div>
+<p>It is required that the above authentication parameters are provided valid values. Note that the <tt>create feed</tt> statement does not initiate the flow of data from Twitter into our AsterixDB instance. Instead, the <tt>create feed</tt> statement only results in registering the feed with AsterixDB. The flow of data along a feed is initiated when it is connected to a target dataset using the connect feed statement (which we shall revisit later).</p></div></div>
+<div class="section">
+<h4><a name="Lifecycle_of_a_Feed"></a>Lifecycle of a Feed</h4>
+<p>A feed is a logical artifact that is brought to life (i.e., its data flow is initiated) only when it is connected to a dataset using the <tt>connect
+feed</tt> AQL statement. Subsequent to a <tt>connect feed</tt> statement, the feed is said to be in the connected state. Multiple feeds can simultaneously be connected to a dataset such that the contents of the dataset represent the union of the connected feeds. In a supported but unlikely scenario, one feed may also be simultaneously connected to different target datasets. Note that connecting a secondary feed does not require the parent feed (or any ancestor feed) to be in the connected state; the order in which feeds are connected to their respective datasets is not important. Furthermore, additional (secondary) feeds can be added to an existing hierarchy and connected to a dataset at any time without impeding/interrupting the flow of data along a connected ancestor feed.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets;
+</pre></div></div>
+<p>The <tt>connect feed</tt> statement above directs AsterixDB to persist the <tt>TwitterFeed</tt> feed in the <tt>Tweets</tt> dataset. If it is required (by the high-level application) to also retain the raw tweets obtained from Twitter, the end user may additionally choose to connect TwitterFeed to a different dataset.</p>
+<p>Let the feed run for a minute, then run the following query to see the latest tweets that are stored into the data set.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    for $i in dataset Tweets limit 10 return $i;
+</pre></div></div>
+<p>The flow of data from a feed into a dataset can be terminated explicitly by use of the <tt>disconnect feed</tt> statement. Disconnecting a feed from a particular dataset does not interrupt the flow of data from the feed to any other dataset(s), nor does it impact other connected feeds in the lineage.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    disconnect feed TwitterFeed from dataset Tweets;
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Ingesting_an_RSS_Feed"></a>Ingesting an RSS Feed</h4>
+<p>RSS (Rich Site Summary), originally RDF Site Summary and often called Really Simple Syndication, uses a family of standard web feed formats to publish frequently updated information: blog entries, news headlines, audio, video. An RSS document (called &#x201c;feed&#x201d;, &#x201c;web feed&#x201d;, or &#x201c;channel&#x201d;) includes full or summarized text, and metadata, like publishing date and author&#x2019;s name. RSS feeds enable publishers to syndicate data automatically.</p>
+<div class="section">
+<h5><a name="Using_the_rss_feed_feed_adapter"></a>Using the &#x201c;rss_feed&#x201d; feed adapter</h5>
+<p>AsterixDB provides a built-in feed adaptor that allows retrieving data given a collection of RSS end point URLs. As observed in the case of ingesting tweets, it is required to model an RSS data item using AQL.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create type Rss if not exists as open {
+        id: string,
+        title: string,
+        description: string,
+        link: string
+    };
+
+    create dataset RssDataset (Rss)
+    primary key id;
+</pre></div></div>
+<p>Next, we define an RSS feed using our built-in adaptor &#x201c;rss_feed&#x201d;.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    create feed my_feed using
+    rss_feed (
+       (&quot;type-name&quot;=&quot;Rss&quot;),
+       (&quot;url&quot;=&quot;http://rss.cnn.com/rss/edition.rss&quot;)
+    );
+</pre></div></div>
+<p>In the above definition, the configuration parameter &#x201c;url&#x201d; can be a comma-separated list that reflects a collection of RSS URLs, where each URL corresponds to an RSS endpoint or a RSS feed. The &#x201c;rss_adaptor&#x201d; retrieves data from each of the specified RSS URLs (comma separated values) in parallel.</p>
+<p>The following statements connect the feed into the <tt>RssDataset</tt>:</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    connect feed my_feed to dataset RssDataset;
+</pre></div></div>
+<p>The following statements show the latest data from the data set, and disconnect the feed from the data set.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    for $i in dataset RssDataset limit 10 return $i;
+
+    disconnect feed my_feed from dataset RssDataset;
+</pre></div></div>
+<p>AsterixDB also allows multiple feeds to be connected to form a cascade network to process data.</p></div></div></div></div>
+<div class="section">
+<h2><a name="Policies_for_Feed_Ingestion"></a><a name="FeedPolicies">Policies for Feed Ingestion</a></h2>
+<p>Multiple feeds may be concurrently operational on an AsterixDB cluster, each competing for resources (CPU cycles, network bandwidth, disk IO) to maintain pace with their respective data sources. As a data management system, AsterixDB is able to manage a set of concurrent feeds and make dynamic decisions related to the allocation of resources, resolving resource bottlenecks and the handling of failures. Each feed has its own set of constraints, influenced largely by the nature of its data source and the applications that intend to consume and process the ingested data. Consider an application that intends to discover the trending topics on Twitter by analyzing tweets that are being processed. Losing a few tweets may be acceptable. In contrast, when ingesting from a data source that provides a click-stream of ad clicks, losing data would translate to a loss of revenue for an application that tracks revenue by charging advertisers per click.</p>
+<p>AsterixDB allows a data feed to have an associated ingestion policy that is expressed as a collection of parameters and associated values. An ingestion policy dictates the runtime behavior of the feed in response to resource bottlenecks and failures. AsterixDB provides a list of policy parameters that help customize the system&#x2019;s runtime behavior when handling excess records. AsterixDB provides a set of built-in policies, each constructed by setting appropriate value(s) for the policy parameter(s) from the table below.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Policy_Parameters"></a>Policy Parameters</h4>
+
+<ul>
+  
+<li>
+<p><i>excess.records.spill</i>: Set to true if records that cannot be processed by an operator for lack of resources (referred to as excess records hereafter) should be persisted to the local disk for deferred processing. (Default: false)</p></li>
+  
+<li>
+<p><i>excess.records.discard</i>: Set to true if excess records should be discarded. (Default: false)</p></li>
+  
+<li>
+<p><i>excess.records.throttle</i>: Set to true if rate of arrival of records is required to be reduced in an adaptive manner to prevent having any excess records (Default: false)</p></li>
+  
+<li>
+<p><i>excess.records.elastic</i>: Set to true if the system should attempt to resolve resource bottlenecks by re-structuring and/or rescheduling the feed ingestion pipeline. (Default: false)</p></li>
+  
+<li>
+<p><i>recover.soft.failure</i>: Set to true if the feed must attempt to survive any runtime exception. A false value permits an early termination of a feed in such an event. (Default: true)</p></li>
+  
+<li>
+<p><i>recover.soft.failure</i>: Set to true if the feed must attempt to survive a hardware failures (loss of AsterixDB node(s)). A false value permits the early termination of a feed in the event of a hardware failure (Default: false)</p></li>
+</ul>
+<p>Note that the end user may choose to form a custom policy. For example, it is possible in AsterixDB to create a custom policy that spills excess records to disk and subsequently resorts to throttling if the spillage crosses a configured threshold. In all cases, the desired ingestion policy is specified as part of the <tt>connect feed</tt> statement or else the &#x201c;Basic&#x201d; policy will be chosen as the default. It is worth noting that a feed can be connected to a dataset at any time, which is independent from other related feeds in the hierarchy.</p>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets
+    using policy Basic ;
+</pre></div></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/AsterixCluster.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/AsterixCluster.png b/content/docs/0.8.8-incubating/images/AsterixCluster.png
new file mode 100644
index 0000000..a16ee26
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/AsterixCluster.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/accessories-text-editor.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/accessories-text-editor.png b/content/docs/0.8.8-incubating/images/accessories-text-editor.png
new file mode 100644
index 0000000..abc3366
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/accessories-text-editor.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/add.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/add.gif b/content/docs/0.8.8-incubating/images/add.gif
new file mode 100644
index 0000000..1cb3dbf
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/apache-maven-project-2.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/apache-maven-project-2.png b/content/docs/0.8.8-incubating/images/apache-maven-project-2.png
new file mode 100644
index 0000000..6c096ec
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/apache-maven-project-2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/application-certificate.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/application-certificate.png b/content/docs/0.8.8-incubating/images/application-certificate.png
new file mode 100644
index 0000000..cc6aff6
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/application-certificate.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/asf_logo_wide.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/asf_logo_wide.png b/content/docs/0.8.8-incubating/images/asf_logo_wide.png
new file mode 100644
index 0000000..56a4369
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/asf_logo_wide.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/asterix_webui.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/asterix_webui.png b/content/docs/0.8.8-incubating/images/asterix_webui.png
new file mode 100644
index 0000000..27522c4
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/asterix_webui.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/asterixlogo.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/asterixlogo.png b/content/docs/0.8.8-incubating/images/asterixlogo.png
new file mode 100644
index 0000000..45cd64f
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/asterixlogo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/contact-new.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/contact-new.png b/content/docs/0.8.8-incubating/images/contact-new.png
new file mode 100644
index 0000000..ebc4316
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/contact-new.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/document-properties.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/document-properties.png b/content/docs/0.8.8-incubating/images/document-properties.png
new file mode 100644
index 0000000..34c2409
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/document-properties.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/drive-harddisk.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/drive-harddisk.png b/content/docs/0.8.8-incubating/images/drive-harddisk.png
new file mode 100644
index 0000000..d7ce475
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/drive-harddisk.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/egg-logo.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/egg-logo.png b/content/docs/0.8.8-incubating/images/egg-logo.png
new file mode 100644
index 0000000..c04e70d
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/egg-logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/fix.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/fix.gif b/content/docs/0.8.8-incubating/images/fix.gif
new file mode 100644
index 0000000..b7eb3dc
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/fix.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/hyrax_ts.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/hyrax_ts.png b/content/docs/0.8.8-incubating/images/hyrax_ts.png
new file mode 100644
index 0000000..001c788
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/hyrax_ts.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/icon_error_sml.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/icon_error_sml.gif b/content/docs/0.8.8-incubating/images/icon_error_sml.gif
new file mode 100644
index 0000000..12e9a01
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/icon_error_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/icon_help_sml.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/icon_help_sml.gif b/content/docs/0.8.8-incubating/images/icon_help_sml.gif
new file mode 100644
index 0000000..aaf20e6
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/icon_help_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/icon_info_sml.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/icon_info_sml.gif b/content/docs/0.8.8-incubating/images/icon_info_sml.gif
new file mode 100644
index 0000000..b776326
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/icon_info_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/icon_success_sml.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/icon_success_sml.gif b/content/docs/0.8.8-incubating/images/icon_success_sml.gif
new file mode 100644
index 0000000..0a19527
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/icon_success_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/icon_warning_sml.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/icon_warning_sml.gif b/content/docs/0.8.8-incubating/images/icon_warning_sml.gif
new file mode 100644
index 0000000..ac6ad6a
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/icon_warning_sml.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/image-x-generic.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/image-x-generic.png b/content/docs/0.8.8-incubating/images/image-x-generic.png
new file mode 100644
index 0000000..ab49efb
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/image-x-generic.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/internet-web-browser.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/internet-web-browser.png b/content/docs/0.8.8-incubating/images/internet-web-browser.png
new file mode 100644
index 0000000..307d6ac
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/internet-web-browser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/logos/build-by-maven-black.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/logos/build-by-maven-black.png b/content/docs/0.8.8-incubating/images/logos/build-by-maven-black.png
new file mode 100644
index 0000000..919fd0f
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/logos/build-by-maven-black.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/logos/build-by-maven-white.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/logos/build-by-maven-white.png b/content/docs/0.8.8-incubating/images/logos/build-by-maven-white.png
new file mode 100644
index 0000000..7d44c9c
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/logos/build-by-maven-white.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/logos/maven-feather.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/logos/maven-feather.png b/content/docs/0.8.8-incubating/images/logos/maven-feather.png
new file mode 100644
index 0000000..b5ada83
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/logos/maven-feather.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/network-server.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/network-server.png b/content/docs/0.8.8-incubating/images/network-server.png
new file mode 100644
index 0000000..1d12e19
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/network-server.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/package-x-generic.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/package-x-generic.png b/content/docs/0.8.8-incubating/images/package-x-generic.png
new file mode 100644
index 0000000..8b7e9e6
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/package-x-generic.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/profiles/pre-release.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/profiles/pre-release.png b/content/docs/0.8.8-incubating/images/profiles/pre-release.png
new file mode 100644
index 0000000..d448e85
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/profiles/pre-release.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/profiles/retired.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/profiles/retired.png b/content/docs/0.8.8-incubating/images/profiles/retired.png
new file mode 100644
index 0000000..f89f6a2
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/profiles/retired.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/profiles/sandbox.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/profiles/sandbox.png b/content/docs/0.8.8-incubating/images/profiles/sandbox.png
new file mode 100644
index 0000000..f88b362
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/profiles/sandbox.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/remove.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/remove.gif b/content/docs/0.8.8-incubating/images/remove.gif
new file mode 100644
index 0000000..fc65631
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/remove.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/rss.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/rss.png b/content/docs/0.8.8-incubating/images/rss.png
new file mode 100644
index 0000000..a9850ee
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/rss.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/running_inst.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/running_inst.png b/content/docs/0.8.8-incubating/images/running_inst.png
new file mode 100644
index 0000000..66eb03a
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/running_inst.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/update.gif
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/update.gif b/content/docs/0.8.8-incubating/images/update.gif
new file mode 100644
index 0000000..b2a6d0b
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/update.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/window-new.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/window-new.png b/content/docs/0.8.8-incubating/images/window-new.png
new file mode 100644
index 0000000..0e12ef9
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/window-new.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/images/yarn_clust.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/images/yarn_clust.png b/content/docs/0.8.8-incubating/images/yarn_clust.png
new file mode 100644
index 0000000..5e386bc
Binary files /dev/null and b/content/docs/0.8.8-incubating/images/yarn_clust.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/img/glyphicons-halflings-white.png b/content/docs/0.8.8-incubating/img/glyphicons-halflings-white.png
new file mode 100644
index 0000000..3bf6484
Binary files /dev/null and b/content/docs/0.8.8-incubating/img/glyphicons-halflings-white.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/img/glyphicons-halflings.png b/content/docs/0.8.8-incubating/img/glyphicons-halflings.png
new file mode 100644
index 0000000..a996999
Binary files /dev/null and b/content/docs/0.8.8-incubating/img/glyphicons-halflings.png differ

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/index.html
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/index.html b/content/docs/0.8.8-incubating/index.html
new file mode 100644
index 0000000..b01eef2
--- /dev/null
+++ b/content/docs/0.8.8-incubating/index.html
@@ -0,0 +1,268 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2016-03-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20160325" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://asterixdb.apache.org/" id="bannerLeft">
+                                                                                                <img src="images/asterixlogo.png"  alt="AsterixDB"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2016-03-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.8-incubating</li>
+      
+                                            <li class="divider pull-right">|</li>
+                        
+    <li class="pull-right">              <a href="index.html" title="Documentation Home">
+        Documentation Home</a>
+  </li>
+
+                        </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="feeds/tutorial.html" title="Support for Data Ingestion in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.png"    />
+      </a>
+                      </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership.  The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License.  You may obtain a copy of the License at
+ !
+ !   http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied.  See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ ! --><h1>AsterixDB</h1>
+<p>AsterixDB is a BDMS (Big Data Management System) with a rich feature set that sets it apart from other Big Data platforms. Its feature set makes it well-suited to modern needs such as web data warehousing and social data storage and analysis. AsterixDB has:</p>
+
+<ul>
+  
+<li>A semistructured NoSQL style data model (ADM) resulting from extending JSON  with object database ideas</li>
+  
+<li>An expressive and declarative query language (AQL) that supports a broad  range of queries and analysis over semistructured data</li>
+  
+<li>A parallel runtime query execution engine, Hyracks, that has been  scale-tested on up to 1000+ cores and 500+ disks</li>
+  
+<li>Partitioned LSM-based data storage and indexing to support efficient  ingestion and management of semistructured data</li>
+  
+<li>Support for query access to externally stored data (e.g., data in HDFS) as  well as to data stored natively by AsterixDB</li>
+  
+<li>A rich set of primitive data types, including spatial and temporal data in  addition to integer, floating point, and textual data</li>
+  
+<li>Secondary indexing options that include B+ trees, R trees, and inverted  keyword (exact and fuzzy) index types</li>
+  
+<li>Support for fuzzy and spatial queries as well as for more traditional  parametric queries</li>
+  
+<li>Basic transactional (concurrency and recovery) capabilities akin to those of  a NoSQL store</li>
+</ul>
+<div class="section">
+<div class="section">
+<h3><a name="Disclaimer"></a>Disclaimer</h3>
+<p>Apache AsterixDB is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2016
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


[20/30] incubator-asterixdb-site git commit: Add the documentation for release-0.8.8.

Posted by bu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/08953b2e/content/docs/0.8.8-incubating/data/lineitem.tbl
----------------------------------------------------------------------
diff --git a/content/docs/0.8.8-incubating/data/lineitem.tbl b/content/docs/0.8.8-incubating/data/lineitem.tbl
new file mode 100644
index 0000000..58d47c6
--- /dev/null
+++ b/content/docs/0.8.8-incubating/data/lineitem.tbl
@@ -0,0 +1,6005 @@
+1|156|4|1|17|17954.55|0.04|0.02|N|O|1996-03-13|1996-02-12|1996-03-22|DELIVER IN PERSON|TRUCK|egular courts above the|
+1|68|9|2|36|34850.16|0.09|0.06|N|O|1996-04-12|1996-02-28|1996-04-20|TAKE BACK RETURN|MAIL|ly final dependencies: slyly bold |
+1|64|5|3|8|7712.48|0.10|0.02|N|O|1996-01-29|1996-03-05|1996-01-31|TAKE BACK RETURN|REG AIR|riously. regular, express dep|
+1|3|6|4|28|25284.00|0.09|0.06|N|O|1996-04-21|1996-03-30|1996-05-16|NONE|AIR|lites. fluffily even de|
+1|25|8|5|24|22200.48|0.10|0.04|N|O|1996-03-30|1996-03-14|1996-04-01|NONE|FOB| pending foxes. slyly re|
+1|16|3|6|32|29312.32|0.07|0.02|N|O|1996-01-30|1996-02-07|1996-02-03|DELIVER IN PERSON|MAIL|arefully slyly ex|
+2|107|2|1|38|38269.80|0.00|0.05|N|O|1997-01-28|1997-01-14|1997-02-02|TAKE BACK RETURN|RAIL|ven requests. deposits breach a|
+3|5|2|1|45|40725.00|0.06|0.00|R|F|1994-02-02|1994-01-04|1994-02-23|NONE|AIR|ongside of the furiously brave acco|
+3|20|10|2|49|45080.98|0.10|0.00|R|F|1993-11-09|1993-12-20|1993-11-24|TAKE BACK RETURN|RAIL| unusual accounts. eve|
+3|129|8|3|27|27786.24|0.06|0.07|A|F|1994-01-16|1993-11-22|1994-01-23|DELIVER IN PERSON|SHIP|nal foxes wake. |
+3|30|5|4|2|1860.06|0.01|0.06|A|F|1993-12-04|1994-01-07|1994-01-01|NONE|TRUCK|y. fluffily pending d|
+3|184|5|5|28|30357.04|0.04|0.00|R|F|1993-12-14|1994-01-10|1994-01-01|TAKE BACK RETURN|FOB|ages nag slyly pending|
+3|63|8|6|26|25039.56|0.10|0.02|A|F|1993-10-29|1993-12-18|1993-11-04|TAKE BACK RETURN|RAIL|ges sleep after the caref|
+4|89|10|1|30|29672.40|0.03|0.08|N|O|1996-01-10|1995-12-14|1996-01-18|DELIVER IN PERSON|REG AIR|- quickly regular packages sleep. idly|
+5|109|10|1|15|15136.50|0.02|0.04|R|F|1994-10-31|1994-08-31|1994-11-20|NONE|AIR|ts wake furiously |
+5|124|5|2|26|26627.12|0.07|0.08|R|F|1994-10-16|1994-09-25|1994-10-19|NONE|FOB|sts use slyly quickly special instruc|
+5|38|4|3|50|46901.50|0.08|0.03|A|F|1994-08-08|1994-10-13|1994-08-26|DELIVER IN PERSON|AIR|eodolites. fluffily unusual|
+6|140|6|1|37|38485.18|0.08|0.03|A|F|1992-04-27|1992-05-15|1992-05-02|TAKE BACK RETURN|TRUCK|p furiously special foxes|
+7|183|4|1|12|12998.16|0.07|0.03|N|O|1996-05-07|1996-03-13|1996-06-03|TAKE BACK RETURN|FOB|ss pinto beans wake against th|
+7|146|3|2|9|9415.26|0.08|0.08|N|O|1996-02-01|1996-03-02|1996-02-19|TAKE BACK RETURN|SHIP|es. instructions|
+7|95|8|3|46|45774.14|0.10|0.07|N|O|1996-01-15|1996-03-27|1996-02-03|COLLECT COD|MAIL| unusual reques|
+7|164|5|4|28|29796.48|0.03|0.04|N|O|1996-03-21|1996-04-08|1996-04-20|NONE|FOB|. slyly special requests haggl|
+7|152|4|5|38|39981.70|0.08|0.01|N|O|1996-02-11|1996-02-24|1996-02-18|DELIVER IN PERSON|TRUCK|ns haggle carefully ironic deposits. bl|
+7|80|10|6|35|34302.80|0.06|0.03|N|O|1996-01-16|1996-02-23|1996-01-22|TAKE BACK RETURN|FOB|jole. excuses wake carefully alongside of |
+7|158|3|7|5|5290.75|0.04|0.02|N|O|1996-02-10|1996-03-26|1996-02-13|NONE|FOB|ithely regula|
+32|83|4|1|28|27526.24|0.05|0.08|N|O|1995-10-23|1995-08-27|1995-10-26|TAKE BACK RETURN|TRUCK|sleep quickly. req|
+32|198|10|2|32|35142.08|0.02|0.00|N|O|1995-08-14|1995-10-07|1995-08-27|COLLECT COD|AIR|lithely regular deposits. fluffily |
+32|45|2|3|2|1890.08|0.09|0.02|N|O|1995-08-07|1995-10-07|1995-08-23|DELIVER IN PERSON|AIR| express accounts wake according to the|
+32|3|8|4|4|3612.00|0.09|0.03|N|O|1995-08-04|1995-10-01|1995-09-03|NONE|REG AIR|e slyly final pac|
+32|86|7|5|44|43387.52|0.05|0.06|N|O|1995-08-28|1995-08-20|1995-09-14|DELIVER IN PERSON|AIR|symptotes nag according to the ironic depo|
+32|12|6|6|6|5472.06|0.04|0.03|N|O|1995-07-21|1995-09-23|1995-07-25|COLLECT COD|RAIL| gifts cajole carefully.|
+33|62|7|1|31|29823.86|0.09|0.04|A|F|1993-10-29|1993-12-19|1993-11-08|COLLECT COD|TRUCK|ng to the furiously ironic package|
+33|61|8|2|32|30753.92|0.02|0.05|A|F|1993-12-09|1994-01-04|1993-12-28|COLLECT COD|MAIL|gular theodolites|
+33|138|4|3|5|5190.65|0.05|0.03|A|F|1993-12-09|1993-12-25|1993-12-23|TAKE BACK RETURN|AIR|. stealthily bold exc|
+33|34|5|4|41|38295.23|0.09|0.00|R|F|1993-11-09|1994-01-24|1993-11-11|TAKE BACK RETURN|MAIL|unusual packages doubt caref|
+34|89|10|1|13|12858.04|0.00|0.07|N|O|1998-10-23|1998-09-14|1998-11-06|NONE|REG AIR|nic accounts. deposits are alon|
+34|90|1|2|22|21781.98|0.08|0.06|N|O|1998-10-09|1998-10-16|1998-10-12|NONE|FOB|thely slyly p|
+34|170|7|3|6|6421.02|0.02|0.06|N|O|1998-10-30|1998-09-20|1998-11-05|NONE|FOB|ar foxes sleep |
+35|1|4|1|24|21624.00|0.02|0.00|N|O|1996-02-21|1996-01-03|1996-03-18|TAKE BACK RETURN|FOB|, regular tithe|
+35|162|1|2|34|36113.44|0.06|0.08|N|O|1996-01-22|1996-01-06|1996-01-27|DELIVER IN PERSON|RAIL|s are carefully against the f|
+35|121|4|3|7|7147.84|0.06|0.04|N|O|1996-01-19|1995-12-22|1996-01-29|NONE|MAIL| the carefully regular |
+35|86|7|4|25|24652.00|0.06|0.05|N|O|1995-11-26|1995-12-25|1995-12-21|DELIVER IN PERSON|SHIP| quickly unti|
+35|120|7|5|34|34684.08|0.08|0.06|N|O|1995-11-08|1996-01-15|1995-11-26|COLLECT COD|MAIL|. silent, unusual deposits boost|
+35|31|7|6|28|26068.84|0.03|0.02|N|O|1996-02-01|1995-12-24|1996-02-28|COLLECT COD|RAIL|ly alongside of |
+36|120|1|1|42|42845.04|0.09|0.00|N|O|1996-02-03|1996-01-21|1996-02-23|COLLECT COD|SHIP| careful courts. special |
+37|23|8|1|40|36920.80|0.09|0.03|A|F|1992-07-21|1992-08-01|1992-08-15|NONE|REG AIR|luffily regular requests. slyly final acco|
+37|127|6|2|39|40057.68|0.05|0.02|A|F|1992-07-02|1992-08-18|1992-07-28|TAKE BACK RETURN|RAIL|the final requests. ca|
+37|13|7|3|43|39259.43|0.05|0.08|A|F|1992-07-10|1992-07-06|1992-08-02|DELIVER IN PERSON|TRUCK|iously ste|
+38|176|5|1|44|47351.48|0.04|0.02|N|O|1996-09-29|1996-11-17|1996-09-30|COLLECT COD|MAIL|s. blithely unusual theodolites am|
+39|3|10|1|44|39732.00|0.09|0.06|N|O|1996-11-14|1996-12-15|1996-12-12|COLLECT COD|RAIL|eodolites. careful|
+39|187|8|2|26|28266.68|0.08|0.04|N|O|1996-11-04|1996-10-20|1996-11-20|NONE|FOB|ckages across the slyly silent|
+39|68|3|3|46|44530.76|0.06|0.08|N|O|1996-09-26|1996-12-19|1996-10-26|DELIVER IN PERSON|AIR|he carefully e|
+39|21|6|4|32|29472.64|0.07|0.05|N|O|1996-10-02|1996-12-19|1996-10-14|COLLECT COD|MAIL|heodolites sleep silently pending foxes. ac|
+39|55|10|5|43|41067.15|0.01|0.01|N|O|1996-10-17|1996-11-14|1996-10-26|COLLECT COD|MAIL|yly regular i|
+39|95|7|6|40|39803.60|0.06|0.05|N|O|1996-12-08|1996-10-22|1997-01-01|COLLECT COD|AIR|quickly ironic fox|
+64|86|7|1|21|20707.68|0.05|0.02|R|F|1994-09-30|1994-09-18|1994-10-26|DELIVER IN PERSON|REG AIR|ch slyly final, thin platelets.|
+65|60|5|1|26|24961.56|0.03|0.03|A|F|1995-04-20|1995-04-25|1995-05-13|NONE|TRUCK|pending deposits nag even packages. ca|
+65|74|3|2|22|21429.54|0.00|0.05|N|O|1995-07-17|1995-06-04|1995-07-19|COLLECT COD|FOB| ideas. special, r|
+65|2|5|3|21|18942.00|0.09|0.07|N|O|1995-07-06|1995-05-14|1995-07-31|DELIVER IN PERSON|RAIL|bove the even packages. accounts nag carefu|
+66|116|10|1|31|31499.41|0.00|0.08|R|F|1994-02-19|1994-03-11|1994-02-20|TAKE BACK RETURN|RAIL|ut the unusual accounts sleep at the bo|
+66|174|5|2|41|44040.97|0.04|0.07|A|F|1994-02-21|1994-03-01|1994-03-18|COLLECT COD|AIR| regular de|
+67|22|5|1|4|3688.08|0.09|0.04|N|O|1997-04-17|1997-01-31|1997-04-20|NONE|SHIP| cajole thinly expres|
+67|21|10|2|12|11052.24|0.09|0.05|N|O|1997-01-27|1997-02-21|1997-02-22|NONE|REG AIR| even packages cajole|
+67|174|4|3|5|5370.85|0.03|0.07|N|O|1997-02-20|1997-02-12|1997-02-21|DELIVER IN PERSON|TRUCK|y unusual packages thrash pinto |
+67|88|9|4|44|43475.52|0.08|0.06|N|O|1997-03-18|1997-01-29|1997-04-13|DELIVER IN PERSON|RAIL|se quickly above the even, express reques|
+67|41|10|5|23|21643.92|0.05|0.07|N|O|1997-04-19|1997-02-14|1997-05-06|DELIVER IN PERSON|REG AIR|ly regular deposit|
+67|179|9|6|29|31295.93|0.02|0.05|N|O|1997-01-25|1997-01-27|1997-01-27|DELIVER IN PERSON|FOB|ultipliers |
+68|8|1|1|3|2724.00|0.05|0.02|N|O|1998-07-04|1998-06-05|1998-07-21|NONE|RAIL|fully special instructions cajole. furious|
+68|176|4|2|46|49503.82|0.02|0.05|N|O|1998-06-26|1998-06-07|1998-07-05|NONE|MAIL| requests are unusual, regular pinto |
+68|35|1|3|46|43011.38|0.04|0.05|N|O|1998-08-13|1998-07-08|1998-08-29|NONE|RAIL|egular dependencies affix ironically along |
+68|95|9|4|20|19901.80|0.07|0.01|N|O|1998-06-27|1998-05-23|1998-07-02|NONE|REG AIR| excuses integrate fluffily |
+68|83|4|5|27|26543.16|0.03|0.06|N|O|1998-06-19|1998-06-25|1998-06-29|DELIVER IN PERSON|SHIP|ccounts. deposits use. furiously|
+68|103|6|6|30|30093.00|0.05|0.06|N|O|1998-08-11|1998-07-11|1998-08-14|NONE|RAIL|oxes are slyly blithely fin|
+68|140|6|7|41|42645.74|0.09|0.08|N|O|1998-06-24|1998-06-27|1998-07-06|NONE|SHIP|eposits nag special ideas. furiousl|
+69|116|10|1|48|48773.28|0.01|0.07|A|F|1994-08-17|1994-08-11|1994-09-08|NONE|TRUCK|regular epitaphs. carefully even ideas hag|
+69|105|10|2|32|32163.20|0.08|0.06|A|F|1994-08-24|1994-08-17|1994-08-31|NONE|REG AIR|s sleep carefully bold, |
+69|138|4|3|17|17648.21|0.09|0.00|A|F|1994-07-02|1994-07-07|1994-07-03|TAKE BACK RETURN|AIR|final, pending instr|
+69|38|9|4|3|2814.09|0.09|0.04|R|F|1994-06-06|1994-07-27|1994-06-15|NONE|MAIL| blithely final d|
+69|93|6|5|42|41709.78|0.07|0.04|R|F|1994-07-31|1994-07-26|1994-08-28|DELIVER IN PERSON|REG AIR|tect regular, speci|
+69|19|3|6|23|21137.23|0.05|0.00|A|F|1994-10-03|1994-08-06|1994-10-24|NONE|SHIP|nding accounts ca|
+70|65|2|1|8|7720.48|0.03|0.08|R|F|1994-01-12|1994-02-27|1994-01-14|TAKE BACK RETURN|FOB|ggle. carefully pending dependenc|
+70|197|10|2|13|14263.47|0.06|0.06|A|F|1994-03-03|1994-02-13|1994-03-26|COLLECT COD|AIR|lyly special packag|
+70|180|8|3|1|1080.18|0.03|0.05|R|F|1994-01-26|1994-03-05|1994-01-28|TAKE BACK RETURN|RAIL|quickly. fluffily unusual theodolites c|
+70|46|9|4|11|10406.44|0.01|0.05|A|F|1994-03-17|1994-03-17|1994-03-27|NONE|MAIL|alongside of the deposits. fur|
+70|38|9|5|37|34707.11|0.09|0.04|R|F|1994-02-13|1994-03-16|1994-02-21|COLLECT COD|MAIL|n accounts are. q|
+70|56|8|6|19|18164.95|0.06|0.03|A|F|1994-01-26|1994-02-17|1994-02-06|TAKE BACK RETURN|SHIP| packages wake pending accounts.|
+71|62|3|1|25|24051.50|0.09|0.07|N|O|1998-04-10|1998-04-22|1998-04-11|COLLECT COD|FOB|ckly. slyly|
+71|66|1|2|3|2898.18|0.09|0.07|N|O|1998-05-23|1998-04-03|1998-06-02|COLLECT COD|SHIP|y. pinto beans haggle after the|
+71|35|1|3|45|42076.35|0.00|0.07|N|O|1998-02-23|1998-03-20|1998-03-24|DELIVER IN PERSON|SHIP| ironic packages believe blithely a|
+71|97|9|4|33|32903.97|0.00|0.01|N|O|1998-04-12|1998-03-20|1998-04-15|NONE|FOB| serve quickly fluffily bold deposi|
+71|104|7|5|39|39159.90|0.08|0.06|N|O|1998-01-29|1998-04-07|1998-02-18|DELIVER IN PERSON|RAIL|l accounts sleep across the pack|
+71|196|9|6|34|37270.46|0.04|0.01|N|O|1998-03-05|1998-04-22|1998-03-30|DELIVER IN PERSON|TRUCK|s cajole. |
+96|124|7|1|23|23554.76|0.10|0.06|A|F|1994-07-19|1994-06-29|1994-07-25|DELIVER IN PERSON|TRUCK|ep-- carefully reg|
+96|136|7|2|30|31083.90|0.01|0.06|R|F|1994-06-03|1994-05-29|1994-06-22|DELIVER IN PERSON|TRUCK|e quickly even ideas. furiou|
+97|120|4|1|13|13261.56|0.00|0.02|R|F|1993-04-01|1993-04-04|1993-04-08|NONE|TRUCK|ayers cajole against the furiously|
+97|50|7|2|37|35151.85|0.02|0.06|A|F|1993-04-13|1993-03-30|1993-04-14|DELIVER IN PERSON|SHIP|ic requests boost carefully quic|
+97|78|6|3|19|18583.33|0.06|0.08|R|F|1993-05-14|1993-03-05|1993-05-25|TAKE BACK RETURN|RAIL|gifts. furiously ironic packages cajole. |
+98|41|2|1|28|26349.12|0.06|0.07|A|F|1994-12-24|1994-10-25|1995-01-16|COLLECT COD|REG AIR| pending, regular accounts s|
+98|110|7|2|1|1010.11|0.00|0.00|A|F|1994-12-01|1994-12-12|1994-12-15|DELIVER IN PERSON|TRUCK|. unusual instructions against|
+98|45|6|3|14|13230.56|0.05|0.02|A|F|1994-12-30|1994-11-22|1995-01-27|COLLECT COD|AIR| cajole furiously. blithely ironic ideas |
+98|168|9|4|10|10681.60|0.03|0.03|A|F|1994-10-23|1994-11-08|1994-11-09|COLLECT COD|RAIL| carefully. quickly ironic ideas|
+99|88|9|1|10|9880.80|0.02|0.01|A|F|1994-05-18|1994-06-03|1994-05-23|COLLECT COD|RAIL|kages. requ|
+99|124|5|2|5|5120.60|0.02|0.07|R|F|1994-05-06|1994-05-28|1994-05-20|TAKE BACK RETURN|RAIL|ests cajole fluffily waters. blithe|
+99|135|1|3|42|43475.46|0.02|0.02|A|F|1994-04-19|1994-05-18|1994-04-20|NONE|RAIL|kages are fluffily furiously ir|
+99|109|2|4|36|36327.60|0.09|0.02|A|F|1994-07-04|1994-04-17|1994-07-30|DELIVER IN PERSON|AIR|slyly. slyly e|
+100|63|4|1|28|26965.68|0.04|0.05|N|O|1998-05-08|1998-05-13|1998-06-07|COLLECT COD|TRUCK|sts haggle. slowl|
+100|116|10|2|22|22354.42|0.00|0.07|N|O|1998-06-24|1998-04-12|1998-06-29|DELIVER IN PERSON|SHIP|nto beans alongside of the fi|
+100|47|4|3|46|43563.84|0.03|0.04|N|O|1998-05-02|1998-04-10|1998-05-22|TAKE BACK RETURN|SHIP|ular accounts. even|
+100|39|10|4|14|13146.42|0.06|0.03|N|O|1998-05-22|1998-05-01|1998-06-03|COLLECT COD|MAIL|y. furiously ironic ideas gr|
+100|54|6|5|37|35299.85|0.05|0.00|N|O|1998-03-06|1998-04-16|1998-03-31|TAKE BACK RETURN|TRUCK|nd the quickly s|
+101|119|9|1|49|49936.39|0.10|0.00|N|O|1996-06-21|1996-05-27|1996-06-29|DELIVER IN PERSON|REG AIR|ts-- final packages sleep furiousl|
+101|164|9|2|36|38309.76|0.00|0.01|N|O|1996-05-19|1996-05-01|1996-06-04|DELIVER IN PERSON|AIR|tes. blithely pending dolphins x-ray f|
+101|139|5|3|12|12469.56|0.06|0.02|N|O|1996-03-29|1996-04-20|1996-04-12|COLLECT COD|MAIL|. quickly regular|
+102|89|10|1|37|36595.96|0.06|0.00|N|O|1997-07-24|1997-08-02|1997-08-07|TAKE BACK RETURN|SHIP|ully across the ideas. final deposit|
+102|170|5|2|34|36385.78|0.03|0.08|N|O|1997-08-09|1997-07-28|1997-08-26|TAKE BACK RETURN|SHIP|eposits cajole across|
+102|183|4|3|25|27079.50|0.01|0.01|N|O|1997-07-31|1997-07-24|1997-08-17|NONE|RAIL|bits. ironic accoun|
+102|62|7|4|15|14430.90|0.07|0.07|N|O|1997-06-02|1997-07-13|1997-06-04|DELIVER IN PERSON|SHIP|final packages. carefully even excu|
+103|195|9|1|6|6571.14|0.03|0.05|N|O|1996-10-11|1996-07-25|1996-10-28|NONE|FOB|cajole. carefully ex|
+103|11|5|2|37|33707.37|0.02|0.07|N|O|1996-09-17|1996-07-27|1996-09-20|TAKE BACK RETURN|MAIL|ies. quickly ironic requests use blithely|
+103|29|10|3|23|21367.46|0.01|0.04|N|O|1996-09-11|1996-09-18|1996-09-26|NONE|FOB|ironic accou|
+103|30|9|4|32|29760.96|0.01|0.07|N|O|1996-07-30|1996-08-06|1996-08-04|NONE|RAIL|kages doze. special, regular deposit|
+128|107|10|1|38|38269.80|0.06|0.01|A|F|1992-09-01|1992-08-27|1992-10-01|TAKE BACK RETURN|FOB| cajole careful|
+129|3|6|1|46|41538.00|0.08|0.02|R|F|1993-02-15|1993-01-24|1993-03-05|COLLECT COD|TRUCK|uietly bold theodolites. fluffil|
+129|186|7|2|36|39102.48|0.01|0.02|A|F|1992-11-25|1992-12-25|1992-12-09|TAKE BACK RETURN|REG AIR|packages are care|
+129|40|6|3|33|31021.32|0.04|0.06|A|F|1993-01-08|1993-02-14|1993-01-29|COLLECT COD|SHIP|sts nag bravely. fluffily|
+129|136|7|4|34|35228.42|0.00|0.01|R|F|1993-01-29|1993-02-14|1993-02-10|COLLECT COD|MAIL|quests. express ideas|
+129|32|8|5|24|22368.72|0.06|0.00|A|F|1992-12-07|1993-01-02|1992-12-11|TAKE BACK RETURN|FOB|uests. foxes cajole slyly after the ca|
+129|78|6|6|22|21517.54|0.06|0.01|R|F|1993-02-15|1993-01-31|1993-02-24|COLLECT COD|SHIP|e. fluffily regular |
+129|169|6|7|1|1069.16|0.05|0.04|R|F|1993-01-26|1993-01-08|1993-02-24|DELIVER IN PERSON|FOB|e carefully blithely bold dolp|
+130|129|10|1|14|14407.68|0.08|0.05|A|F|1992-08-15|1992-07-25|1992-09-13|COLLECT COD|RAIL| requests. final instruction|
+130|2|5|2|48|43296.00|0.03|0.02|R|F|1992-07-01|1992-07-12|1992-07-24|NONE|AIR|lithely alongside of the regu|
+130|12|3|3|18|16416.18|0.04|0.08|A|F|1992-07-04|1992-06-14|1992-07-29|DELIVER IN PERSON|MAIL| slyly ironic decoys abou|
+130|116|6|4|13|13209.43|0.09|0.02|R|F|1992-06-26|1992-07-29|1992-07-05|NONE|FOB| pending dolphins sleep furious|
+130|70|7|5|31|30072.17|0.06|0.05|R|F|1992-09-01|1992-07-18|1992-09-02|TAKE BACK RETURN|RAIL|thily about the ruth|
+131|168|7|1|45|48067.20|0.10|0.02|R|F|1994-09-14|1994-09-02|1994-10-04|NONE|FOB|ironic, bold accounts. careful|
+131|45|8|2|50|47252.00|0.02|0.04|A|F|1994-09-17|1994-08-10|1994-09-21|NONE|SHIP|ending requests. final, ironic pearls slee|
+131|190|1|3|4|4360.76|0.04|0.03|A|F|1994-09-20|1994-08-30|1994-09-23|COLLECT COD|REG AIR| are carefully slyly i|
+132|141|8|1|18|18740.52|0.00|0.08|R|F|1993-07-10|1993-08-05|1993-07-13|NONE|TRUCK|ges. platelets wake furio|
+132|120|1|2|43|43865.16|0.01|0.08|R|F|1993-09-01|1993-08-16|1993-09-22|NONE|TRUCK|y pending theodolites|
+132|115|6|3|32|32483.52|0.04|0.04|A|F|1993-07-12|1993-08-05|1993-08-05|COLLECT COD|TRUCK|d instructions hagg|
+132|29|2|4|23|21367.46|0.10|0.00|A|F|1993-06-16|1993-08-27|1993-06-23|DELIVER IN PERSON|AIR|refully blithely bold acco|
+133|104|7|1|27|27110.70|0.00|0.02|N|O|1997-12-21|1998-02-23|1997-12-27|TAKE BACK RETURN|MAIL|yly even gifts after the sl|
+133|177|5|2|12|12926.04|0.02|0.06|N|O|1997-12-02|1998-01-15|1997-12-29|DELIVER IN PERSON|REG AIR|ts cajole fluffily quickly i|
+133|118|8|3|29|29525.19|0.09|0.08|N|O|1998-02-28|1998-01-30|1998-03-09|DELIVER IN PERSON|RAIL| the carefully regular theodoli|
+133|90|1|4|11|10890.99|0.06|0.01|N|O|1998-03-21|1998-01-15|1998-04-04|DELIVER IN PERSON|REG AIR|e quickly across the dolphins|
+134|1|2|1|21|18921.00|0.00|0.03|A|F|1992-07-17|1992-07-08|1992-07-26|COLLECT COD|SHIP|s. quickly regular|
+134|165|2|2|35|37280.60|0.06|0.07|A|F|1992-08-23|1992-06-01|1992-08-24|NONE|MAIL|ajole furiously. instructio|
+134|189|10|3|26|28318.68|0.09|0.06|A|F|1992-06-20|1992-07-12|1992-07-16|NONE|RAIL| among the pending depos|
+134|145|6|4|47|49121.58|0.05|0.00|A|F|1992-08-16|1992-07-06|1992-08-28|NONE|REG AIR|s! carefully unusual requests boost careful|
+134|36|7|5|12|11232.36|0.05|0.02|A|F|1992-07-03|1992-06-01|1992-07-11|COLLECT COD|TRUCK|nts are quic|
+134|134|10|6|12|12409.56|0.00|0.00|A|F|1992-08-08|1992-07-07|1992-08-20|TAKE BACK RETURN|FOB|lyly regular pac|
+135|109|10|1|47|47427.70|0.06|0.08|N|O|1996-02-18|1996-01-01|1996-02-25|COLLECT COD|RAIL|ctions wake slyly abo|
+135|199|3|2|21|23082.99|0.00|0.07|N|O|1996-02-11|1996-01-12|1996-02-13|DELIVER IN PERSON|SHIP| deposits believe. furiously regular p|
+135|158|10|3|33|34918.95|0.02|0.00|N|O|1996-01-03|1995-11-21|1996-02-01|TAKE BACK RETURN|MAIL|ptotes boost slowly care|
+135|68|7|4|34|32914.04|0.02|0.03|N|O|1996-01-12|1996-01-19|1996-02-05|NONE|TRUCK|counts doze against the blithely ironi|
+135|137|8|5|20|20742.60|0.01|0.04|N|O|1996-01-25|1995-11-20|1996-02-09|NONE|MAIL|theodolites. quickly p|
+135|115|5|6|13|13196.43|0.04|0.02|N|O|1995-11-12|1995-12-22|1995-11-17|NONE|FOB|nal ideas. final instr|
+160|15|2|1|36|32940.36|0.07|0.01|N|O|1997-03-11|1997-03-11|1997-03-20|COLLECT COD|MAIL|old, ironic deposits are quickly abov|
+160|87|8|2|22|21715.76|0.00|0.04|N|O|1997-02-18|1997-03-05|1997-03-05|COLLECT COD|RAIL|ncies about the request|
+160|21|10|3|34|31314.68|0.01|0.05|N|O|1997-01-31|1997-03-13|1997-02-14|NONE|FOB|st sleep even gifts. dependencies along|
+161|103|10|1|19|19058.90|0.01|0.01|A|F|1994-12-13|1994-11-19|1994-12-26|DELIVER IN PERSON|TRUCK|, regular sheaves sleep along|
+162|190|1|1|2|2180.38|0.02|0.01|N|O|1995-09-02|1995-06-17|1995-09-08|COLLECT COD|FOB|es! final somas integrate|
+163|168|3|1|43|45930.88|0.01|0.00|N|O|1997-09-19|1997-11-19|1997-10-03|COLLECT COD|REG AIR|al, bold dependencies wake. iron|
+163|121|2|2|13|13274.56|0.01|0.04|N|O|1997-11-11|1997-10-18|1997-12-07|DELIVER IN PERSON|TRUCK|inal requests. even pinto beans hag|
+163|37|3|3|27|25299.81|0.04|0.08|N|O|1997-12-26|1997-11-28|1998-01-05|COLLECT COD|REG AIR|ously express dependen|
+163|193|5|4|5|5465.95|0.02|0.00|N|O|1997-11-17|1997-10-09|1997-12-05|DELIVER IN PERSON|TRUCK| must belie|
+163|127|2|5|12|12325.44|0.10|0.00|N|O|1997-12-18|1997-10-26|1997-12-22|COLLECT COD|TRUCK|ly blithe accounts cajole |
+163|191|4|6|20|21823.80|0.00|0.07|N|O|1997-09-27|1997-11-15|1997-10-07|TAKE BACK RETURN|FOB|tructions integrate b|
+164|92|4|1|26|25794.34|0.09|0.04|A|F|1993-01-04|1992-11-21|1993-01-07|NONE|RAIL|s. blithely special courts are blithel|
+164|19|6|2|24|22056.24|0.05|0.05|R|F|1992-12-22|1992-11-27|1993-01-06|NONE|AIR|side of the slyly unusual theodolites. f|
+164|126|9|3|38|38992.56|0.03|0.06|R|F|1992-12-04|1992-11-23|1993-01-02|TAKE BACK RETURN|AIR|counts cajole fluffily regular packages. b|
+164|18|2|4|32|29376.32|0.05|0.01|R|F|1992-12-21|1992-12-23|1992-12-28|COLLECT COD|RAIL|ts wake again|
+164|148|1|5|43|45070.02|0.06|0.01|R|F|1992-11-26|1993-01-03|1992-12-08|COLLECT COD|RAIL|y carefully regular dep|
+164|109|10|6|27|27245.70|0.10|0.04|R|F|1992-12-23|1993-01-16|1993-01-10|DELIVER IN PERSON|AIR|ayers wake carefully a|
+164|4|7|7|23|20792.00|0.09|0.04|A|F|1992-11-03|1992-12-02|1992-11-12|NONE|REG AIR|ress packages haggle ideas. blithely spec|
+165|34|5|1|3|2802.09|0.01|0.08|R|F|1993-03-29|1993-03-06|1993-04-12|DELIVER IN PERSON|REG AIR|riously requests. depos|
+165|162|7|2|43|45672.88|0.08|0.05|R|F|1993-02-27|1993-04-19|1993-03-03|DELIVER IN PERSON|TRUCK|jole slyly according |
+165|59|1|3|15|14385.75|0.00|0.05|R|F|1993-04-10|1993-03-29|1993-05-01|COLLECT COD|SHIP| bold packages mainta|
+165|140|1|4|49|50966.86|0.07|0.06|A|F|1993-02-20|1993-04-02|1993-03-10|COLLECT COD|REG AIR|uses sleep slyly ruthlessly regular a|
+165|156|4|5|27|28516.05|0.01|0.04|R|F|1993-04-27|1993-03-04|1993-05-13|NONE|MAIL|around the ironic, even orb|
+166|65|2|1|37|35707.22|0.09|0.03|N|O|1995-11-16|1995-10-17|1995-12-13|NONE|MAIL|lar frays wake blithely a|
+166|167|8|2|13|13873.08|0.09|0.05|N|O|1995-11-09|1995-11-18|1995-11-14|COLLECT COD|SHIP|fully above the blithely fina|
+166|100|2|3|41|41004.10|0.07|0.03|N|O|1995-11-13|1995-11-07|1995-12-08|COLLECT COD|FOB|hily along the blithely pending fo|
+166|46|3|4|8|7568.32|0.05|0.02|N|O|1995-12-30|1995-11-29|1996-01-29|DELIVER IN PERSON|RAIL|e carefully bold |
+167|102|3|1|28|28058.80|0.06|0.01|R|F|1993-02-19|1993-02-16|1993-03-03|DELIVER IN PERSON|TRUCK|sly during the u|
+167|172|2|2|27|28948.59|0.09|0.00|R|F|1993-05-01|1993-03-31|1993-05-31|TAKE BACK RETURN|FOB|eans affix furiously-- packages|
+192|98|1|1|23|22956.07|0.00|0.00|N|O|1998-02-05|1998-02-06|1998-03-07|TAKE BACK RETURN|AIR|ly pending theodolites haggle quickly fluf|
+192|162|7|2|20|21243.20|0.07|0.01|N|O|1998-03-13|1998-02-02|1998-03-31|TAKE BACK RETURN|REG AIR|tes. carefu|
+192|111|8|3|15|15166.65|0.09|0.01|N|O|1998-01-30|1998-02-10|1998-02-23|TAKE BACK RETURN|TRUCK|he ironic requests haggle about|
+192|197|1|4|2|2194.38|0.06|0.02|N|O|1998-03-06|1998-02-03|1998-03-24|COLLECT COD|SHIP|s. dependencies nag furiously alongside|
+192|83|4|5|25|24577.00|0.02|0.03|N|O|1998-02-15|1998-01-11|1998-03-17|COLLECT COD|TRUCK|. carefully regular|
+192|142|9|6|45|46896.30|0.00|0.05|N|O|1998-03-11|1998-01-09|1998-04-03|NONE|MAIL|equests. ideas sleep idea|
+193|93|5|1|9|8937.81|0.06|0.06|A|F|1993-09-17|1993-10-08|1993-09-30|COLLECT COD|TRUCK|against the fluffily regular d|
+193|154|6|2|15|15812.25|0.02|0.07|R|F|1993-11-22|1993-10-09|1993-12-05|TAKE BACK RETURN|SHIP|ffily. regular packages d|
+193|94|6|3|23|22864.07|0.06|0.05|A|F|1993-08-21|1993-10-11|1993-09-02|DELIVER IN PERSON|TRUCK|ly even accounts wake blithely bold|
+194|3|6|1|17|15351.00|0.05|0.04|R|F|1992-05-24|1992-05-22|1992-05-30|COLLECT COD|AIR| regular deposi|
+194|184|5|2|1|1084.18|0.04|0.06|R|F|1992-04-30|1992-05-18|1992-05-23|NONE|REG AIR| regular theodolites. regular, iron|
+194|66|1|3|13|12558.78|0.08|0.08|A|F|1992-05-07|1992-06-18|1992-05-10|NONE|AIR|about the blit|
+194|146|7|4|36|37661.04|0.00|0.05|R|F|1992-05-21|1992-05-18|1992-05-27|TAKE BACK RETURN|RAIL|pecial packages wake after the slyly r|
+194|57|2|5|8|7656.40|0.04|0.00|R|F|1992-07-06|1992-06-25|1992-07-11|COLLECT COD|FOB|uriously unusual excuses|
+194|149|6|6|16|16786.24|0.06|0.03|A|F|1992-05-14|1992-06-14|1992-05-21|TAKE BACK RETURN|TRUCK|y regular requests. furious|
+194|168|7|7|21|22431.36|0.02|0.01|R|F|1992-05-06|1992-05-20|1992-05-07|COLLECT COD|REG AIR|accounts detect quickly dogged |
+195|85|6|1|6|5910.48|0.04|0.02|A|F|1994-01-09|1994-03-27|1994-01-28|COLLECT COD|REG AIR|y, even deposits haggle carefully. bli|
+195|94|8|2|41|40757.69|0.05|0.07|A|F|1994-02-24|1994-02-11|1994-03-20|NONE|TRUCK|rts detect in place of t|
+195|86|7|3|34|33526.72|0.08|0.08|R|F|1994-01-31|1994-02-11|1994-02-12|NONE|TRUCK| cajole furiously bold i|
+195|86|7|4|41|40429.28|0.06|0.04|R|F|1994-03-14|1994-03-13|1994-04-09|COLLECT COD|RAIL|ggle fluffily foxes. fluffily ironic ex|
+196|136|7|1|19|19686.47|0.03|0.02|R|F|1993-04-17|1993-05-27|1993-04-30|NONE|SHIP|sts maintain foxes. furiously regular p|
+196|10|3|2|15|13650.15|0.03|0.04|A|F|1993-07-05|1993-05-08|1993-07-06|TAKE BACK RETURN|SHIP|s accounts. furio|
+197|99|1|1|39|38964.51|0.02|0.04|N|O|1995-07-21|1995-07-01|1995-08-14|TAKE BACK RETURN|AIR|press accounts. daringly sp|
+197|178|8|2|8|8625.36|0.09|0.02|A|F|1995-04-17|1995-07-01|1995-04-27|DELIVER IN PERSON|SHIP|y blithely even deposits. blithely fina|
+197|156|4|3|17|17954.55|0.06|0.02|N|O|1995-08-02|1995-06-23|1995-08-03|COLLECT COD|REG AIR|ts. careful|
+197|18|5|4|25|22950.25|0.04|0.01|N|F|1995-06-13|1995-05-23|1995-06-24|TAKE BACK RETURN|FOB|s-- quickly final accounts|
+197|42|9|5|14|13188.56|0.09|0.01|R|F|1995-05-08|1995-05-24|1995-05-12|TAKE BACK RETURN|RAIL|use slyly slyly silent depo|
+197|106|1|6|1|1006.10|0.07|0.05|N|O|1995-07-15|1995-06-21|1995-08-11|COLLECT COD|RAIL| even, thin dependencies sno|
+198|57|8|1|33|31582.65|0.07|0.02|N|O|1998-01-05|1998-03-20|1998-01-10|TAKE BACK RETURN|TRUCK|carefully caref|
+198|16|10|2|20|18320.20|0.03|0.00|N|O|1998-01-15|1998-03-31|1998-01-25|DELIVER IN PERSON|FOB|carefully final escapades a|
+198|149|2|3|15|15737.10|0.04|0.02|N|O|1998-04-12|1998-02-26|1998-04-15|COLLECT COD|MAIL|es. quickly pending deposits s|
+198|11|5|4|35|31885.35|0.08|0.02|N|O|1998-02-27|1998-03-23|1998-03-14|TAKE BACK RETURN|RAIL|ests nod quickly furiously sly pinto be|
+198|102|3|5|33|33069.30|0.02|0.01|N|O|1998-03-22|1998-03-12|1998-04-14|DELIVER IN PERSON|SHIP|ending foxes acr|
+199|133|9|1|50|51656.50|0.02|0.00|N|O|1996-06-12|1996-06-03|1996-07-04|DELIVER IN PERSON|MAIL|essly regular ideas boost sly|
+199|134|5|2|30|31023.90|0.08|0.05|N|O|1996-03-27|1996-05-29|1996-04-14|NONE|TRUCK|ilent packages doze quickly. thinly |
+224|151|2|1|16|16818.40|0.04|0.00|A|F|1994-08-01|1994-07-30|1994-08-27|DELIVER IN PERSON|MAIL|y unusual foxes |
+224|109|2|2|34|34309.40|0.04|0.08|R|F|1994-07-13|1994-08-25|1994-07-31|COLLECT COD|TRUCK| carefully. final platelets |
+224|190|1|3|41|44697.79|0.07|0.04|A|F|1994-09-01|1994-09-15|1994-09-02|TAKE BACK RETURN|SHIP|after the furiou|
+224|167|4|4|12|12805.92|0.08|0.06|R|F|1994-10-12|1994-08-29|1994-10-20|DELIVER IN PERSON|MAIL|uriously regular packages. slyly fina|
+224|94|7|5|45|44734.05|0.07|0.07|R|F|1994-08-14|1994-09-02|1994-08-27|COLLECT COD|AIR|leep furiously regular requests. furiousl|
+224|51|3|6|4|3804.20|0.02|0.00|R|F|1994-09-08|1994-08-24|1994-10-04|DELIVER IN PERSON|FOB|tructions |
+225|172|3|1|4|4288.68|0.09|0.07|N|O|1995-08-05|1995-08-19|1995-09-03|TAKE BACK RETURN|SHIP|ng the ironic packages. asymptotes among |
+225|131|7|2|3|3093.39|0.00|0.08|N|O|1995-07-25|1995-07-08|1995-08-17|DELIVER IN PERSON|REG AIR| fluffily about the carefully bold a|
+225|199|2|3|45|49463.55|0.06|0.01|N|O|1995-08-17|1995-08-20|1995-08-30|TAKE BACK RETURN|FOB|the slyly even platelets use aro|
+225|147|4|4|24|25131.36|0.00|0.06|N|O|1995-09-23|1995-08-05|1995-10-16|COLLECT COD|MAIL|ironic accounts are final account|
+225|8|5|5|31|28148.00|0.04|0.06|N|O|1995-06-21|1995-07-24|1995-07-04|TAKE BACK RETURN|FOB|special platelets. quickly r|
+225|132|8|6|12|12385.56|0.00|0.00|A|F|1995-06-04|1995-07-15|1995-06-08|COLLECT COD|MAIL| unusual requests. bus|
+225|142|1|7|44|45854.16|0.10|0.06|N|O|1995-09-22|1995-08-16|1995-10-22|NONE|REG AIR|leep slyly |
+226|97|9|1|4|3988.36|0.00|0.00|R|F|1993-03-31|1993-04-30|1993-04-10|NONE|TRUCK|c foxes integrate carefully against th|
+226|138|4|2|46|47753.98|0.06|0.01|A|F|1993-07-06|1993-04-24|1993-07-13|COLLECT COD|FOB|s. carefully bold accounts cajol|
+226|38|4|3|35|32831.05|0.09|0.03|A|F|1993-03-31|1993-05-18|1993-04-01|NONE|RAIL|osits cajole. final, even foxes a|
+226|41|10|4|45|42346.80|0.10|0.02|R|F|1993-04-17|1993-05-27|1993-05-11|DELIVER IN PERSON|AIR| carefully pending pi|
+226|118|8|5|2|2036.22|0.07|0.02|R|F|1993-03-26|1993-04-13|1993-04-20|TAKE BACK RETURN|SHIP|al platelets. express somas |
+226|83|4|6|48|47187.84|0.02|0.00|A|F|1993-06-11|1993-05-15|1993-06-19|NONE|REG AIR|efully silent packages. final deposit|
+226|118|8|7|14|14253.54|0.09|0.00|R|F|1993-05-20|1993-06-05|1993-05-27|COLLECT COD|MAIL|ep carefully regular accounts. ironic|
+227|166|1|1|19|20257.04|0.05|0.06|N|O|1995-12-10|1996-01-30|1995-12-26|NONE|RAIL|s cajole furiously a|
+227|175|3|2|24|25804.08|0.07|0.07|N|O|1996-02-03|1995-12-24|1996-02-12|COLLECT COD|SHIP|uses across the blithe dependencies cajol|
+228|5|8|1|3|2715.00|0.10|0.08|A|F|1993-05-20|1993-04-08|1993-05-26|DELIVER IN PERSON|SHIP|ckages. sly|
+229|84|5|1|20|19681.60|0.02|0.03|R|F|1994-01-11|1994-01-31|1994-01-26|DELIVER IN PERSON|REG AIR|le. instructions use across the quickly fin|
+229|129|10|2|29|29844.48|0.07|0.00|A|F|1994-03-15|1994-03-02|1994-03-26|COLLECT COD|SHIP|s, final request|
+229|79|10|3|28|27413.96|0.02|0.02|R|F|1994-02-10|1994-02-02|1994-03-10|DELIVER IN PERSON|FOB| final, regular requests. platel|
+229|177|6|4|3|3231.51|0.02|0.08|R|F|1994-03-22|1994-03-24|1994-04-04|DELIVER IN PERSON|REG AIR|posits. furiously regular theodol|
+229|156|1|5|33|34852.95|0.03|0.06|R|F|1994-03-25|1994-02-11|1994-04-13|NONE|FOB| deposits; bold, ruthless theodolites|
+229|106|9|6|29|29176.90|0.04|0.00|R|F|1994-01-14|1994-02-16|1994-01-22|NONE|FOB|uriously pending |
+230|186|7|1|46|49964.28|0.09|0.00|R|F|1994-02-03|1994-01-15|1994-02-23|TAKE BACK RETURN|SHIP|old packages ha|
+230|195|7|2|6|6571.14|0.03|0.08|A|F|1994-01-26|1994-01-25|1994-02-13|NONE|REG AIR| sleep furiously about the p|
+230|8|5|3|1|908.00|0.07|0.06|R|F|1994-01-22|1994-01-03|1994-02-05|TAKE BACK RETURN|RAIL|blithely unusual dolphins. bold, ex|
+230|10|3|4|44|40040.44|0.08|0.06|R|F|1994-02-09|1994-01-18|1994-03-11|NONE|MAIL|deposits integrate slyly sile|
+230|19|9|5|8|7352.08|0.09|0.06|R|F|1993-11-03|1994-01-20|1993-11-11|TAKE BACK RETURN|TRUCK|g the instructions. fluffil|
+230|34|10|6|8|7472.24|0.00|0.05|R|F|1993-11-21|1994-01-05|1993-12-19|TAKE BACK RETURN|FOB|nal ideas. silent, reg|
+231|159|10|1|16|16946.40|0.04|0.08|R|F|1994-11-20|1994-10-29|1994-12-17|TAKE BACK RETURN|AIR|e furiously ironic pinto beans.|
+231|84|5|2|46|45267.68|0.04|0.05|R|F|1994-12-13|1994-12-02|1994-12-14|DELIVER IN PERSON|SHIP|affix blithely. bold requests among the f|
+231|199|1|3|50|54959.50|0.09|0.01|A|F|1994-12-11|1994-12-14|1994-12-13|NONE|RAIL|onic packages haggle fluffily a|
+231|57|8|4|31|29668.55|0.08|0.02|A|F|1994-11-05|1994-12-27|1994-11-30|TAKE BACK RETURN|SHIP|iously special decoys wake q|
+256|89|10|1|22|21759.76|0.09|0.02|R|F|1994-01-12|1993-12-28|1994-01-26|COLLECT COD|FOB|ke quickly ironic, ironic deposits. reg|
+256|119|6|2|40|40764.40|0.10|0.01|A|F|1993-11-30|1993-12-13|1993-12-02|NONE|FOB|nal theodolites. deposits cajole s|
+256|130|9|3|45|46355.85|0.02|0.08|R|F|1994-01-14|1994-01-17|1994-02-10|COLLECT COD|SHIP| grouches. ideas wake quickly ar|
+257|147|8|1|7|7329.98|0.05|0.02|N|O|1998-06-18|1998-05-15|1998-06-27|COLLECT COD|FOB|ackages sleep bold realms. f|
+258|107|4|1|8|8056.80|0.00|0.07|R|F|1994-01-20|1994-03-21|1994-02-09|NONE|REG AIR|ully about the fluffily silent dependencies|
+258|197|1|2|40|43887.60|0.10|0.01|A|F|1994-03-13|1994-02-23|1994-04-05|DELIVER IN PERSON|FOB|silent frets nod daringly busy, bold|
+258|162|3|3|45|47797.20|0.07|0.07|R|F|1994-03-04|1994-02-13|1994-03-30|DELIVER IN PERSON|TRUCK|regular excuses-- fluffily ruthl|
+258|133|9|4|31|32027.03|0.02|0.05|A|F|1994-04-20|1994-03-20|1994-04-28|COLLECT COD|REG AIR| slyly blithely special mul|
+258|36|2|5|25|23400.75|0.08|0.02|A|F|1994-04-13|1994-02-26|1994-04-29|TAKE BACK RETURN|TRUCK|leep pending packages.|
+258|147|4|6|36|37697.04|0.09|0.04|A|F|1994-01-11|1994-03-04|1994-01-18|DELIVER IN PERSON|AIR|nic asymptotes. slyly silent r|
+259|99|10|1|14|13987.26|0.00|0.08|A|F|1993-12-17|1993-12-09|1993-12-31|COLLECT COD|SHIP|ons against the express acco|
+259|162|1|2|14|14870.24|0.03|0.05|R|F|1993-11-10|1993-11-20|1993-11-17|DELIVER IN PERSON|FOB|ully even, regul|
+259|24|5|3|42|38808.84|0.09|0.00|R|F|1993-10-20|1993-11-18|1993-11-12|NONE|TRUCK|the slyly ironic pinto beans. fi|
+259|196|10|4|3|3288.57|0.08|0.06|R|F|1993-10-04|1993-11-07|1993-10-14|TAKE BACK RETURN|SHIP|ng slyly at the accounts.|
+259|193|6|5|6|6559.14|0.00|0.05|R|F|1993-12-05|1993-12-22|1993-12-21|COLLECT COD|TRUCK| requests sleep|
+260|156|7|1|50|52807.50|0.07|0.08|N|O|1997-03-24|1997-02-09|1997-04-20|TAKE BACK RETURN|REG AIR|c deposits |
+260|183|4|2|26|28162.68|0.02|0.07|N|O|1996-12-12|1997-02-06|1996-12-15|NONE|TRUCK|ld theodolites boost fl|
+260|42|1|3|27|25435.08|0.05|0.08|N|O|1997-03-23|1997-02-15|1997-04-22|TAKE BACK RETURN|RAIL|ions according to the|
+260|6|1|4|29|26274.00|0.10|0.06|N|O|1997-03-15|1997-01-14|1997-04-13|NONE|MAIL|fluffily even asymptotes. express wa|
+260|96|9|5|44|43827.96|0.01|0.05|N|O|1997-03-26|1997-02-03|1997-04-19|DELIVER IN PERSON|MAIL|above the blithely ironic instr|
+261|2|7|1|34|30668.00|0.05|0.08|R|F|1993-08-18|1993-09-24|1993-08-20|COLLECT COD|REG AIR|c packages. asymptotes da|
+261|66|7|2|20|19321.20|0.00|0.06|R|F|1993-10-21|1993-08-02|1993-11-04|DELIVER IN PERSON|RAIL|ites hinder |
+261|174|3|3|28|30076.76|0.08|0.03|R|F|1993-07-24|1993-08-20|1993-08-05|COLLECT COD|AIR|ironic packages nag slyly. carefully fin|
+261|119|3|4|49|49936.39|0.04|0.05|R|F|1993-09-12|1993-08-31|1993-10-07|COLLECT COD|SHIP|ions. bold accounts |
+261|61|6|5|49|47091.94|0.01|0.08|A|F|1993-09-29|1993-09-08|1993-10-01|COLLECT COD|SHIP| pinto beans haggle slyly furiously pending|
+261|97|9|6|20|19941.80|0.06|0.06|A|F|1993-10-15|1993-09-05|1993-11-07|NONE|AIR|ing to the special, ironic deposi|
+262|192|3|1|39|42595.41|0.01|0.05|N|O|1996-01-15|1996-02-18|1996-01-28|COLLECT COD|RAIL|usual, regular requests|
+262|61|6|2|33|31714.98|0.09|0.03|N|O|1996-03-10|1996-01-31|1996-03-27|TAKE BACK RETURN|AIR|atelets sleep furiously. requests cajole. b|
+262|59|1|3|35|33566.75|0.05|0.08|N|O|1996-03-12|1996-02-14|1996-04-11|COLLECT COD|MAIL|lites cajole along the pending packag|
+263|24|9|1|22|20328.44|0.06|0.08|R|F|1994-08-24|1994-06-20|1994-09-09|NONE|FOB|efully express fo|
+263|85|6|2|9|8865.72|0.08|0.00|A|F|1994-07-21|1994-07-16|1994-08-08|TAKE BACK RETURN|TRUCK|lms wake bl|
+263|143|2|3|50|52157.00|0.06|0.04|R|F|1994-08-18|1994-07-31|1994-08-22|NONE|TRUCK|re the packages. special|
+288|51|3|1|31|29482.55|0.00|0.03|N|O|1997-03-17|1997-04-28|1997-04-06|TAKE BACK RETURN|AIR|instructions wa|
+288|117|1|2|49|49838.39|0.08|0.05|N|O|1997-04-19|1997-05-19|1997-05-18|TAKE BACK RETURN|TRUCK|ic excuses sleep always spe|
+288|99|10|3|36|35967.24|0.02|0.02|N|O|1997-02-22|1997-05-07|1997-03-07|TAKE BACK RETURN|TRUCK|yly pending excu|
+288|79|10|4|19|18602.33|0.07|0.07|N|O|1997-03-14|1997-04-04|1997-03-26|NONE|MAIL|deposits. blithely quick courts ar|
+288|162|9|5|31|32926.96|0.10|0.04|N|O|1997-05-29|1997-04-24|1997-06-20|TAKE BACK RETURN|RAIL|ns. fluffily|
+289|174|2|1|25|26854.25|0.07|0.05|N|O|1997-03-18|1997-05-05|1997-04-15|DELIVER IN PERSON|FOB|out the quickly bold theodol|
+289|112|2|2|6|6072.66|0.06|0.05|N|O|1997-02-18|1997-05-08|1997-03-19|DELIVER IN PERSON|SHIP|d packages use fluffily furiously|
+289|17|4|3|44|40348.44|0.10|0.08|N|O|1997-06-05|1997-04-20|1997-07-02|COLLECT COD|MAIL|ly ironic foxes. asymptotes |
+289|40|6|4|48|45121.92|0.01|0.08|N|O|1997-03-14|1997-03-30|1997-03-24|DELIVER IN PERSON|RAIL|sits cajole. bold pinto beans x-ray fl|
+289|47|4|5|13|12311.52|0.10|0.03|N|O|1997-06-08|1997-04-06|1997-06-18|TAKE BACK RETURN|REG AIR|ts. quickly bold deposits alongside|
+290|6|1|1|35|31710.00|0.01|0.02|R|F|1994-04-01|1994-02-05|1994-04-27|NONE|MAIL|ove the final foxes detect slyly fluffily|
+290|129|4|2|2|2058.24|0.05|0.04|A|F|1994-01-30|1994-02-13|1994-02-21|TAKE BACK RETURN|TRUCK|. permanently furious reques|
+290|2|5|3|5|4510.00|0.03|0.05|A|F|1994-01-19|1994-02-24|1994-01-27|NONE|MAIL|ans integrate. requests sleep. fur|
+290|124|9|4|23|23554.76|0.05|0.08|R|F|1994-03-14|1994-02-21|1994-04-09|NONE|AIR|refully unusual packages. |
+291|123|6|1|21|21485.52|0.05|0.07|A|F|1994-05-26|1994-05-10|1994-06-23|COLLECT COD|TRUCK|y quickly regular theodolites. final t|
+291|138|9|2|19|19724.47|0.08|0.02|R|F|1994-06-14|1994-04-25|1994-06-19|NONE|REG AIR|e. ruthlessly final accounts after the|
+291|61|8|3|30|28831.80|0.10|0.02|R|F|1994-03-22|1994-04-30|1994-03-24|DELIVER IN PERSON|FOB| fluffily regular deposits. quickl|
+292|154|5|1|8|8433.20|0.10|0.03|R|F|1992-02-18|1992-03-30|1992-03-18|DELIVER IN PERSON|RAIL|sily bold deposits alongside of the ex|
+292|100|1|2|24|24002.40|0.08|0.04|R|F|1992-03-24|1992-03-06|1992-04-20|COLLECT COD|TRUCK| bold, pending theodolites u|
+293|9|6|1|14|12726.00|0.02|0.05|R|F|1992-10-19|1992-12-23|1992-11-10|DELIVER IN PERSON|SHIP|es. packages above the|
+293|187|8|2|11|11958.98|0.10|0.04|R|F|1992-12-24|1992-12-01|1993-01-12|COLLECT COD|MAIL| affix carefully quickly special idea|
+293|118|8|3|13|13235.43|0.04|0.02|A|F|1992-12-17|1992-12-26|1992-12-22|COLLECT COD|RAIL| wake after the quickly even deposits. bli|
+294|60|2|1|31|29761.86|0.00|0.01|R|F|1993-08-06|1993-08-19|1993-08-13|TAKE BACK RETURN|AIR|le fluffily along the quick|
+295|198|10|1|29|31847.51|0.02|0.07|A|F|1994-11-09|1994-12-08|1994-12-07|COLLECT COD|MAIL|inst the carefully ironic pinto beans. blit|
+295|92|6|2|26|25794.34|0.04|0.03|R|F|1994-12-13|1994-11-30|1995-01-06|DELIVER IN PERSON|AIR|ts above the slyly regular requests x-ray q|
+295|16|10|3|8|7328.08|0.10|0.07|R|F|1995-01-13|1994-11-17|1995-01-25|NONE|TRUCK| final instructions h|
+295|61|10|4|26|24987.56|0.10|0.04|A|F|1995-01-12|1994-11-22|1995-01-22|DELIVER IN PERSON|MAIL| carefully iron|
+320|5|2|1|30|27150.00|0.05|0.01|N|O|1997-12-04|1998-01-21|1997-12-13|NONE|RAIL| ironic, final accounts wake quick de|
+320|193|5|2|13|14211.47|0.03|0.00|N|O|1997-12-16|1997-12-26|1997-12-17|TAKE BACK RETURN|AIR|he furiously regular pinto beans. car|
+321|1|8|1|21|18921.00|0.01|0.08|A|F|1993-07-18|1993-04-24|1993-08-13|TAKE BACK RETURN|REG AIR|hockey players sleep slyly sl|
+321|141|4|2|41|42686.74|0.08|0.07|R|F|1993-06-21|1993-06-07|1993-07-09|NONE|REG AIR|special packages shall have to doze blit|
+322|153|8|1|12|12637.80|0.08|0.07|A|F|1992-06-29|1992-05-30|1992-07-11|NONE|AIR|ular theodolites promise qu|
+322|44|5|2|48|45313.92|0.02|0.07|A|F|1992-06-11|1992-06-16|1992-06-26|COLLECT COD|RAIL|dolites detect qu|
+322|13|3|3|20|18260.20|0.04|0.01|R|F|1992-04-26|1992-05-04|1992-05-22|DELIVER IN PERSON|MAIL|ckly toward |
+322|184|5|4|10|10841.80|0.06|0.03|R|F|1992-04-12|1992-05-13|1992-04-14|DELIVER IN PERSON|AIR| deposits grow slyly according to th|
+322|12|2|5|35|31920.35|0.07|0.06|A|F|1992-07-17|1992-05-03|1992-08-14|TAKE BACK RETURN|RAIL|egular accounts cajole carefully. even d|
+322|34|5|6|3|2802.09|0.08|0.05|A|F|1992-07-03|1992-05-10|1992-07-28|NONE|AIR|ending, ironic deposits along the blith|
+322|38|4|7|5|4690.15|0.01|0.02|A|F|1992-04-15|1992-05-12|1992-04-26|COLLECT COD|REG AIR| special grouches sleep quickly instructio|
+323|164|9|1|50|53208.00|0.05|0.04|A|F|1994-04-20|1994-04-25|1994-05-12|DELIVER IN PERSON|REG AIR|cial requests |
+323|96|8|2|18|17929.62|0.06|0.07|R|F|1994-04-13|1994-06-02|1994-05-10|DELIVER IN PERSON|TRUCK|posits cajole furiously pinto beans. |
+323|143|4|3|9|9388.26|0.07|0.04|A|F|1994-06-26|1994-06-10|1994-07-13|COLLECT COD|TRUCK|nic accounts. regular, regular pack|
+324|200|3|1|26|28605.20|0.07|0.01|R|F|1992-04-19|1992-05-28|1992-05-12|DELIVER IN PERSON|RAIL|ross the slyly regular s|
+325|159|1|1|34|36011.10|0.09|0.04|A|F|1993-10-28|1993-12-13|1993-11-17|TAKE BACK RETURN|MAIL|ly bold deposits. always iron|
+325|186|7|2|5|5430.90|0.07|0.08|A|F|1994-01-02|1994-01-05|1994-01-04|TAKE BACK RETURN|MAIL| theodolites. |
+325|19|3|3|35|32165.35|0.07|0.07|A|F|1993-12-06|1994-01-03|1993-12-26|DELIVER IN PERSON|REG AIR|packages wa|
+326|180|9|1|41|44287.38|0.06|0.03|N|O|1995-08-30|1995-07-09|1995-09-12|DELIVER IN PERSON|TRUCK|ily quickly bold ideas.|
+326|20|4|2|38|34960.76|0.02|0.08|N|O|1995-09-12|1995-08-23|1995-09-14|COLLECT COD|RAIL|es sleep slyly. carefully regular inst|
+326|184|5|3|25|27104.50|0.03|0.04|N|O|1995-08-03|1995-07-27|1995-08-16|NONE|AIR|ily furiously unusual accounts. |
+326|85|6|4|5|4925.40|0.03|0.08|N|O|1995-07-29|1995-07-13|1995-08-12|NONE|REG AIR|deas sleep according to the sometimes spe|
+326|35|6|5|31|28985.93|0.04|0.08|N|O|1995-09-27|1995-07-06|1995-10-22|NONE|TRUCK|cies sleep quick|
+326|157|9|6|41|43343.15|0.02|0.00|N|O|1995-07-05|1995-07-23|1995-07-20|TAKE BACK RETURN|REG AIR|to beans wake before the furiously re|
+326|43|10|7|47|44322.88|0.04|0.04|N|O|1995-09-16|1995-07-04|1995-10-04|NONE|REG AIR| special accounts sleep |
+327|144|3|1|16|16706.24|0.03|0.01|N|O|1995-07-05|1995-06-07|1995-07-09|TAKE BACK RETURN|TRUCK|cial ideas sleep af|
+327|42|9|2|9|8478.36|0.09|0.05|A|F|1995-05-24|1995-07-11|1995-06-05|NONE|AIR| asymptotes are fu|
+352|64|5|1|17|16389.02|0.07|0.05|R|F|1994-06-02|1994-05-31|1994-06-29|NONE|FOB|pending deposits sleep furiously |
+353|120|7|1|41|41824.92|0.00|0.06|A|F|1994-03-25|1994-03-31|1994-03-30|DELIVER IN PERSON|AIR|refully final theodoli|
+353|148|9|2|29|30396.06|0.09|0.00|A|F|1994-01-11|1994-03-19|1994-02-09|COLLECT COD|FOB|ctions impr|
+353|135|1|3|12|12421.56|0.06|0.01|R|F|1994-01-02|1994-03-26|1994-01-19|DELIVER IN PERSON|RAIL|g deposits cajole |
+353|78|7|4|46|44991.22|0.00|0.04|A|F|1994-04-14|1994-01-31|1994-05-05|DELIVER IN PERSON|FOB| ironic dolphins |
+353|117|4|5|9|9153.99|0.02|0.02|A|F|1994-03-15|1994-03-20|1994-03-18|TAKE BACK RETURN|RAIL|ual accounts! carefu|
+353|103|4|6|39|39120.90|0.02|0.05|A|F|1994-01-15|1994-03-30|1994-02-01|NONE|MAIL|losely quickly even accounts. c|
+354|50|7|1|14|13300.70|0.08|0.04|N|O|1996-04-12|1996-06-03|1996-05-08|NONE|SHIP|quickly regular grouches will eat. careful|
+354|194|8|2|24|26260.56|0.01|0.01|N|O|1996-05-08|1996-05-17|1996-06-07|DELIVER IN PERSON|AIR|y silent requests. regular, even accounts|
+354|59|10|3|50|47952.50|0.08|0.05|N|O|1996-03-21|1996-05-20|1996-04-04|COLLECT COD|TRUCK|to beans s|
+354|107|4|4|7|7049.70|0.06|0.01|N|O|1996-05-07|1996-04-18|1996-05-24|NONE|MAIL|ously idly ironic accounts-- quickl|
+354|31|2|5|18|16758.54|0.04|0.08|N|O|1996-03-31|1996-05-13|1996-04-27|DELIVER IN PERSON|RAIL| about the carefully unusual |
+354|62|1|6|36|34634.16|0.03|0.02|N|O|1996-03-19|1996-05-29|1996-03-30|NONE|AIR|onic requests thrash bold g|
+354|5|10|7|14|12670.00|0.01|0.07|N|O|1996-07-06|1996-06-08|1996-07-10|TAKE BACK RETURN|MAIL|t thinly above the ironic, |
+355|114|1|1|31|31437.41|0.09|0.07|A|F|1994-07-13|1994-08-18|1994-07-18|DELIVER IN PERSON|FOB|y unusual, ironic|
+355|97|1|2|41|40880.69|0.05|0.00|A|F|1994-08-15|1994-07-19|1994-09-06|DELIVER IN PERSON|TRUCK| deposits. carefully r|
+356|46|7|1|4|3784.16|0.10|0.01|A|F|1994-07-28|1994-08-01|1994-08-04|DELIVER IN PERSON|REG AIR| the dependencies nod unusual, final ac|
+356|108|3|2|48|48388.80|0.02|0.03|R|F|1994-08-12|1994-07-31|1994-08-26|NONE|FOB|unusual packages. furiously |
+356|119|3|3|35|35668.85|0.08|0.07|R|F|1994-10-14|1994-07-31|1994-10-23|COLLECT COD|TRUCK|s. unusual, final|
+356|56|1|4|41|39198.05|0.07|0.05|A|F|1994-09-28|1994-09-20|1994-10-07|COLLECT COD|SHIP| according to the express foxes will|
+356|125|8|5|37|37929.44|0.05|0.03|A|F|1994-07-15|1994-08-24|1994-08-09|DELIVER IN PERSON|FOB|ndencies are since the packag|
+357|114|5|1|26|26366.86|0.06|0.03|N|O|1996-12-28|1996-11-26|1997-01-13|NONE|FOB| carefully pending accounts use a|
+357|186|7|2|36|39102.48|0.07|0.06|N|O|1996-12-28|1996-11-13|1997-01-24|DELIVER IN PERSON|AIR|d the carefully even requests. |
+357|165|2|3|32|34085.12|0.05|0.07|N|O|1997-01-28|1996-12-29|1997-02-14|NONE|MAIL|y above the carefully final accounts|
+358|191|3|1|41|44738.79|0.06|0.01|A|F|1993-11-18|1993-11-14|1993-11-28|NONE|TRUCK|ely frets. furious deposits sleep |
+358|190|1|2|32|34886.08|0.05|0.08|A|F|1993-10-18|1993-12-12|1993-10-31|NONE|TRUCK|y final foxes sleep blithely sl|
+358|169|6|3|40|42766.40|0.09|0.01|A|F|1993-12-05|1993-11-04|1994-01-01|COLLECT COD|MAIL|ng the ironic theo|
+358|97|10|4|15|14956.35|0.08|0.08|A|F|1993-10-04|1993-12-17|1993-10-23|TAKE BACK RETURN|MAIL|out the blithely ironic deposits slee|
+358|29|2|5|18|16722.36|0.01|0.02|R|F|1993-10-07|1993-11-01|1993-10-26|COLLECT COD|SHIP|olphins haggle ironic accounts. f|
+358|162|3|6|32|33989.12|0.03|0.05|R|F|1993-12-21|1993-11-06|1994-01-17|DELIVER IN PERSON|RAIL|lyly express deposits |
+358|83|4|7|45|44238.60|0.05|0.02|A|F|1993-12-08|1993-10-29|1993-12-30|NONE|REG AIR|to beans. regular, unusual deposits sl|
+359|166|7|1|30|31984.80|0.00|0.08|A|F|1995-01-06|1995-02-20|1995-01-20|TAKE BACK RETURN|AIR|uses detect spec|
+359|12|9|2|18|16416.18|0.00|0.03|A|F|1995-01-27|1995-03-18|1995-01-31|DELIVER IN PERSON|RAIL|unusual warthogs. ironically sp|
+359|132|8|3|17|17546.21|0.07|0.06|A|F|1995-01-31|1995-03-18|1995-02-10|COLLECT COD|SHIP|sts according to the blithely|
+359|90|1|4|38|37623.42|0.10|0.08|R|F|1995-03-30|1995-01-20|1995-04-25|DELIVER IN PERSON|RAIL|g furiously. regular, sile|
+359|168|5|5|11|11749.76|0.01|0.03|A|F|1995-02-15|1995-01-27|1995-02-18|NONE|FOB|rets wake blithely. slyly final dep|
+359|183|4|6|23|24913.14|0.04|0.07|R|F|1995-01-31|1995-03-11|1995-02-16|DELIVER IN PERSON|REG AIR|ic courts snooze quickly furiously final fo|
+384|179|8|1|38|41008.46|0.07|0.01|R|F|1992-06-02|1992-04-18|1992-06-10|DELIVER IN PERSON|TRUCK|totes cajole blithely against the even|
+384|64|3|2|49|47238.94|0.09|0.07|A|F|1992-04-01|1992-04-25|1992-04-18|COLLECT COD|AIR|refully carefully ironic instructions. bl|
+384|182|3|3|11|11903.98|0.02|0.08|A|F|1992-04-02|1992-04-21|1992-04-15|COLLECT COD|MAIL|ash carefully|
+384|93|6|4|11|10923.99|0.00|0.06|R|F|1992-06-24|1992-05-29|1992-07-22|COLLECT COD|TRUCK|nic excuses are furiously above the blith|
+384|132|8|5|14|14449.82|0.08|0.06|R|F|1992-06-14|1992-05-29|1992-07-05|DELIVER IN PERSON|TRUCK|ckages are slyly after the slyly specia|
+385|167|6|1|7|7470.12|0.05|0.06|N|O|1996-05-23|1996-05-09|1996-06-06|DELIVER IN PERSON|REG AIR| special asymptote|
+385|54|9|2|46|43886.30|0.08|0.07|N|O|1996-03-29|1996-05-17|1996-04-18|NONE|REG AIR|lthily ironic f|
+386|153|5|1|39|41072.85|0.10|0.07|A|F|1995-05-10|1995-02-28|1995-05-25|NONE|SHIP|hely. carefully regular accounts hag|
+386|69|4|2|16|15504.96|0.06|0.01|A|F|1995-04-12|1995-04-18|1995-05-11|DELIVER IN PERSON|MAIL|lithely fluffi|
+386|131|2|3|37|38151.81|0.09|0.04|A|F|1995-05-23|1995-03-01|1995-05-25|TAKE BACK RETURN|MAIL|ending pearls breach fluffily. slyly pen|
+387|137|8|1|1|1037.13|0.08|0.03|N|O|1997-05-06|1997-04-23|1997-05-10|NONE|SHIP| pinto beans wake furiously carefu|
+387|153|4|2|42|44232.30|0.07|0.05|N|O|1997-05-25|1997-02-25|1997-05-29|DELIVER IN PERSON|RAIL|lithely final theodolites.|
+387|97|10|3|40|39883.60|0.09|0.02|N|O|1997-03-08|1997-04-18|1997-03-31|COLLECT COD|TRUCK| quickly ironic platelets are slyly. fluff|
+387|56|7|4|19|18164.95|0.08|0.00|N|O|1997-03-14|1997-04-21|1997-04-04|NONE|REG AIR|gular dependencies|
+387|149|6|5|32|33572.48|0.08|0.06|N|O|1997-05-02|1997-04-11|1997-05-11|DELIVER IN PERSON|TRUCK|gle. silent, fur|
+388|33|9|1|42|39187.26|0.05|0.06|R|F|1993-02-21|1993-02-26|1993-03-15|COLLECT COD|FOB|accounts sleep furiously|
+388|128|9|2|46|47293.52|0.07|0.01|A|F|1993-03-22|1993-01-26|1993-03-24|COLLECT COD|FOB|to beans nag about the careful reque|
+388|65|2|3|40|38602.40|0.06|0.01|A|F|1992-12-24|1993-01-28|1993-01-19|TAKE BACK RETURN|REG AIR|quests against the carefully unusual epi|
+389|190|1|1|2|2180.38|0.09|0.00|R|F|1994-04-13|1994-04-10|1994-04-25|TAKE BACK RETURN|RAIL|fts. courts eat blithely even dependenc|
+390|107|10|1|10|10071.00|0.02|0.05|N|O|1998-05-26|1998-07-06|1998-06-23|TAKE BACK RETURN|SHIP| requests. final accounts x-ray beside the|
+390|124|7|2|17|17410.04|0.09|0.06|N|O|1998-06-07|1998-06-14|1998-07-07|COLLECT COD|SHIP|ending, pending pinto beans wake slyl|
+390|184|5|3|46|49872.28|0.07|0.04|N|O|1998-06-06|1998-05-20|1998-06-14|DELIVER IN PERSON|SHIP|cial excuses. bold, pending packages|
+390|142|3|4|42|43769.88|0.01|0.05|N|O|1998-06-06|1998-06-22|1998-07-05|COLLECT COD|SHIP|counts nag across the sly, sil|
+390|128|3|5|13|13365.56|0.02|0.06|N|O|1998-07-08|1998-05-10|1998-07-18|DELIVER IN PERSON|SHIP|sleep carefully idle packages. blithely |
+390|125|4|6|11|11276.32|0.09|0.06|N|O|1998-05-05|1998-05-15|1998-06-01|DELIVER IN PERSON|SHIP|according to the foxes are furiously |
+390|85|6|7|24|23641.92|0.05|0.02|N|O|1998-04-18|1998-05-19|1998-04-28|TAKE BACK RETURN|AIR|y. enticingly final depos|
+391|122|1|1|14|14309.68|0.09|0.02|R|F|1995-02-11|1995-02-03|1995-02-13|TAKE BACK RETURN|TRUCK| escapades sleep furiously about |
+416|94|6|1|25|24852.25|0.00|0.05|A|F|1993-10-11|1993-11-26|1993-10-21|DELIVER IN PERSON|TRUCK|y final theodolites about|
+416|111|1|2|22|22244.42|0.10|0.00|R|F|1993-12-27|1993-12-17|1994-01-09|COLLECT COD|RAIL|rint blithely above the pending sentim|
+416|175|5|3|25|26879.25|0.07|0.01|R|F|1993-10-16|1993-12-03|1993-10-29|NONE|AIR|ses boost after the bold requests.|
+417|40|1|1|39|36661.56|0.01|0.02|A|F|1994-05-31|1994-05-02|1994-06-06|NONE|SHIP|y regular requests wake along |
+417|70|7|2|18|17461.26|0.00|0.01|R|F|1994-03-29|1994-04-10|1994-04-26|TAKE BACK RETURN|FOB|- final requests sle|
+417|45|2|3|41|38746.64|0.10|0.01|R|F|1994-04-11|1994-03-08|1994-05-06|COLLECT COD|RAIL|tes. regular requests across the |
+417|132|3|4|2|2064.26|0.01|0.03|R|F|1994-02-13|1994-04-19|1994-03-15|DELIVER IN PERSON|SHIP|uriously bol|
+418|19|3|1|31|28489.31|0.00|0.03|N|F|1995-06-05|1995-06-18|1995-06-26|COLLECT COD|FOB|final theodolites. fluffil|
+418|2|5|2|1|902.00|0.04|0.07|N|O|1995-06-23|1995-06-16|1995-07-23|DELIVER IN PERSON|AIR|regular, silent pinto|
+418|35|1|3|3|2805.09|0.04|0.06|N|O|1995-06-29|1995-07-12|1995-07-01|COLLECT COD|AIR|ly furiously regular w|
+419|153|8|1|33|34753.95|0.05|0.02|N|O|1996-11-06|1996-12-25|1996-11-20|TAKE BACK RETURN|TRUCK|y above the bli|
+419|65|2|2|32|30881.92|0.01|0.06|N|O|1996-12-04|1996-12-04|1996-12-24|COLLECT COD|SHIP|blithely regular requests. special pinto|
+419|71|1|3|15|14566.05|0.07|0.04|N|O|1996-12-17|1996-11-28|1996-12-19|TAKE BACK RETURN|REG AIR| sleep final, regular theodolites. fluffi|
+419|9|6|4|15|13635.00|0.01|0.02|N|O|1997-01-09|1996-12-22|1997-01-25|COLLECT COD|FOB|of the careful, thin theodolites. quickly s|
+419|149|2|5|17|17835.38|0.01|0.00|N|O|1997-01-13|1996-12-20|1997-02-01|COLLECT COD|REG AIR|lar dependencies: carefully regu|
+420|101|6|1|5|5005.50|0.04|0.03|N|O|1995-11-04|1996-01-02|1995-11-30|NONE|REG AIR|cajole blit|
+420|162|7|2|22|23367.52|0.05|0.04|N|O|1996-01-25|1995-12-16|1996-02-03|TAKE BACK RETURN|AIR|ly against the blithely re|
+420|48|1|3|45|42661.80|0.09|0.08|N|O|1996-01-14|1996-01-01|1996-01-26|COLLECT COD|FOB| final accounts. furiously express forges|
+420|75|6|4|12|11700.84|0.08|0.08|N|O|1996-02-05|1996-01-03|1996-02-12|TAKE BACK RETURN|REG AIR|c instructions are |
+420|73|2|5|37|36003.59|0.02|0.00|N|O|1995-11-16|1995-12-13|1995-11-19|DELIVER IN PERSON|SHIP|rbits. bold requests along the quickl|
+420|124|7|6|40|40964.80|0.01|0.05|N|O|1995-11-26|1995-12-26|1995-12-20|TAKE BACK RETURN|FOB| after the special|
+420|16|7|7|39|35724.39|0.00|0.08|N|O|1995-12-09|1995-12-16|1995-12-31|DELIVER IN PERSON|REG AIR|s. ironic waters about the car|
+421|134|5|1|1|1034.13|0.02|0.07|R|F|1992-05-29|1992-04-27|1992-06-09|NONE|TRUCK|oldly busy deposit|
+422|152|10|1|25|26303.75|0.10|0.07|N|O|1997-07-01|1997-08-17|1997-07-09|DELIVER IN PERSON|SHIP|carefully bold theodolit|
+422|171|1|2|10|10711.70|0.02|0.03|N|O|1997-06-15|1997-08-04|1997-07-08|TAKE BACK RETURN|AIR|he furiously ironic theodolite|
+422|176|4|3|46|49503.82|0.09|0.00|N|O|1997-06-21|1997-07-14|1997-06-27|DELIVER IN PERSON|RAIL| ideas. qu|
+422|162|7|4|25|26554.00|0.10|0.04|N|O|1997-08-24|1997-07-09|1997-09-22|NONE|FOB|ep along the furiousl|
+423|132|3|1|27|27867.51|0.06|0.03|N|O|1996-08-20|1996-08-01|1996-08-23|TAKE BACK RETURN|SHIP|ccounts. blithely regular pack|
+448|126|7|1|4|4104.48|0.00|0.04|N|O|1995-11-25|1995-10-20|1995-11-26|TAKE BACK RETURN|MAIL|nts thrash quickly among the b|
+448|173|1|2|46|49365.82|0.05|0.00|N|O|1995-08-31|1995-09-30|1995-09-09|COLLECT COD|SHIP| to the fluffily ironic packages.|
+448|27|6|3|35|32445.70|0.10|0.08|N|O|1995-09-27|1995-11-19|1995-10-20|COLLECT COD|REG AIR|ses nag quickly quickly ir|
+448|170|1|4|8|8561.36|0.10|0.00|N|O|1995-11-02|1995-10-16|1995-11-15|COLLECT COD|TRUCK|ounts wake blithely. furiously pending|
+448|138|9|5|23|23876.99|0.02|0.05|N|O|1995-09-26|1995-11-02|1995-10-17|NONE|SHIP|ious, final gifts|
+449|152|7|1|12|12625.80|0.02|0.08|N|O|1995-11-06|1995-08-25|1995-11-18|TAKE BACK RETURN|SHIP|ly. blithely ironic |
+449|109|6|2|4|4036.40|0.10|0.06|N|O|1995-10-27|1995-09-14|1995-11-21|DELIVER IN PERSON|FOB|are fluffily. requests are furiously|
+449|10|1|3|3|2730.03|0.07|0.08|N|O|1995-07-28|1995-09-11|1995-08-01|NONE|RAIL| bold deposits. express theodolites haggle|
+449|158|3|4|22|23279.30|0.07|0.00|N|O|1995-08-17|1995-09-04|1995-09-10|COLLECT COD|FOB|furiously final theodolites eat careful|
+450|162|7|1|42|44610.72|0.03|0.00|N|F|1995-06-07|1995-05-29|1995-06-23|TAKE BACK RETURN|SHIP|y asymptotes. regular depen|
+450|107|8|2|5|5035.50|0.03|0.02|A|F|1995-04-02|1995-05-06|1995-04-13|TAKE BACK RETURN|TRUCK|the pinto bea|
+450|143|6|3|32|33380.48|0.06|0.03|N|O|1995-07-02|1995-04-25|1995-07-30|TAKE BACK RETURN|SHIP| accounts nod fluffily even, pending|
+450|57|9|4|40|38282.00|0.05|0.03|R|F|1995-03-20|1995-05-25|1995-04-14|NONE|RAIL|ve. asymptote|
+450|79|10|5|2|1958.14|0.09|0.00|A|F|1995-03-11|1995-05-21|1995-03-16|COLLECT COD|AIR|y even pinto beans; qui|
+450|153|1|6|33|34753.95|0.08|0.05|R|F|1995-05-18|1995-05-22|1995-05-23|TAKE BACK RETURN|REG AIR|ily carefully final depo|
+451|130|9|1|36|37084.68|0.02|0.06|N|O|1998-06-18|1998-08-14|1998-06-20|TAKE BACK RETURN|AIR|rges can haggle carefully ironic, dogged |
+451|33|4|2|42|39187.26|0.05|0.01|N|O|1998-08-01|1998-08-05|1998-08-30|DELIVER IN PERSON|TRUCK|express excuses. blithely ironic pin|
+451|87|8|3|1|987.08|0.07|0.05|N|O|1998-07-13|1998-07-03|1998-08-04|DELIVER IN PERSON|AIR| carefully ironic packages solve furiously |
+451|77|5|4|28|27357.96|0.04|0.05|N|O|1998-06-16|1998-07-09|1998-06-17|DELIVER IN PERSON|SHIP| theodolites. even cou|
+452|115|6|1|2|2030.22|0.04|0.03|N|O|1997-12-26|1998-01-03|1998-01-12|COLLECT COD|FOB|y express instru|
+453|198|1|1|45|49418.55|0.01|0.00|N|O|1997-06-30|1997-08-20|1997-07-19|COLLECT COD|REG AIR|ifts wake carefully.|
+453|176|4|2|38|40894.46|0.08|0.04|N|O|1997-06-30|1997-07-08|1997-07-16|DELIVER IN PERSON|REG AIR| furiously f|
+453|14|1|3|38|34732.38|0.10|0.01|N|O|1997-08-10|1997-07-24|1997-09-07|NONE|SHIP|sts cajole. furiously un|
+453|96|7|4|45|44824.05|0.10|0.01|N|O|1997-09-18|1997-06-29|1997-10-14|TAKE BACK RETURN|AIR|ironic foxes. slyly pending depos|
+453|26|1|5|32|29632.64|0.04|0.01|N|O|1997-07-15|1997-06-27|1997-07-18|NONE|REG AIR|s. fluffily bold packages cajole. unu|
+453|95|7|6|28|27862.52|0.07|0.07|N|O|1997-08-16|1997-08-12|1997-08-27|NONE|MAIL|final dependencies. slyly special pl|
+454|118|8|1|24|24434.64|0.06|0.01|N|O|1996-04-26|1996-03-23|1996-05-20|NONE|TRUCK|le. deposits after the ideas nag unusual pa|
+455|157|9|1|42|44400.30|0.10|0.02|N|O|1997-01-26|1997-01-10|1997-02-22|DELIVER IN PERSON|REG AIR|around the quickly blit|
+455|28|9|2|44|40832.88|0.05|0.08|N|O|1997-01-17|1997-02-22|1997-02-12|TAKE BACK RETURN|TRUCK| accounts sleep slyly ironic asymptote|
+455|49|2|3|45|42706.80|0.04|0.06|N|O|1996-12-20|1997-01-31|1997-01-07|TAKE BACK RETURN|SHIP|thrash ironically regular packages. qui|
+455|171|9|4|11|11782.87|0.01|0.02|N|O|1997-03-15|1997-02-14|1997-03-26|DELIVER IN PERSON|MAIL|g deposits against the slyly idle foxes u|
+480|53|4|1|22|20967.10|0.04|0.02|A|F|1993-06-16|1993-07-28|1993-07-09|NONE|MAIL|into beans cajole furiously. accounts s|
+481|19|9|1|17|15623.17|0.07|0.05|A|F|1992-10-21|1992-12-09|1992-11-19|DELIVER IN PERSON|MAIL|. quickly final accounts among the |
+481|21|2|2|19|17499.38|0.08|0.01|R|F|1993-01-09|1992-11-27|1993-01-14|TAKE BACK RETURN|AIR|p blithely after t|
+481|186|7|3|42|45619.56|0.08|0.08|A|F|1992-11-27|1992-11-11|1992-12-08|COLLECT COD|RAIL|mptotes are furiously among the iron|
+481|82|3|4|11|10802.88|0.05|0.06|A|F|1993-01-12|1992-11-17|1993-02-05|NONE|FOB|eful attai|
+481|112|9|5|31|31375.41|0.05|0.01|A|F|1993-01-15|1992-12-31|1993-01-21|DELIVER IN PERSON|AIR|usly final packages believe. quick|
+482|138|9|1|32|33220.16|0.00|0.02|N|O|1996-05-22|1996-05-14|1996-05-29|NONE|SHIP|usual deposits affix against |
+482|122|5|2|1|1022.12|0.05|0.08|N|O|1996-05-29|1996-05-20|1996-05-31|COLLECT COD|AIR|es. quickly ironic escapades sleep furious|
+482|62|9|3|31|29823.86|0.04|0.03|N|O|1996-06-01|1996-05-06|1996-06-17|NONE|MAIL| blithe pin|
+482|196|7|4|8|8769.52|0.02|0.05|N|O|1996-04-19|1996-05-05|1996-04-21|NONE|TRUCK|tructions near the final, regular ideas de|
+482|39|10|5|46|43195.38|0.01|0.06|N|O|1996-07-19|1996-06-05|1996-08-10|NONE|MAIL|furiously thin realms. final, fina|
+482|79|10|6|19|18602.33|0.04|0.00|N|O|1996-03-27|1996-04-25|1996-04-15|NONE|FOB|ts hinder carefully silent requests|
+483|33|9|1|8|7464.24|0.00|0.08|N|O|1995-08-22|1995-08-23|1995-09-18|COLLECT COD|RAIL|osits. carefully fin|
+483|80|1|2|23|22541.84|0.04|0.06|N|O|1995-07-20|1995-08-11|1995-08-04|DELIVER IN PERSON|MAIL|requests was quickly against th|
+483|88|9|3|9|8892.72|0.04|0.03|N|O|1995-09-10|1995-09-02|1995-09-13|NONE|AIR| carefully express ins|
+484|31|2|1|49|45620.47|0.10|0.02|N|O|1997-03-06|1997-02-28|1997-03-23|COLLECT COD|TRUCK|ven accounts|
+484|32|8|2|45|41941.35|0.06|0.07|N|O|1997-04-09|1997-03-20|1997-04-19|DELIVER IN PERSON|TRUCK|usly final excuses boost slyly blithe|
+484|184|5|3|50|54209.00|0.06|0.05|N|O|1997-01-24|1997-03-27|1997-02-22|DELIVER IN PERSON|MAIL|uctions wake. final, silent requests haggle|
+484|165|6|4|22|23433.52|0.07|0.03|N|O|1997-04-29|1997-03-26|1997-05-17|TAKE BACK RETURN|SHIP|es are pending instructions. furiously unu|
+484|77|6|5|48|46899.36|0.00|0.05|N|O|1997-03-05|1997-02-08|1997-03-22|TAKE BACK RETURN|MAIL|l, bold packages? even mult|
+484|97|9|6|10|9970.90|0.01|0.08|N|O|1997-04-06|1997-02-14|1997-04-16|COLLECT COD|FOB|x fluffily carefully regular|
+485|150|1|1|50|52507.50|0.01|0.00|N|O|1997-03-28|1997-05-26|1997-04-18|TAKE BACK RETURN|MAIL|iously quick excuses. carefully final f|
+485|28|7|2|40|37120.80|0.08|0.01|N|O|1997-04-29|1997-05-08|1997-04-30|TAKE BACK RETURN|TRUCK|al escapades|
+485|137|3|3|22|22816.86|0.00|0.05|N|O|1997-04-06|1997-04-27|1997-05-01|DELIVER IN PERSON|TRUCK|refully final notornis haggle according |
+486|76|7|1|36|35138.52|0.00|0.01|N|O|1996-06-25|1996-05-06|1996-07-07|COLLECT COD|AIR|deposits around the quickly regular packa|
+486|68|9|2|40|38722.40|0.03|0.08|N|O|1996-05-21|1996-06-06|1996-06-07|COLLECT COD|SHIP|ts nag quickly among the slyl|
+486|136|2|3|26|26939.38|0.04|0.03|N|O|1996-03-16|1996-05-25|1996-03-31|NONE|RAIL|forges along the |
+486|72|1|4|38|36938.66|0.08|0.05|N|O|1996-05-07|1996-04-26|1996-05-26|TAKE BACK RETURN|TRUCK| blithely final pinto |
+486|29|2|5|3|2787.06|0.07|0.05|N|O|1996-07-07|1996-04-20|1996-07-23|DELIVER IN PERSON|RAIL|ccounts ha|
+486|47|4|6|46|43563.84|0.00|0.03|N|O|1996-04-18|1996-05-02|1996-04-20|COLLECT COD|AIR|theodolites eat carefully furious|
+487|92|3|1|47|46628.23|0.06|0.06|R|F|1992-09-30|1992-10-08|1992-10-24|NONE|TRUCK|tions. blithely reg|
+487|83|4|2|2|1966.16|0.02|0.06|R|F|1992-10-19|1992-11-04|1992-11-11|COLLECT COD|TRUCK|oss the unusual pinto beans. reg|
+512|189|10|1|19|20694.42|0.08|0.05|N|O|1995-07-12|1995-07-11|1995-08-04|COLLECT COD|MAIL| sleep. requests alongside of the fluff|
+512|23|2|2|37|34151.74|0.01|0.04|N|O|1995-06-20|1995-07-05|1995-07-16|NONE|RAIL|nic depths cajole? blithely b|
+512|180|1|3|40|43207.20|0.05|0.02|N|O|1995-07-06|1995-07-08|1995-07-08|COLLECT COD|TRUCK|quests are da|
+512|83|4|4|10|9830.80|0.09|0.02|N|O|1995-09-16|1995-07-29|1995-10-07|NONE|AIR|xes. pinto beans cajole carefully; |
+512|65|6|5|6|5790.36|0.03|0.05|R|F|1995-06-10|1995-06-21|1995-06-16|DELIVER IN PERSON|FOB|en ideas haggle |
+512|33|9|6|12|11196.36|0.04|0.00|R|F|1995-05-21|1995-08-03|1995-06-09|COLLECT COD|FOB|old furiously express deposits. specia|
+512|51|9|7|2|1902.10|0.09|0.08|N|O|1995-06-19|1995-08-13|1995-06-24|NONE|TRUCK|e slyly silent accounts serve with|
+513|62|7|1|20|19241.20|0.09|0.07|N|O|1995-07-12|1995-05-31|1995-07-31|NONE|AIR|efully ironic ideas doze slyl|
+513|122|5|2|44|44973.28|0.01|0.01|N|O|1995-07-14|1995-07-14|1995-08-12|NONE|MAIL|kages sleep boldly ironic theodolites. acco|
+514|79|9|1|21|20560.47|0.06|0.02|N|O|1996-06-09|1996-05-15|1996-07-07|DELIVER IN PERSON|RAIL|s sleep quickly blithely|
+514|118|2|2|34|34615.74|0.08|0.02|N|O|1996-04-14|1996-06-03|1996-04-23|COLLECT COD|REG AIR|ily even patterns. bold, silent instruc|
+514|13|7|3|6|5478.06|0.06|0.01|N|O|1996-05-30|1996-06-04|1996-06-28|COLLECT COD|SHIP|as haggle blithely; quickly s|
+514|116|7|4|43|43692.73|0.00|0.08|N|O|1996-06-07|1996-05-14|1996-07-01|TAKE BACK RETURN|FOB|thely regular |
+515|105|8|1|10|10051.00|0.03|0.02|A|F|1993-10-04|1993-11-03|1993-10-08|NONE|FOB|ar deposits th|
+515|148|1|2|38|39829.32|0.10|0.07|A|F|1993-09-19|1993-11-12|1993-10-03|DELIVER IN PERSON|SHIP|ays. furiously express requests haggle furi|
+515|183|4|3|11|11914.98|0.00|0.02|R|F|1993-09-04|1993-10-02|1993-09-05|DELIVER IN PERSON|FOB|ly pending accounts haggle blithel|
+515|109|10|4|34|34309.40|0.09|0.03|R|F|1993-10-03|1993-10-26|1993-10-15|DELIVER IN PERSON|REG AIR|ic dependencie|
+515|131|7|5|32|32996.16|0.01|0.07|R|F|1993-10-10|1993-10-08|1993-11-02|TAKE BACK RETURN|FOB|r sauternes boost. final theodolites wake a|
+515|109|4|6|25|25227.50|0.04|0.08|R|F|1993-11-14|1993-11-07|1993-12-03|DELIVER IN PERSON|MAIL|e packages engag|
+516|25|4|1|11|10175.22|0.01|0.06|N|O|1998-05-02|1998-05-23|1998-05-12|DELIVER IN PERSON|FOB|ongside of the blithely final reque|
+517|45|6|1|28|26461.12|0.03|0.02|N|O|1997-04-30|1997-05-18|1997-05-17|COLLECT COD|MAIL| requests. special, fi|
+517|156|4|2|15|15842.25|0.02|0.00|N|O|1997-04-09|1997-06-26|1997-05-01|NONE|TRUCK| slyly. express requests ar|
+517|41|8|3|9|8469.36|0.04|0.00|N|O|1997-05-03|1997-06-16|1997-05-24|COLLECT COD|SHIP| slyly stealthily express instructions. |
+517|133|4|4|11|11364.43|0.06|0.02|N|O|1997-06-20|1997-06-01|1997-06-27|NONE|REG AIR|ly throughout the fu|
+517|24|3|5|23|21252.46|0.00|0.01|N|O|1997-04-19|1997-05-07|1997-05-12|COLLECT COD|RAIL| kindle. furiously bold requests mus|
+518|165|6|1|30|31954.80|0.07|0.05|N|O|1998-02-18|1998-03-27|1998-03-16|COLLECT COD|TRUCK|slyly by the packages. carefull|
+518|84|5|2|23|22633.84|0.05|0.07|N|O|1998-02-20|1998-05-05|1998-03-11|COLLECT COD|TRUCK| special requests. fluffily ironic re|
+518|134|5|3|12|12409.56|0.01|0.06|N|O|1998-03-08|1998-03-31|1998-04-06|NONE|AIR| packages thrash slyly|
+518|122|3|4|46|47017.52|0.07|0.02|N|O|1998-04-07|1998-04-17|1998-04-29|NONE|MAIL|. blithely even ideas cajole furiously. b|
+518|71|2|5|16|15537.12|0.01|0.01|N|O|1998-03-15|1998-03-24|1998-04-08|NONE|MAIL|use quickly expre|
+518|197|10|6|39|42790.41|0.09|0.08|N|O|1998-02-26|1998-03-17|1998-03-21|DELIVER IN PERSON|FOB| the bold, special deposits are carefully |
+518|186|7|7|48|52136.64|0.03|0.07|N|O|1998-03-06|1998-04-22|1998-03-14|NONE|FOB| slyly final platelets; quickly even deposi|
+519|159|4|1|1|1059.15|0.07|0.07|N|O|1997-12-01|1998-01-26|1997-12-23|COLLECT COD|REG AIR|bold requests believe furiou|
+519|3|4|2|38|34314.00|0.05|0.08|N|O|1998-02-19|1997-12-15|1998-03-19|DELIVER IN PERSON|FOB|gular excuses detect quickly furiously |
+519|106|1|3|19|19115.90|0.00|0.02|N|O|1998-01-09|1998-01-03|1998-02-06|COLLECT COD|AIR|asymptotes. p|
+519|47|6|4|27|25570.08|0.08|0.06|N|O|1997-11-20|1997-12-06|1997-12-16|DELIVER IN PERSON|REG AIR|le. even, final dependencies|
+519|10|5|5|13|11830.13|0.06|0.08|N|O|1998-02-06|1997-12-02|1998-03-03|TAKE BACK RETURN|TRUCK|c accounts wake along the ironic so|
+519|151|6|6|3|3153.45|0.04|0.00|N|O|1998-02-01|1998-01-25|1998-02-27|TAKE BACK RETURN|FOB|erve blithely blithely ironic asymp|
+544|139|10|1|47|48839.11|0.08|0.06|R|F|1993-03-14|1993-03-27|1993-03-27|COLLECT COD|SHIP|ecial pains. deposits grow foxes. |
+545|170|1|1|4|4280.68|0.02|0.00|N|O|1996-02-23|1995-12-16|1996-03-21|DELIVER IN PERSON|FOB|, ironic grouches cajole over|
+545|171|10|2|18|19281.06|0.00|0.00|N|O|1996-02-21|1996-01-17|1996-02-26|NONE|RAIL|al, final packages affix. even a|
+546|85|6|1|16|15761.28|0.08|0.02|N|O|1997-02-04|1996-12-30|1997-02-25|DELIVER IN PERSON|TRUCK|de of the orbits. sometimes regula|
+547|71|10|1|44|42727.08|0.08|0.08|N|O|1996-10-18|1996-08-17|1996-10-27|TAKE BACK RETURN|FOB|thely express dependencies. qu|
+547|137|8|2|48|49782.24|0.01|0.04|N|O|1996-10-21|1996-08-04|1996-11-20|COLLECT COD|SHIP|thely specia|
+547|182|3|3|3|3246.54|0.05|0.02|N|O|1996-09-04|1996-08-01|1996-09-21|COLLECT COD|SHIP|pinto beans. ironi|
+548|197|8|1|2|2194.38|0.06|0.05|A|F|1994-11-26|1994-11-06|1994-12-06|COLLECT COD|MAIL|ests haggle quickly eve|
+548|5|6|2|6|5430.00|0.00|0.08|A|F|1995-01-18|1994-12-08|1995-02-10|NONE|TRUCK|sits wake furiously regular|
+548|1|8|3|21|18921.00|0.03|0.08|A|F|1995-01-13|1994-12-18|1995-01-25|NONE|AIR|ideas. special accounts above the furiou|
+548|57|9|4|21|20098.05|0.08|0.03|A|F|1994-10-27|1994-12-04|1994-11-21|DELIVER IN PERSON|AIR| engage quickly. regular theo|
+548|93|7|5|19|18868.71|0.00|0.02|A|F|1994-09-24|1994-11-24|1994-10-01|DELIVER IN PERSON|MAIL|courts boost care|
+548|153|8|6|32|33700.80|0.06|0.04|A|F|1994-12-16|1994-11-20|1994-12-29|NONE|REG AIR|c instruction|
+549|196|9|1|18|19731.42|0.07|0.04|R|F|1992-10-19|1992-08-12|1992-11-13|COLLECT COD|REG AIR|furiously according to the ironic, regular |
+549|189|10|2|38|41388.84|0.07|0.05|A|F|1992-08-17|1992-08-28|1992-09-05|COLLECT COD|RAIL|the regular, furious excuses. carefu|
+549|66|7|3|36|34778.16|0.08|0.04|R|F|1992-09-11|1992-10-11|1992-09-12|DELIVER IN PERSON|AIR|ts against the ironic, even theodolites eng|
+549|21|4|4|18|16578.36|0.09|0.01|A|F|1992-07-31|1992-09-11|1992-08-08|NONE|RAIL|ely regular accounts above the |
+549|24|7|5|38|35112.76|0.06|0.02|R|F|1992-08-23|1992-08-12|1992-08-25|COLLECT COD|REG AIR|eposits. carefully regular depos|
+550|191|3|1|31|33826.89|0.04|0.02|N|O|1995-10-24|1995-09-27|1995-11-04|COLLECT COD|AIR|thely silent packages. unusual|
+551|24|9|1|8|7392.16|0.08|0.02|N|O|1995-07-29|1995-07-18|1995-08-02|NONE|REG AIR| wake quickly slyly pending platel|
+551|159|4|2|20|21183.00|0.00|0.07|N|O|1995-09-18|1995-08-25|1995-10-11|COLLECT COD|TRUCK|r ideas. final, even ideas hinder alongside|
+551|162|9|3|16|16994.56|0.07|0.06|N|O|1995-07-29|1995-08-19|1995-08-10|COLLECT COD|MAIL|y along the carefully ex|
+576|87|8|1|2|1974.16|0.07|0.01|N|O|1997-05-15|1997-06-30|1997-05-28|NONE|RAIL|ccounts along the ac|
+576|34|5|2|6|5604.18|0.06|0.05|N|O|1997-05-15|1997-07-26|1997-06-03|DELIVER IN PERSON|TRUCK|al deposits. slyly even sauternes a|
+576|37|3|3|6|5622.18|0.08|0.07|N|O|1997-08-28|1997-06-16|1997-09-25|DELIVER IN PERSON|FOB|ts. ironic multipliers |
+576|138|9|4|5|5190.65|0.03|0.07|N|O|1997-06-11|1997-06-17|1997-07-05|NONE|REG AIR|l foxes boost slyly. accounts af|
+577|26|5|1|25|23150.50|0.06|0.01|A|F|1995-04-09|1995-02-20|1995-05-09|TAKE BACK RETURN|AIR|ve slyly of the frets. careful|
+577|64|1|2|14|13496.84|0.08|0.03|R|F|1995-03-19|1995-02-25|1995-04-09|DELIVER IN PERSON|RAIL|l accounts wake deposits. ironic packa|
+578|156|7|1|40|42246.00|0.02|0.08|N|O|1997-02-10|1997-03-18|1997-02-11|NONE|SHIP|usly even platel|
+578|188|9|2|23|25028.14|0.05|0.08|N|O|1997-03-06|1997-03-03|1997-03-20|TAKE BACK RETURN|FOB|nstructions. ironic deposits|
+579|151|6|1|9|9460.35|0.00|0.05|N|O|1998-06-20|1998-04-28|1998-07-19|DELIVER IN PERSON|RAIL|e ironic, express deposits are furiously|
+579|33|4|2|39|36388.17|0.02|0.01|N|O|1998-06-21|1998-06-03|1998-06-26|COLLECT COD|REG AIR|ncies. furiously final r|
+579|60|5|3|6|5760.36|0.03|0.00|N|O|1998-04-24|1998-05-03|1998-05-08|TAKE BACK RETURN|TRUCK|ickly final requests-- bold accou|
+579|7|10|4|41|37187.00|0.04|0.05|N|O|1998-05-28|1998-05-01|1998-06-04|COLLECT COD|REG AIR|bold, express requests sublate slyly. blith|
+579|13|7|5|28|25564.28|0.00|0.03|N|O|1998-07-10|1998-05-24|1998-07-19|NONE|RAIL|ic ideas until th|
+579|167|6|6|5|5335.80|0.05|0.08|N|O|1998-05-02|1998-04-25|1998-05-05|COLLECT COD|REG AIR|refully silent ideas cajole furious|
+580|85|6|1|33|32507.64|0.03|0.05|N|O|1997-10-11|1997-09-19|1997-10-16|TAKE BACK RETURN|FOB|y express theodolites cajole carefully |
+580|174|5|2|31|33299.27|0.04|0.08|N|O|1997-10-04|1997-09-08|1997-10-15|COLLECT COD|FOB|ose alongside of the sl|
+580|185|6|3|19|20618.42|0.04|0.04|N|O|1997-07-23|1997-09-21|1997-08-15|NONE|FOB|mong the special packag|
+581|64|1|1|41|39526.46|0.09|0.07|N|O|1997-05-26|1997-04-06|1997-06-10|TAKE BACK RETURN|MAIL|nts. quickly|
+581|93|5|2|14|13903.26|0.06|0.08|N|O|1997-05-17|1997-04-14|1997-06-08|NONE|MAIL|. deposits s|
+581|101|6|3|49|49053.90|0.10|0.02|N|O|1997-02-27|1997-04-24|1997-03-10|TAKE BACK RETURN|MAIL|. slyly regular pinto beans acr|
+581|75|4|4|30|29252.10|0.10|0.08|N|O|1997-06-19|1997-05-21|1997-06-22|TAKE BACK RETURN|TRUCK| regular ideas grow furio|
+582|57|9|1|7|6699.35|0.07|0.00|N|O|1997-11-16|1997-11-29|1997-12-10|TAKE BACK RETURN|FOB|ithely unusual t|
+582|51|2|2|49|46601.45|0.05|0.03|N|O|1997-12-17|1998-01-12|1997-12-31|COLLECT COD|REG AIR|nts according to the furiously regular pin|
+582|141|4|3|42|43727.88|0.07|0.00|N|O|1997-11-15|1997-12-21|1997-12-03|COLLECT COD|SHIP|iously beside the silent de|
+582|168|9|4|36|38453.76|0.06|0.01|N|O|1997-12-09|1997-11-27|1997-12-26|TAKE BACK RETURN|SHIP|lar requests. quickly |
+583|145|6|1|1|1045.14|0.07|0.07|N|O|1997-06-17|1997-04-29|1997-06-28|NONE|TRUCK| regular, regular ideas. even, bra|
+583|120|4|2|47|47945.64|0.10|0.06|N|O|1997-07-14|1997-05-12|1997-08-11|DELIVER IN PERSON|AIR|nts are fluffily. furiously even re|
+583|130|5|3|34|35024.42|0.01|0.02|N|O|1997-05-11|1997-04-24|1997-06-03|DELIVER IN PERSON|MAIL|express req|
+583|142|1|4|33|34390.62|0.10|0.01|N|O|1997-05-28|1997-04-25|1997-06-24|NONE|AIR|kages cajole slyly across the|
+583|189|10|5|13|14159.34|0.04|0.06|N|O|1997-06-23|1997-05-29|1997-07-08|COLLECT COD|TRUCK|y sly theodolites. ironi|
+608|154|6|1|19|20028.85|0.08|0.06|N|O|1996-04-19|1996-05-02|1996-05-03|DELIVER IN PERSON|RAIL|ideas. the|
+608|198|1|2|40|43927.60|0.03|0.01|N|O|1996-05-21|1996-04-11|1996-06-02|NONE|AIR| alongside of the regular tithes. sly|
+609|66|5|1|21|20287.26|0.01|0.05|R|F|1994-08-24|1994-08-23|1994-08-27|DELIVER IN PERSON|FOB|de of the special warthogs. excu|
+610|111|8|1|49|49544.39|0.10|0.07|N|O|1995-08-29|1995-10-26|1995-09-12|TAKE BACK RETURN|SHIP|ular instruc|
+610|68|3|2|11|10648.66|0.07|0.08|N|O|1995-10-31|1995-10-25|1995-11-18|NONE|MAIL|blithely final |
+610|118|9|3|26|26470.86|0.09|0.04|N|O|1995-11-22|1995-09-09|1995-12-04|TAKE BACK RETURN|AIR|cross the furiously even theodolites sl|
+610|186|7|4|17|18465.06|0.03|0.03|N|O|1995-11-01|1995-10-30|1995-11-04|COLLECT COD|FOB|p quickly instead of the slyly pending foxe|
+610|146|7|5|39|40799.46|0.08|0.05|N|O|1995-10-30|1995-10-21|1995-11-11|TAKE BACK RETURN|REG AIR|counts. ironic warhorses are |
+610|95|7|6|5|4975.45|0.00|0.07|N|O|1995-08-11|1995-10-22|1995-08-26|TAKE BACK RETURN|FOB|n pinto beans. iro|
+610|190|1|7|27|29435.13|0.06|0.03|N|O|1995-09-02|1995-09-19|1995-09-15|NONE|REG AIR| ironic pinto beans haggle. blithe|
+611|17|7|1|39|35763.39|0.05|0.06|R|F|1993-05-06|1993-04-09|1993-05-22|TAKE BACK RETURN|SHIP|nto beans |
+611|81|2|2|1|981.08|0.08|0.07|R|F|1993-05-17|1993-02-26|1993-06-15|DELIVER IN PERSON|MAIL|ts. pending platelets aff|
+611|120|4|3|39|39784.68|0.09|0.02|A|F|1993-03-10|1993-03-10|1993-03-17|TAKE BACK RETURN|TRUCK|the evenly bold requests. furious|
+612|185|6|1|5|5425.90|0.07|0.00|R|F|1992-11-08|1992-11-20|1992-12-03|TAKE BACK RETURN|RAIL|structions. q|
+612|195|7|2|28|30665.32|0.07|0.06|R|F|1993-01-02|1992-12-11|1993-01-30|DELIVER IN PERSON|TRUCK|regular instructions affix bl|
+612|67|4|3|49|47385.94|0.00|0.08|A|F|1993-01-08|1992-11-25|1993-01-17|TAKE BACK RETURN|REG AIR|theodolite|
+612|39|5|4|28|26292.84|0.05|0.00|A|F|1992-11-12|1992-12-05|1992-12-02|TAKE BACK RETURN|REG AIR|lyly regular asym|
+612|88|9|5|1|988.08|0.08|0.04|R|F|1992-12-18|1992-12-13|1992-12-20|TAKE BACK RETURN|FOB| requests.|
+612|189|10|6|33|35942.94|0.10|0.03|R|F|1992-11-30|1992-12-01|1992-12-12|COLLECT COD|MAIL|bove the blithely even ideas. careful|
+613|91|5|1|17|16848.53|0.06|0.06|N|O|1995-09-23|1995-08-04|1995-10-15|NONE|SHIP|ar dependencie|
+613|79|7|2|6|5874.42|0.05|0.05|N|O|1995-08-05|1995-08-09|1995-08-08|TAKE BACK RETURN|MAIL|y ironic deposits eat |
+613|186|7|3|3|3258.54|0.03|0.01|N|O|1995-09-27|1995-09-11|1995-10-05|NONE|TRUCK|ccounts cajole. |
+613|159|10|4|7|7414.05|0.02|0.04|N|O|1995-09-07|1995-08-02|1995-09-16|DELIVER IN PERSON|MAIL|ously blithely final pinto beans. regula|
+614|195|8|1|21|22998.99|0.00|0.03|R|F|1993-03-29|1993-01-06|1993-04-16|TAKE BACK RETURN|TRUCK|arefully. slyly express packag|
+614|187|8|2|48|52184.64|0.07|0.07|A|F|1993-03-09|1993-01-19|1993-03-19|DELIVER IN PERSON|SHIP|riously special excuses haggle along the|
+614|167|2|3|43|45887.88|0.05|0.00|A|F|1993-03-07|1993-02-22|1993-03-18|DELIVER IN PERSON|SHIP| express accounts wake. slyly ironic ins|
+614|147|6|4|14|14659.96|0.04|0.06|A|F|1992-12-03|1993-02-14|1992-12-27|DELIVER IN PERSON|SHIP|ular packages haggle about the pack|
+614|196|8|5|30|32885.70|0.08|0.07|R|F|1993-01-16|1993-02-08|1993-02-12|TAKE BACK RETURN|FOB|tructions are f|
+614|137|8|6|48|49782.24|0.04|0.08|A|F|1992-12-14|1993-01-22|1993-01-11|NONE|TRUCK| regular platelets cajole quickly eve|
+615|105|6|1|36|36183.60|0.10|0.01|A|F|1992-06-01|1992-07-14|1992-06-27|NONE|FOB| packages. carefully final pinto bea|
+640|93|7|1|49|48661.41|0.09|0.02|R|F|1993-03-27|1993-04-17|1993-04-15|NONE|RAIL|s haggle slyly|
+640|1|4|2|40|36040.00|0.09|0.05|A|F|1993-05-11|1993-04-11|1993-05-15|COLLECT COD|TRUCK|oach according to the bol|
+640|180|8|3|22|23763.96|0.05|0.07|A|F|1993-05-07|1993-04-14|1993-05-21|TAKE BACK RETURN|TRUCK|osits across the slyly regular theodo|
+640|32|3|4|45|41941.35|0.07|0.07|R|F|1993-04-15|1993-04-23|1993-04-21|DELIVER IN PERSON|REG AIR|ong the qui|
+641|126|9|1|18|18470.16|0.01|0.08|R|F|1993-10-17|1993-10-11|1993-10-29|DELIVER IN PERSON|AIR|p blithely bold packages. quick|
+641|100|2|2|1|1000.10|0.09|0.02|R|F|1993-12-03|1993-10-28|1993-12-26|TAKE BACK RETURN|RAIL| nag across the regular foxes.|
+641|95|7|3|40|39803.60|0.05|0.06|R|F|1993-11-22|1993-10-20|1993-12-11|DELIVER IN PERSON|REG AIR|lets. furiously regular requests cajo|
+641|71|10|4|25|24276.75|0.03|0.02|A|F|1993-12-04|1993-11-18|1993-12-18|TAKE BACK RETURN|FOB|d, regular d|
+641|4|9|5|41|37064.00|0.07|0.04|R|F|1993-11-29|1993-10-27|1993-12-04|TAKE BACK RETURN|FOB| asymptotes are quickly. bol|
+642|54|5|1|26|24805.30|0.10|0.03|A|F|1994-04-16|1994-02-01|1994-04-27|COLLECT COD|REG AIR|quests according to the unu|
+643|13|3|1|28|25564.28|0.00|0.08|A|F|1995-04-13|1995-05-12|1995-04-14|TAKE BACK RETURN|TRUCK|ly regular requests nag sly|
+643|51|2|2|48|45650.40|0.01|0.02|N|O|1995-07-10|1995-06-07|1995-08-01|NONE|FOB|ly ironic accounts|
+643|163|2|3|23|24452.68|0.05|0.03|N|O|1995-07-09|1995-05-18|1995-07-31|COLLECT COD|RAIL|sits are carefully according to the e|
+643|45|4|4|39|36856.56|0.08|0.04|A|F|1995-06-08|1995-06-16|1995-06-13|COLLECT COD|RAIL| the pains. carefully s|
+643|190|1|5|47|51238.93|0.10|0.03|R|F|1995-04-05|1995-06-14|1995-04-26|DELIVER IN PERSON|RAIL|y against |
+644|134|10|1|46|47569.98|0.02|0.01|A|F|1992-05-20|1992-06-14|1992-06-14|DELIVER IN PERSON|RAIL| special requests was sometimes expre|
+644|130|3|2|11|11331.43|0.05|0.02|A|F|1992-08-20|1992-07-21|1992-09-11|TAKE BACK RETURN|TRUCK|ealthy pinto beans use carefu|
+644|101|6|3|44|44048.40|0.04|0.04|R|F|1992-08-17|1992-07-26|1992-08-20|COLLECT COD|REG AIR|iously ironic pinto beans. bold packa|
+644|80|8|4|7|6860.56|0.01|0.02|A|F|1992-05-18|1992-07-01|1992-06-07|COLLECT COD|RAIL| regular requests are blithely. slyly|
+644|50|1|5|23|21851.15|0.02|0.04|R|F|1992-07-31|1992-07-28|1992-08-13|DELIVER IN PERSON|TRUCK|uctions nag quickly alongside of t|
+644|85|6|6|33|32507.64|0.00|0.07|R|F|1992-08-26|1992-07-27|1992-08-28|NONE|AIR|ages sleep. bold, bo|
+644|51|9|7|38|36139.90|0.08|0.06|R|F|1992-05-17|1992-07-10|1992-06-06|TAKE BACK RETURN|MAIL| packages. blithely slow accounts nag quic|
+645|160|8|1|33|34985.28|0.01|0.02|A|F|1994-12-09|1995-02-21|1995-01-03|NONE|TRUCK|heodolites b|
+645|170|1|2|47|50297.99|0.07|0.05|R|F|1995-02-16|1995-02-15|1995-02-25|COLLECT COD|TRUCK|hely regular instructions alon|
+645|70|7|3|46|44623.22|0.10|0.01|A|F|1995-01-04|1995-02-21|1995-01-21|COLLECT COD|REG AIR| regular dependencies across the speci|
+645|96|9|4|49|48808.41|0.05|0.03|R|F|1995-01-24|1995-01-06|1995-02-17|NONE|TRUCK|y. slyly iron|
+645|5|8|5|43|38915.00|0.06|0.02|A|F|1995-02-12|1995-02-27|1995-03-06|TAKE BACK RETURN|REG AIR| furiously accounts. slyly|
+645|34|5|6|18|16812.54|0.10|0.08|A|F|1995-03-02|1995-02-08|1995-03-03|COLLECT COD|RAIL|ep. slyly even |
+645|28|9|7|9|8352.18|0.03|0.03|A|F|1994-12-25|1995-01-04|1995-01-15|COLLECT COD|REG AIR|special deposits. regular, final th|
+646|109|6|1|31|31282.10|0.00|0.05|R|F|1994-12-17|1995-02-16|1995-01-04|COLLECT COD|MAIL|ag furiousl|
+646|127|8|2|1|1027.12|0.07|0.01|A|F|1994-12-05|1995-01-07|1994-12-31|TAKE BACK RETURN|MAIL|t blithely regular deposits. quic|
+646|30|9|3|24|22320.72|0.06|0.02|A|F|1995-02-20|1994-12-30|1995-03-16|TAKE BACK RETURN|TRUCK|regular accounts haggle dog|
+646|99|2|4|34|33969.06|0.01|0.00|R|F|1994-12-28|1994-12-27|1994-12-31|COLLECT COD|SHIP|slow accounts. fluffily idle instructions|
+646|90|1|5|17|16831.53|0.04|0.01|A|F|1994-12-31|1994-12-26|1995-01-01|DELIVER IN PERSON|REG AIR|inal packages haggle carefully |
+646|115|2|6|40|40604.40|0.10|0.01|R|F|1995-01-01|1995-01-13|1995-01-11|COLLECT COD|TRUCK|ronic packages sleep across th|
+647|17|1|1|41|37597.41|0.08|0.08|N|O|1997-11-19|1997-09-24|1997-12-15|COLLECT COD|REG AIR|r instructions. quickly unusu|
+647|113|10|2|5|5065.55|0.10|0.00|N|O|1997-09-25|1997-09-22|1997-10-25|TAKE BACK RETURN|AIR|ly express packages haggle caref|
+647|153|8|3|15|15797.25|0.08|0.00|N|O|1997-09-23|1997-10-09|1997-10-21|NONE|MAIL|ve the even, bold foxes sleep |
+672|173|4|1|41|43999.97|0.06|0.06|R|F|1994-06-20|1994-07-03|1994-06-22|COLLECT COD|REG AIR| dependencies in|
+672|190|1|2|9|9811.71|0.03|0.04|R|F|1994-06-25|1994-06-06|1994-07-19|TAKE BACK RETURN|TRUCK|haggle carefully carefully reg|
+672|143|2|3|35|36509.90|0.02|0.01|R|F|1994-07-13|1994-06-04|1994-07-14|COLLECT COD|RAIL| dependencies haggle quickly. theo|
+673|71|10|1|22|21363.54|0.03|0.02|R|F|1994-03-15|1994-04-27|1994-03-29|TAKE BACK RETURN|TRUCK| the regular, even requests. carefully fin|
+674|102|5|1|23|23048.30|0.06|0.07|A|F|1992-10-25|1992-10-15|1992-11-03|COLLECT COD|SHIP|ve the quickly even deposits. blithe|
+674|59|4|2|4|3836.20|0.02|0.07|R|F|1992-10-05|1992-11-22|1992-10-22|NONE|RAIL|ly express pinto beans sleep car|
+675|157|9|1|1|1057.15|0.04|0.08|N|O|1997-11-27|1997-09-30|1997-12-12|DELIVER IN PERSON|REG AIR|ide of the slyly regular packages. unus|
+675|137|3|2|35|36299.55|0.08|0.07|N|O|1997-08-19|1997-10-16|1997-09-17|DELIVER IN PERSON|REG AIR|s. furiously expre|
+675|176|6|3|34|36589.78|0.10|0.04|N|O|1997-11-17|1997-10-07|1997-11-27|NONE|FOB|y final accounts unwind around the |
+675|100|4|4|15|15001.50|0.09|0.05|N|O|1997-10-18|1997-09-28|1997-11-13|COLLECT COD|TRUCK|posits after the furio|
+675|5|8|5|46|41630.00|0.09|0.05|N|O|1997-09-18|1997-10-14|1997-10-01|DELIVER IN PERSON|AIR| deposits along the express foxes |
+676|51|3|1|9|8559.45|0.09|0.02|N|O|1997-04-03|1997-02-02|1997-04-08|COLLECT COD|REG AIR|aintain sl|
+676|78|6|2|20|19561.40|0.07|0.07|N|O|1997-02-02|1997-02-01|1997-02-11|NONE|REG AIR|riously around the blithely |
+676|163|4|3|35|37210.60|0.05|0.01|N|O|1996-12-30|1997-01-13|1997-01-19|DELIVER IN PERSON|RAIL|into beans. blithe|
+676|73|1|4|24|23353.68|0.01|0.06|N|O|1997-02-05|1997-01-16|1997-03-07|TAKE BACK RETURN|TRUCK|ress, regular dep|
+676|166|1|5|31|33050.96|0.01|0.06|N|O|1997-02-06|1997-02-28|1997-03-08|COLLECT COD|TRUCK|ial deposits cajo|
+676|76|7|6|33|32210.31|0.09|0.05|N|O|1997-03-02|1997-02-22|1997-03-19|TAKE BACK RETURN|TRUCK|as wake slyly furiously close pinto b|
+676|143|6|7|11|11474.54|0.07|0.02|N|O|1997-03-09|1997-03-06|1997-03-31|TAKE BACK RETURN|MAIL|he final acco|
+677|59|7|1|32|30689.60|0.04|0.08|R|F|1994-01-06|1994-01-31|1994-02-02|NONE|RAIL|slyly final|
+677|168|9|2|39|41658.24|0.00|0.07|R|F|1993-12-19|1994-02-11|1994-01-05|TAKE BACK RETURN|SHIP|ges. furiously regular packages use |
+677|24|5|3|46|42504.92|0.01|0.02|R|F|1993-12-02|1994-02-12|1993-12-06|COLLECT COD|RAIL|ng theodolites. furiously unusual theodo|
+677|148|7|4|1|1048.14|0.06|0.05|R|F|1993-12-01|1994-01-14|1993-12-26|DELIVER IN PERSON|MAIL|ly. regular |
+677|150|9|5|25|26253.75|0.00|0.05|A|F|1994-03-12|1994-02-02|1994-03-28|DELIVER IN PERSON|AIR| packages integrate blithely|
+678|146|7|1|20|20922.80|0.05|0.08|R|F|1993-06-21|1993-04-07|1993-07-10|TAKE BACK RETURN|MAIL|furiously express excuses. foxes eat fu|
+678|37|3|2|22|20614.66|0.01|0.02|A|F|1993-05-10|1993-04-29|1993-06-08|NONE|REG AIR|de of the carefully even requests. bl|
+678|143|10|3|16|16690.24|0.06|0.02|R|F|1993-03-20|1993-04-13|1993-04-16|DELIVER IN PERSON|REG AIR|equests cajole around the carefully regular|
+678|199|10|4|48|52761.12|0.08|0.08|R|F|1993-02-28|1993-04-04|1993-03-24|NONE|REG AIR|ithely. slyly express foxes|
+678|98|9|5|16|15969.44|0.06|0.04|R|F|1993-03-09|1993-04-18|1993-04-07|NONE|AIR| about the |
+678|43|4|6|11|10373.44|0.09|0.00|R|F|1993-04-28|1993-05-16|1993-05-11|COLLECT COD|TRUCK|ess deposits dazzle f|
+679|192|3|1|9|9829.71|0.09|0.00|N|O|1995-12-20|1996-01-27|1996-01-07|COLLECT COD|REG AIR|leep slyly. entici|
+704|190|1|1|40|43607.60|0.05|0.05|N|O|1997-01-30|1997-01-10|1997-02-20|COLLECT COD|AIR|ggle quickly. r|
+704|4|5|2|14|12656.00|0.07|0.08|N|O|1997-02-02|1996-12-26|1997-02-19|DELIVER IN PERSON|REG AIR|ve the quickly final forges. furiously p|
+705|189|10|1|46|50102.28|0.05|0.06|N|O|1997-04-18|1997-05-06|1997-05-05|DELIVER IN PERSON|SHIP|ss deposits. ironic packa|
+705|117|7|2|35|35598.85|0.10|0.04|N|O|1997-03-25|1997-03-20|1997-04-23|TAKE BACK RETURN|FOB|carefully ironic accounts|
+706|197|9|1|23|25235.37|0.05|0.00|N|O|1995-12-06|1995-12-02|1995-12-16|COLLECT COD|SHIP|ckey players. requests above the|
+707|155|6|1|34|35875.10|0.01|0.02|R|F|1994-12-08|1995-01-15|1995-01-02|NONE|RAIL| dependencies|
+707|43|10|2|22|20746.88|0.00|0.06|A|F|1995-01-12|1994-12-28|1995-01-16|DELIVER IN PERSON|REG AIR| kindle ironically|
+708|124|7|1|3|3072.36|0.05|0.02|N|O|1998-10-09|1998-09-22|1998-11-07|COLLECT COD|FOB|e slyly pending foxes. |
+708|180|1|2|19|20523.42|0.06|0.00|N|O|1998-10-28|1998-09-23|1998-11-25|COLLECT COD|SHIP| requests. even, thin ideas|
+708|122|5|3|33|33729.96|0.09|0.06|N|O|1998-09-10|1998-09-20|1998-09-22|COLLECT COD|RAIL|s boost carefully ruthless theodolites. f|
+708|56|7|4|5|4780.25|0.07|0.07|N|O|1998-07-22|1998-08-15|1998-07-28|TAKE BACK RETURN|REG AIR|c pinto beans nag after the account|
+708|143|2|5|36|37553.04|0.08|0.01|N|O|1998-07-16|1998-09-04|1998-08-11|NONE|SHIP|ests. even, regular hockey p|
+708|23|6|6|7|6461.14|0.10|0.03|N|O|1998-08-16|1998-08-15|1998-09-10|COLLECT COD|REG AIR|lly express ac|
+709|87|8|1|7|6909.56|0.00|0.00|N|O|1998-06-14|1998-06-08|1998-06-18|TAKE BACK RETURN|RAIL| special orbits cajole |
+709|198|10|2|15|16472.85|0.08|0.00|N|O|1998-07-10|1998-06-26|1998-08-09|NONE|RAIL|ily regular deposits. sauternes was accor|
+709|169|8|3|10|10691.60|0.01|0.02|N|O|1998-06-04|1998-06-30|1998-06-11|NONE|REG AIR|ts cajole boldly |
+709|108|9|4|40|40324.00|0.10|0.08|N|O|1998-08-12|1998-06-20|1998-08-20|DELIVER IN PERSON|RAIL|ggle fluffily carefully ironic|
+710|163|8|1|47|49968.52|0.06|0.08|A|F|1993-01-18|1993-03-24|1993-01-24|TAKE BACK RETURN|MAIL|usual ideas into th|
+710|193|4|2|38|41541.22|0.07|0.02|R|F|1993-04-18|1993-03-12|1993-05-15|COLLECT COD|FOB|sts boost fluffily aft|
+710|139|5|3|7|7273.91|0.04|0.06|R|F|1993-01-20|1993-03-28|1993-02-15|TAKE BACK RETURN|REG AIR|xpress, special ideas. bl|
+710|90|1|4|25|24752.25|0.00|0.05|R|F|1993-03-31|1993-02-05|1993-04-22|COLLECT COD|FOB|eas detect do|
+710|186|7|5|12|13034.16|0.01|0.02|A|F|1993-02-18|1993-02-27|1993-03-07|DELIVER IN PERSON|MAIL|ions. slyly express theodolites al|
+710|114|4|6|21|21296.31|0.04|0.06|R|F|1993-03-22|1993-03-05|1993-03-27|DELIVER IN PERSON|SHIP|es. furiously p|
+710|160|2|7|46|48767.36|0.03|0.07|R|F|1993-04-16|1993-03-27|1993-05-05|COLLECT COD|MAIL|ges use; blithely pending excuses inte|
+711|146|3|1|2|2092.28|0.10|0.04|R|F|1993-12-01|1993-12-09|1993-12-16|DELIVER IN PERSON|REG AIR|ely across t|
+711|103|8|2|27|27083.70|0.00|0.08|A|F|1993-10-02|1993-10-26|1993-10-08|DELIVER IN PERSON|MAIL|slyly. ironic asy|
+711|128|7|3|46|47293.52|0.10|0.00|R|F|1993-12-26|1993-11-19|1994-01-21|TAKE BACK RETURN|MAIL|deposits. permanen|
+711|128|9|4|20|20562.40|0.09|0.00|A|F|1994-01-17|1993-11-10|1994-01-31|DELIVER IN PERSON|TRUCK|kly regular acco|
+736|158|9|1|46|48674.90|0.05|0.01|N|O|1998-07-16|1998-09-01|1998-08-09|NONE|AIR|uctions cajole|
+736|80|1|2|23|22541.84|0.02|0.05|N|O|1998-10-08|1998-08-27|1998-10-19|TAKE BACK RETURN|AIR|k accounts are carefully|
+736|57|9|3|13|12441.65|0.00|0.03|N|O|1998-08-16|1998-07-26|1998-08-19|DELIVER IN PERSON|FOB|st furiously among the |
+736|98|2|4|14|13973.26|0.06|0.04|N|O|1998-10-04|1998-08-14|1998-10-16|COLLECT COD|REG AIR|nstructions.|
+736|169|6|5|32|34213.12|0.04|0.03|N|O|1998-07-30|1998-08-22|1998-08-12|DELIVER IN PERSON|RAIL|iously final accoun|
+737|182|3|1|12|12986.16|0.01|0.01|R|F|1992-04-28|1992-06-30|1992-05-08|COLLECT COD|RAIL|posits after the slyly bold du|
+738|198|1|1|34|37338.46|0.00|0.06|R|F|1993-06-09|1993-04-15|1993-07-09|TAKE BACK RETURN|TRUCK|s against the ironic exc|
+738|188|9|2|4|4352.72|0.00|0.03|A|F|1993-06-20|1993-04-08|1993-07-09|NONE|AIR|ar packages. fluffily bo|
+738|170|1|3|23|24613.91|0.04|0.08|A|F|1993-03-17|1993-04-02|1993-04-05|TAKE BACK RETURN|SHIP|nic, final excuses promise quickly regula|
+738|141|10|4|12|12493.68|0.04|0.08|A|F|1993-06-16|1993-05-05|1993-06-22|NONE|SHIP|ove the slyly regular p|
+738|175|4|5|30|32255.10|0.02|0.00|A|F|1993-06-12|1993-05-29|1993-06-25|NONE|AIR|ecial instructions haggle blithely regula|
+739|85|6|1|28|27582.24|0.00|0.03|N|O|1998-06-03|1998-08-04|1998-06-29|TAKE BACK RETURN|RAIL|elets about the pe|
+739|4|7|2|50|45200.00|0.07|0.06|N|O|1998-08-26|1998-07-16|1998-09-02|COLLECT COD|MAIL|ndencies. blith|
+739|49|2|3|12|11388.48|0.05|0.00|N|O|1998-08-20|1998-07-24|1998-08-22|NONE|MAIL|le slyly along the close i|
+739|44|3|4|47|44369.88|0.09|0.07|N|O|1998-08-12|1998-07-09|1998-08-28|NONE|REG AIR|deas according to the theodolites sn|
+739|188|9|5|30|32645.40|0.07|0.06|N|O|1998-06-19|1998-08-26|1998-07-02|DELIVER IN PERSON|REG AIR|above the even deposits. ironic requests|
+740|2|9|1|22|19844.00|0.10|0.02|N|O|1995-07-24|1995-09-11|1995-08-11|TAKE BACK RETURN|FOB|odolites cajole ironic, pending instruc|
+740|66|1|2|35|33812.10|0.00|0.00|N|O|1995-09-06|1995-08-22|1995-10-02|NONE|TRUCK|p quickly. fu|
+740|199|10|3|29|31876.51|0.06|0.05|N|O|1995-10-26|1995-09-17|1995-10-29|DELIVER IN PERSON|FOB|ntly bold pinto beans sleep quickl|
+741|187|8|1|25|27179.50|0.03|0.06|N|O|1998-07-15|1998-08-27|1998-08-12|DELIVER IN PERSON|MAIL|accounts. blithely bold pa|
+741|91|4|2|22|21803.98|0.09|0.01|N|O|1998-09-07|1998-09-28|1998-09-12|COLLECT COD|AIR|ven deposits about the regular, ironi|
+742|102|3|1|46|46096.60|0.04|0.08|A|F|1995-03-12|1995-03-20|1995-03-16|TAKE BACK RETURN|SHIP|e slyly bold deposits cajole according to|
+742|96|8|2|15|14941.35|0.08|0.05|A|F|1995-02-26|1995-03-20|1995-03-03|NONE|SHIP|blithely unusual pinto|
+742|102|5|3|24|24050.40|0.08|0.08|A|F|1995-02-12|1995-03-12|1995-02-14|DELIVER IN PERSON|SHIP|affix slyly. furiously i|
+742|192|4|4|16|17475.04|0.01|0.05|A|F|1995-01-15|1995-02-25|1995-01-24|COLLECT COD|AIR|eodolites haggle carefully regul|
+742|101|4|5|48|48052.80|0.09|0.08|R|F|1995-03-24|1995-01-23|1995-04-08|TAKE BACK RETURN|TRUCK| platelets |
+742|192|6|6|49|53517.31|0.02|0.07|A|F|1995-01-13|1995-02-13|1995-01-26|TAKE BACK RETURN|RAIL| carefully bold foxes sle|
+743|192|5|1|21|22935.99|0.01|0.04|N|O|1996-10-26|1996-11-05|1996-11-11|COLLECT COD|MAIL|d requests. packages afte|
+768|196|7|1|39|42751.41|0.06|0.08|N|O|1996-09-25|1996-10-27|1996-10-20|NONE|SHIP|out the ironic|
+768|18|9|2|2|1836.02|0.00|0.04|N|O|1996-11-13|1996-10-03|1996-11-25|DELIVER IN PERSON|SHIP|ular courts. slyly dogged accou|
+768|6|1|3|30|27180.00|0.06|0.05|N|O|1996-09-22|1996-11-03|1996-10-13|NONE|MAIL| furiously fluffy pinto beans haggle along|
+768|25|8|4|37|34225.74|0.10|0.00|N|O|1996-10-02|1996-09-23|1996-10-14|TAKE B

<TRUNCATED>