From 73904db391e548b72cb9277eb2708b4cc94817c4 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 21 Feb 2018 15:42:35 -0600 Subject: [PATCH 1/3] Fix indentation --- docs/administration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/administration.md b/docs/administration.md index b77d05262..97ee688f5 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -124,7 +124,7 @@ Note: This will only work when the replication factor is >= 2 - Restart the cluster - Wait for the 1st sync (10 minutes) to validate Index connections -#### Diagnostics +### Diagnostics Each Pilosa cluster is configured by default to share anonymous usage details with Pilosa Corp. These metrics allow us to understand how Pilosa is used by the community and improve the technology to suit your needs. Diagnostics are sent to Pilosa every hour. Each of the metrics are detailed below as well as opt-out instructions. @@ -145,7 +145,7 @@ Each Pilosa cluster is configured by default to share anonymous usage details wi You can opt-out of the Pilosa diagnostics reporting by setting either the command line configuration option `--metric.diagnostics=false`, use the `PILOSA_METRIC_DIAGNOSTICS` environment variable, or the TOML configuration file `[metric]` `diagnostics` option. -#### Metrics +### Metrics Pilosa can be configured to emit metrics pertaining to its internal processes in one of two formats: Expvar or StatsD. Metric recording is disabled by default. The metrics configuration options are: @@ -154,7 +154,7 @@ The metrics configuration options are: - [Poll Interval](../configuration#metrics-poll-interval): specify polling interval for runtime metrics - [Service](../configuration#metrics-service): declare type StatsD or Expvar -##### Tags +#### Tags StatsD Tags adhere to the DataDog format (key:value), and we tag the following: - NodeID @@ -163,7 +163,7 @@ StatsD Tags adhere to the DataDog format (key:value), and we tag the following: - View - Slice -##### Events +#### Events We currently track the following events - **Index:** The creation of a new Index. From 59d41a9cb3b3b938aef8ce18f8adc666fca49dc5 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 21 Feb 2018 15:42:46 -0600 Subject: [PATCH 2/3] Add Xor to docs --- docs/query-language.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/query-language.md b/docs/query-language.md index 0e02351ab..b1315d293 100644 --- a/docs/query-language.md +++ b/docs/query-language.md @@ -52,7 +52,7 @@ curl localhost:10101/index/repository/query \ * `UINT` An unsigned integer (e.g. 42839) * `ATTR_NAME` Must be a valid identifier `[A-Za-z][A-Za-z0-9._-]*` * `ATTR_VALUE` Can be a string, float, integer, or bool. -* `BITMAP_CALL` Any query which returns a bitmap, such as `Bitmap`, `Union`, `Difference`, `Intersect`, `Range` +* `BITMAP_CALL` Any query which returns a bitmap, such as `Bitmap`, `Union`, `Difference`, `Xor`, `Intersect`, `Range` * `[]ATTR_VALUE` Denotes an array of `ATTR_VALUE`s. (e.g. `["a", "b", "c"]`) ### Write Operations @@ -308,6 +308,28 @@ Return `{"attrs":{},"bits":[30]}` * Bits are repositories that were starred by user 2 BUT NOT user 1 +#### Xor + +**Description:** + +Xor performs a logical XOR on the results of each `BITMAP_CALL` query passed to it. + +**Result Type:** object with attrs and bits + +attrs will always be empty + +**Examples:** + +Query repositories which have been starred by two users. + +``` +Xor(Bitmap(frame="stargazer", rowID=1), Bitmap(frame="stargazer", rowID=2)) +``` + +Returns `{"attrs":{},"bits":[30]}`. + +* bits are repositories that were starred by user 1 XOR user 2 (user 1 or user 2, but not both) + #### Count **Spec:** From a20235f812d5e6b0d0cc85599c404284b97c6f02 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 26 Feb 2018 15:26:28 -0600 Subject: [PATCH 3/3] Add Xor spec --- docs/query-language.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/query-language.md b/docs/query-language.md index b1315d293..365d7ded6 100644 --- a/docs/query-language.md +++ b/docs/query-language.md @@ -310,6 +310,12 @@ Return `{"attrs":{},"bits":[30]}` #### Xor +**Spec:** + +``` +Xor(, [BITMAP_CALL ...]) +``` + **Description:** Xor performs a logical XOR on the results of each `BITMAP_CALL` query passed to it.