fixed toc links in docs
diff --git a/asterix-doc/src/site/markdown/api.md b/asterix-doc/src/site/markdown/api.md
index cd5659d..4d6edd2 100644
--- a/asterix-doc/src/site/markdown/api.md
+++ b/asterix-doc/src/site/markdown/api.md
@@ -1,6 +1,6 @@
# REST API to AsterixDB #
-## [Table of Contents](id:toc)
+## <a id="toc">Table of Contents</a>
* [DDL API](#DdlApi)
* [Update API](#UpdateApi)
@@ -10,7 +10,7 @@
* [Error Codes](#ErrorCodes)
-## [DDL API](id:DdlApi) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="DdlApi">DDL API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
*End point for the data definition statements*
@@ -58,7 +58,7 @@
*HTTP OK 200*
`<NO PAYLOAD>`
-## [Update API](id:UpdateApi) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="UpdateApi">Update API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
*End point for update statements (INSERT, DELETE and LOAD)*
@@ -99,7 +99,7 @@
*HTTP OK 200*
`<NO PAYLOAD>`
-## [Query API](id:QueryApi) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="QueryApi">Query API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
*End point for query statements*
@@ -179,7 +179,7 @@
}
-## [Asynchronous Result API](id:AsynchronousResultApi) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="AsynchronousResultApi">Asynchronous Result API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
*End point to fetch the results of an asynchronous query*
@@ -241,7 +241,7 @@
}
-## [Query Status API](id:QueryStatusApi) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="QueryStatusApi">Query Status API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
*End point to check the status of the query asynchronous*
@@ -271,7 +271,7 @@
-## [Error Codes](id:ErrorCodes) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="ErrorCodes">Error Codes</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
Table of error codes and their types:
diff --git a/asterix-doc/src/site/markdown/aql/allens.md b/asterix-doc/src/site/markdown/aql/allens.md
index 4dfd6c0..a07e287 100644
--- a/asterix-doc/src/site/markdown/aql/allens.md
+++ b/asterix-doc/src/site/markdown/aql/allens.md
@@ -1,18 +1,18 @@
# AsterixDB Temporal Functions: Allen's Relations #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [About Allen's Relations](#AboutAllensRelations)
* [Allen's Relations Functions](#AllensRelatonsFunctions)
-## [About Allen's Relations](id:AboutAllensRelations) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="AboutAllensRelations">About Allen's Relations</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
AsterixDB supports Allen's relations over interval types. Allen's relations are also called Allen's interval algebra. There are totally 13 base relations described by this algebra, and all of them are supported in AsterixDB (note that `interval-equals` is supported by the `=` comparison symbol so there is no extra function for it).
A detailed description of Allen's relations can be found from its [wikipedia entry](http://en.wikipedia.org/wiki/Allen's_interval_algebra).
-## [Allen's Relations Functions](id:AllensRelatonsFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="AllensRelatonsFunctions">Allen's Relations Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### interval-before, interval-after ###
diff --git a/asterix-doc/src/site/markdown/aql/datamodel.md b/asterix-doc/src/site/markdown/aql/datamodel.md
index 43b2db1..71a5cbb 100644
--- a/asterix-doc/src/site/markdown/aql/datamodel.md
+++ b/asterix-doc/src/site/markdown/aql/datamodel.md
@@ -1,34 +1,33 @@
# Asterix Data Model (ADM) #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [Primitive Types](#PrimitiveTypes)
- * [Boolean](#PrimitiveTypesBoolean)
- * [Int8 / Int16 / Int32 / Int64](#PrimitiveTypesInt)
- * [Float](#PrimitiveTypesFloat)
- * [Double](#PrimitiveTypesDouble)
- * [String](#PrimitiveTypesString)
- * [Point](#PrimitiveTypesPoint)
- * [Line](#PrimitiveTypesLine)
- * [Rectangle](#PrimitiveTypesRectangle)
- * [Circle](#PrimitiveTypesCircle)
- * [Polygon](#PrimitiveTypesPolygon)
- * [Date](#PrimitiveTypesDate)
- * [Time](#PrimitiveTypesTime)
- * [Datetime](#PrimitiveTypesDateTime)
- * [Duration/Year-month-duration/Day-time-duration](#PrimitiveTypesDuration)
- * [Interval](#PrimitiveTypesInterval)
-
+ * [Boolean](#PrimitiveTypesBoolean)
+ * [Int8 / Int16 / Int32 / Int64](#PrimitiveTypesInt)
+ * [Float](#PrimitiveTypesFloat)
+ * [Double](#PrimitiveTypesDouble)
+ * [String](#PrimitiveTypesString)
+ * [Point](#PrimitiveTypesPoint)
+ * [Line](#PrimitiveTypesLine)
+ * [Rectangle](#PrimitiveTypesRectangle)
+ * [Circle](#PrimitiveTypesCircle)
+ * [Polygon](#PrimitiveTypesPolygon)
+ * [Date](#PrimitiveTypesDate)
+ * [Time](#PrimitiveTypesTime)
+ * [Datetime](#PrimitiveTypesDateTime)
+ * [Duration/Year-month-duration/Day-time-duration](#PrimitiveTypesDuration)
+ * [Interval](#PrimitiveTypesInterval)
* [Derived Types](#DerivedTypes)
- * [Record](#DerivedTypesRecord)
- * [OrderedList](#DerivedTypesOrderedList)
- * [UnorderedList](#DerivedTypesUnorderedList)
+ * [Record](#DerivedTypesRecord)
+ * [OrderedList](#DerivedTypesOrderedList)
+ * [UnorderedList](#DerivedTypesUnorderedList)
An instance of Asterix data model (ADM) can be a _*primitive type*_ (`int32`, `int64`, `string`, `float`, `double`, `date`, `time`, `datetime`, etc. or `null`) or a _*derived type*_.
-## [Primitive Types](id:PrimitiveTypes) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="PrimitiveTypes">Primitive Types</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
-### [Boolean](id:PrimitiveTypesBoolean) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesBoolean">Boolean</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`boolean` data type can have one of the two values: _*true*_ or _*false*_.
* Example:
@@ -44,7 +43,7 @@
-### [Int8 / Int16 / Int32 / Int64](id:PrimitiveTypesInt) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
Integer types using 8, 16, 32, or 64 bits. The ranges of these types are:
- `int8`: -127 to 127
@@ -66,7 +65,7 @@
{ "int8": 125i8, "int16": 32765i16, "int32": 294967295, "int64": 1700000000000000000i64 }
-### [Float](id:PrimitiveTypesFloat) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesFloat">Float</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`float` represents approximate numeric data values using 4 bytes. The range of a float value can be from 2^(-149) to (2-2^(-23)·2^(127) for both positive and negative. Beyond these ranges will get `INF` or `-INF`.
* Example:
@@ -83,7 +82,7 @@
{ "v1": NaNf, "v2": Infinityf, "v3": -Infinityf, "v4": -2013.5f }
-### [Double](id:PrimitiveTypesDouble) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesDouble">Double</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`double` represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))·2^(1023) for both positive and negative. Beyond these ranges will get `INF` or `-INF`.
* Example:
@@ -100,7 +99,7 @@
{ "v1": NaNd, "v2": Infinityd, "v3": -Infinityd, "v4": -2013.5938237483274d }
-### [String](id:PrimitiveTypesString) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesString">String</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`string` represents a sequence of characters.
* Example:
@@ -115,7 +114,7 @@
{ "v1": "This is a string.", "v2": "\"This is a quoted string\"" }
-### [Point](id:PrimitiveTypesPoint) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesPoint">Point</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`point` is the fundamental two-dimensional building block for spatial types. It consists of two `double` coordinates x and y.
* Example:
@@ -130,7 +129,7 @@
{ "v1": point("80.1,-1000000.0"), "v2": point("5.1E-10,-1000000.0") }
-### [Line](id:PrimitiveTypesLine) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesLine">Line</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`line` consists of two points that represent the start and the end points of a line segment.
* Example:
@@ -145,7 +144,7 @@
{ "v1": line("10.1234,1.11 0.102,-11.22"), "v2": line("0.1234,-1.0E-10 0.105,-1.02") }
-### [Rectangle](id:PrimitiveTypesRectangle) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesRectangle">Rectangle</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`rectangle` consists of two points that represent the _*bottom left*_ and _*upper right*_ corners of a rectangle.
* Example:
@@ -160,7 +159,7 @@
{ "v1": rectangle("5.1,11.8 87.6,15.6548"), "v2": rectangle("0.1234,-1.0E-10 5.5487,0.48765") }
-### [Circle](id:PrimitiveTypesCircle) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesCircle">Circle</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`circle` consists of one point that represents the center of the circle and a radius of type `double`.
* Example:
@@ -175,7 +174,7 @@
{ "v1": circle("10.1234,1.11 0.102"), "v2": circle("0.1234,-1.0E-10 0.105") }
-### [Polygon](id:PrimitiveTypesPolygon) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesPolygon">Polygon</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`polygon` consists of _*n*_ points that represent the vertices of a _*simple closed*_ polygon.
* Example:
@@ -190,7 +189,7 @@
{ "v1": polygon("-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81"), "v2": polygon("-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") }
-### [Date](id:PrimitiveTypesDate) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesDate">Date</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`date` represents a time point along the Gregorian calendar system specified by the year, month and day. ASTERIX supports the date from `-9999-01-01` to `9999-12-31`.
A date value can be represented in two formats, extended format and basic format.
@@ -210,7 +209,7 @@
{ "v1": date("2013-01-01"), "v2": date("-1970-01-01") }
-### [Time](id:PrimitiveTypesTime) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesTime">Time</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`time` 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 `hh:mm:ss[.mmm]` and the basic format is `hhmmss[mmm]`. The value domain is from `00:00:00.000` to `23:59:59.999`.
Timezone field is optional for a time value. Timezone is represented as `[+|-]hh:mm` for extended format or `[+|-]hhmm` for basic format. Note that the sign designators cannot be omitted. `Z` can also be used to represent the UTC local time. If no timezone information is given, it is UTC by default.
@@ -227,7 +226,7 @@
{ "v1": time("12:12:12.039Z"), "v2": time("08:00:00.000Z") }
-### [Datetime](id:PrimitiveTypesDateTime) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesDateTime">Datetime</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
A `datetime` value is a combination of an `date` and `time`, representing a fixed time point along the Gregorian calendar system. The value is among `-9999-01-01 00:00:00.000` and `9999-12-31 23:59:59.999`.
A `datetime` value is represented as a combination of the representation of its `date` part and `time` part, separated by a separator `T`. Either extended or basic format can be used, and the two parts should be the same format.
@@ -246,7 +245,7 @@
{ "v1": datetime("2013-01-01T12:12:12.039Z"), "v2": datetime("-1970-01-01T08:00:00.000Z") }
-### [Duration/Year-month-duration/Day-time-duration](id:PrimitiveTypesDuration) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`duration` 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.
A duration value is in the format of `[-]PnYnMnDTnHnMn.mmmS`. 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.
@@ -269,7 +268,7 @@
{ "v1": duration("P101YT12M"), "v2": duration("-PT20.943S") }
-### [Interval](id:PrimitiveTypesInterval) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="PrimitiveTypesInterval">Interval</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
`interval` represents inclusive-exclusive ranges of time. It is defined by two time point values with the same temporal type(`date`, `time` or `datetime`).
* Example:
@@ -285,9 +284,9 @@
{ "v1": interval-date("2013-01-01, 2013-05-05"), "v2": interval-time("00:01:01.000Z, 13:39:01.049Z"), "v3": interval-datetime("2013-01-01T00:01:01.000Z, 2013-05-05T13:39:01.049Z") }
-## [Derived Types](id:DerivedTypes) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="DerivedTypes">Derived Types</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ##
-### [Record](id:DerivedTypesRecord) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="DerivedTypesRecord">Record</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
A `record` contains a set of fields, where each field is described by its name and type. A record type is either open or closed. Open records can contain fields that are not part of the type definition, while closed records cannot. Syntactically, record constructors are surrounded by curly braces "{...}".
An example would be
@@ -296,7 +295,7 @@
{ "id": 213508, "name": "Alice Bob" }
-### [OrderedList](id:DerivedTypesOrderedList) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="DerivedTypesOrderedList">OrderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
An `orderedList` is a sequence of values for which the order is determined by creation or insertion. OrderedList constructors are denoted by brackets: "[...]".
An example would be
@@ -305,7 +304,7 @@
["alice", 123, "bob", null]
-### [UnorderedList](id:DerivedTypesUnorderedList) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="DerivedTypesUnorderedList">UnorderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ###
An `unorderedList` 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 "{{...}}".
An example would be
diff --git a/asterix-doc/src/site/markdown/aql/externaldata.md b/asterix-doc/src/site/markdown/aql/externaldata.md
index b135c3d..ca350b9 100644
--- a/asterix-doc/src/site/markdown/aql/externaldata.md
+++ b/asterix-doc/src/site/markdown/aql/externaldata.md
@@ -1,19 +1,19 @@
# Accessing External Data in AsterixDB #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [Introduction](#Introduction)
* [Adapter for an External Dataset](#IntroductionAdapterForAnExternalDataset)
* [Creating an External Dataset](#IntroductionCreatingAnExternalDataset)
* [Writing Queries against an External Dataset](#WritingQueriesAgainstAnExternalDataset)
-## [Introduction](id:Introduction) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Introduction">Introduction</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
Data that needs to be processed by ASTERIX could be residing outside ASTERIX 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 ASTERIX cluster. For ASTERIX to process such data, end-user may create a regular dataset in ASTERIX (a.k.a. internal dataset) and load the dataset with the data. ASTERIX supports ''external datasets'' so that it is not necessary to “load” all data prior to using it. This also avoids creating multiple copies of data and the need to keep the copies in sync.
-### [Adapter for an External Dataset](id:IntroductionAdapterForAnExternalDataset) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="IntroductionAdapterForAnExternalDataset">Adapter for an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
External data is accessed using wrappers (adapters in ASTERIX) that abstract away the mechanism of connecting with an external service, receiving data and transforming the data into ADM records that are understood by ASTERIX. ASTERIX comes with built-in adapters for common storage systems such as HDFS or the local file system.
-### [Creating an External Dataset](id:IntroductionCreatingAnExternalDataset) <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
+### <a id="IntroductionCreatingAnExternalDataset">Creating an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ###
As an example we consider the Lineitem dataset from [TPCH schema](http://www.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSTPCHLinkedData/tpch.sql).
@@ -175,7 +175,7 @@
You may now run the sample query in next section.
-## [Writing Queries against an External Dataset](id:WritingQueriesAgainstAnExternalDataset) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="WritingQueriesAgainstAnExternalDataset">Writing Queries against an External Dataset</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
You may write AQL queries against an external dataset. Following is an example AQL query that applies a filter and returns an ordered result.
diff --git a/asterix-doc/src/site/markdown/aql/functions.md b/asterix-doc/src/site/markdown/aql/functions.md
index 626db08..e94b450 100644
--- a/asterix-doc/src/site/markdown/aql/functions.md
+++ b/asterix-doc/src/site/markdown/aql/functions.md
@@ -1,6 +1,6 @@
# Asterix: Using Functions #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [Numeric Functions](#NumericFunctions)
* [String Functions](#StringFunctions)
@@ -13,7 +13,7 @@
Asterix provides various classes of functions to support operations on numeric, string, spatial, and temporal data. This document explains how to use these functions.
-## [Numeric Functions](id:NumericFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="NumericFunctions">Numeric Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### numeric-abs ###
* Syntax:
@@ -148,7 +148,7 @@
{ "v1": 2013, "v2": -4036, "v3": 1.0d, "v4": -2013.0f, "v5": -2014.0d, "v6": -2013.89d, "v7": 2013, "v8": -2013.256f }
-## [String Functions](id:StringFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="StringFunctions">String Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### string-to-codepoint ###
* Syntax:
@@ -546,7 +546,7 @@
" the voice-command is bad:("
" the voicemail-service is awesome"
-## [Aggregate Functions](id:AggregateFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="AggregateFunctions">Aggregate Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### count ###
* Syntax:
@@ -636,7 +636,7 @@
{ "min_friend_count": 18, "max_friend_count": 445 }
-## [Spatial Functions](id:SpatialFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="SpatialFunctions">Spatial Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### create-point ###
* Syntax:
@@ -1091,7 +1091,7 @@
-## [Similarity Functions](id:SimilarityFunctions) ##
+## <a id="SimilarityFunctions">Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
AsterixDB supports queries with different similarity functions, including edit distance and Jaccard.
@@ -1271,7 +1271,7 @@
}
-## [Tokenizing Functions](id:TokenizingFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="TokenizingFunctions">Tokenizing Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### word-tokens ###
* Syntax:
@@ -1467,7 +1467,7 @@
}
-->
-## [Temporal Functions](id:TemporalFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="TemporalFunctions">Temporal Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### date ###
* Syntax:
@@ -2060,16 +2060,19 @@
let $c3 := time("12:23:34.930+07:00")
return { "bin1": interval-bin($c1, date("1990-01-01"), year-month-duration("P1Y")),
- "bin2": interval-bin($c1, date("-1990-01-01"), year-month-duration("P1Y")),
- "bin3": interval-bin($c2, datetime("1990-01-01T00:00:00.000Z"), year-month-duration("P6M"))}
+ "bin2": interval-bin($c2, datetime("1990-01-01T00:00:00.000Z"), year-month-duration("P6M")),
+ "bin3": interval-bin($c3, time("00:00:00"), day-time-duration("PD1M")),
+ "bin4": interval-bin($c2, datetime("2013-01-01T00:00:00.000"), day-time-duration("PT24H"))
+ }
* The expected result is:
{ "bin1": interval-date("2010-01-01, 2011-01-01"),
- "bin2": interval-date("2010-01-01, 2011-01-01"),
- "bin3": interval-datetime("-1987-07-01T00:00:00.000Z, -1986-01-01T00:00:00.000Z")}
+ "bin2": interval-datetime("-1987-07-01T00:00:00.000Z, -1986-01-01T00:00:00.000Z"),
+ "bin3": interval-time("05:23:00.000Z, 05:24:00.000Z"),
+ "bin4": interval-datetime("-1987-11-19T00:00:00.000Z, -1987-11-20T00:00:00.000Z")}
-## [Other Functions](id:OtherFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="OtherFunctions">Other Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
### is-null ###
* Syntax:
diff --git a/asterix-doc/src/site/markdown/aql/manual.md b/asterix-doc/src/site/markdown/aql/manual.md
index 1f055e3..882d331 100644
--- a/asterix-doc/src/site/markdown/aql/manual.md
+++ b/asterix-doc/src/site/markdown/aql/manual.md
@@ -1,12 +1,12 @@
# The Asterix Query Language, Version 1.0
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [1. Introduction](#Introduction)
* [2. Expressions](#Expressions)
* [3. Statements](#Statements)
-## [1. Introduction](id:Introduction) <font size="4"><a href="#toc">[Back to TOC]</a></font>
+## <a id="Introduction">1. Introduction</a><font size="4"> <a href="#toc">[Back to TOC]</a></font>
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.
@@ -21,7 +21,7 @@
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.
-## [2. Expressions](id:Expressions) <font size="4"><a href="#toc">[Back to TOC]</a></font>
+## <a id="Expressions">2. Expressions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font>
Query ::= Expression
@@ -435,7 +435,7 @@
every $x in [ 1, 2, 3 ] satisfies $x < 3
some $x in [ 1, 2, 3 ] satisfies $x < 3
-## [3. Statements](id:Statements) <font size="4"><a href="#toc">[Back to TOC]</a></font>
+## <a id="Statements">3. Statements</a> <font size="4"><a href="#toc">[Back to TOC]</a></font>
Statement ::= ( SingleStatement ( ";" )? )* <EOF>
SingleStatement ::= DataverseDeclaration
diff --git a/asterix-doc/src/site/markdown/aql/similarity.md b/asterix-doc/src/site/markdown/aql/similarity.md
index 61b4dfb..12cfb10 100644
--- a/asterix-doc/src/site/markdown/aql/similarity.md
+++ b/asterix-doc/src/site/markdown/aql/similarity.md
@@ -1,7 +1,7 @@
# AsterixDB Support of Similarity Queries #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [Motivation](#Motivation)
* [Data Types and Similarity Functions](#DataTypesAndSimilarityFunctions)
@@ -9,7 +9,7 @@
* [Similarity Join Queries](#SimilarityJoinQueries)
* [Using Indexes to Support Similarity Queries](#UsingIndexesToSupportSimilarityQueries)
-## [Motivation](id:Motivation) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
Similarity queries are widely used in applications where users need to
find records that satisfy a similarity predicate, while exact matching
@@ -22,7 +22,7 @@
users who have similar friends. To meet this type of needs, AsterixDB
supports similarity queries using efficient indexes and algorithms.
-## [Data Types and Similarity Functions](id:DataTypesAndSimilarityFunctions) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
AsterixDB supports [edit distance](http://en.wikipedia.org/wiki/Levenshtein_distance) (on strings) and
[Jaccard](http://en.wikipedia.org/wiki/Jaccard_index) (on sets). For
@@ -41,7 +41,7 @@
to convert strings to sets, and the
[similarity functions](functions.html#Similarity_Functions).
-## [Similarity Selection Queries](id:SimilaritySelectionQueries) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
The following [query](functions.html#edit-distance)
asks for all the Facebook users whose name is similar to
@@ -86,7 +86,7 @@
using `simfunction` and then specify the threshold `0.6f` using
`simthreshold`.
-## [Similarity Join Queries](id:SimilarityJoinQueries) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
AsterixDB supports fuzzy joins between two sets. The following
[query](primer.html#Query_5_-_Fuzzy_Join)
@@ -111,7 +111,7 @@
}
};
-## [Using Indexes to Support Similarity Queries](id:UsingIndexesToSupportSimilarityQueries) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
AsterixDB uses two types of indexes to support similarity queries, namely
"ngram index" and "keyword index".
diff --git a/asterix-doc/src/site/markdown/index.md b/asterix-doc/src/site/markdown/index.md
index 12d81d6..2999099 100644
--- a/asterix-doc/src/site/markdown/index.md
+++ b/asterix-doc/src/site/markdown/index.md
@@ -1,10 +1,10 @@
# AsterixDB: A Big Data Management System #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [What Is AsterixDB?](#WhatIsAsterixDB)
* [Getting and Using AsterixDB](#GettingAndUsingAsterixDB)
-## [What Is AsterixDB?](id:WhatIsAsterixDB) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="WhatIsAsterixDB">What Is AsterixDB?</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
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'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:
@@ -18,7 +18,7 @@
* Support for fuzzy and spatial queries as well as for more traditional parametric queries
* Basic transactional (concurrency and recovery) capabilities akin to those of a NoSQL store
-## [Getting and Using AsterixDB](id:GettingAndUsingAsterixDB) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="GettingAndUsingAsterixDB">Getting and Using AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
You are most likely here because you are interested in getting your hands on AsterixDB---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:
diff --git a/asterix-doc/src/site/markdown/install.md b/asterix-doc/src/site/markdown/install.md
index 7359d17..444bde4 100644
--- a/asterix-doc/src/site/markdown/install.md
+++ b/asterix-doc/src/site/markdown/install.md
@@ -1,6 +1,6 @@
# Introduction #
-## [Table of Contents](id:toc) ##
+## <a id="toc">Table of Contents</a> ##
* [Prerequisites for Installing AsterixDB](#PrerequisitesForInstallingAsterixDB)
* [Section 1: Single-Machine AsterixDB installation](#Section1SingleMachineAsterixDBInstallation)
@@ -11,7 +11,7 @@
This is a quickstart guide for getting AsterixDB running in a distributed environment. This guide also introduces the AsterixDB installer (nicknamed _*Managix*_) 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 _*Linux*_ or _*MacOS X*_.
-## [Prerequisites for Installing AsterixDB](id:PrerequisitesForInstallingAsterixDB) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="PrerequisitesForInstallingAsterixDB">Prerequisites for Installing AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
Prerequisite:
* [JDK7](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (Otherwise known as JDK 1.7).
@@ -47,7 +47,7 @@
$ source ~/.bash_profile (or ~/.bashrc)
-## [Section 1: Single-Machine AsterixDB installation](id:Section1SingleMachineAsterixDBInstallation) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Section1SingleMachineAsterixDBInstallation">Section 1: Single-Machine AsterixDB installation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
We assume a user called "Joe" with a home directory as /home/joe. On a Mac, the home directory for user Joe would be /Users/joe.
### Configuring Environment ###
@@ -248,7 +248,7 @@
Press the "Run" button. If the query result shows on the output box, then Congratulations! You have successfully created an AsterixDB instance!
-## [Section 2: Single-Machine AsterixDB installation (Advanced)](id:Section2SingleMachineAsterixDBInstallationAdvanced) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Section2SingleMachineAsterixDBInstallationAdvanced">Section 2: Single-Machine AsterixDB installation (Advanced)</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
We assume that you have successfully completed the single-machine AsterixDB installation by following the instructions above in section [AsterixDB installation](#Section_1:_Single-Machine_AsterixDB_installation). 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.
### AsterixDB Runtime ###
@@ -399,7 +399,7 @@
It is possible to have a single host for Zookeeper. A larger number of hosts would use Zookeeper'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.
-## [Section 3: Installing AsterixDB on a Cluster of Multiple Machines](id:Section3InstallingAsterixDBOnAClusterOfMultipleMachines) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Section3InstallingAsterixDBOnAClusterOfMultipleMachines">Section 3: Installing AsterixDB on a Cluster of Multiple Machines</a><font size="4"><a href="#toc">[Back to TOC]</a></font> ##
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:
![AsterixCluster](https://asterixdb.googlecode.com/files/AsterixCluster.png)
@@ -568,7 +568,7 @@
Please refer to the section [Managing the Lifecycle of an AsterixDB Instance](#Section_4:_Managing_the_Lifecycle_of_an_AsterixDB_Instance) 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.
-## [Section 4: Managing the Lifecycle of an AsterixDB Instance](id:Section4ManagingTheLifecycleOfAnAsterixDBInstance) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Section4ManagingTheLifecycleOfAnAsterixDBInstance">Section 4: Managing the Lifecycle of an AsterixDB Instance</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
Now that we have an AsterixDB instance running, let us use Managix to manage the instance's lifecycle. Managix provides the following set of commands/operations:
@@ -853,7 +853,7 @@
configuration settings for a single node setup.
-## [Section 5: Frequently Asked Questions](id:Section5FAQ) <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+## <a id="Section5FAQ">Section 5: Frequently Asked Questions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
##### Question #####