Skip to content

Commit

Permalink
Starting to link things together
Browse files Browse the repository at this point in the history
  • Loading branch information
RasonJ committed May 22, 2024
1 parent c1085c1 commit cf9e128
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 91 deletions.
8 changes: 8 additions & 0 deletions _search-plugins/ubi/client_datastructures.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
layout: default
title: Client Data structures old
parent: User behavior insights
has_children: false
nav_order: 7
---

The datastructures that we use for indexing events adhere to the following nested structure that aligns with the Ubi schemas. See the [schemas](.././schemas.md) for descriptions and examples of the following fields.

Check failure on line 9 in _search-plugins/ubi/client_datastructures.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/client_datastructures.md#L9

[OpenSearch.Spelling] Error: datastructures. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: datastructures. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/client_datastructures.md", "range": {"start": {"line": 9, "column": 5}}}, "severity": "ERROR"}

Check failure on line 9 in _search-plugins/ubi/client_datastructures.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/client_datastructures.md#L9

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/client_datastructures.md", "range": {"start": {"line": 9, "column": 114}}}, "severity": "ERROR"}

Check failure on line 9 in _search-plugins/ubi/client_datastructures.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/client_datastructures.md#L9

[OpenSearch.SpacingPunctuation] There should be no space before and one space after the punctuation mark in 'schemas. See'.
Raw output
{"message": "[OpenSearch.SpacingPunctuation] There should be no space before and one space after the punctuation mark in 'schemas. See'.", "location": {"path": "_search-plugins/ubi/client_datastructures.md", "range": {"start": {"line": 9, "column": 118}}}, "severity": "ERROR"}

`struct UbiEvent {`
Expand Down
7 changes: 7 additions & 0 deletions _search-plugins/ubi/data-structures.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
layout: default
title: Client data structures
parent: User behavior insights
has_children: false
nav_order: 7
---

# Sample data structures
The data structures below can be used to create events that follow the [UBI event schema](schemas.md).

Check warning on line 10 in _search-plugins/ubi/data-structures.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/data-structures.md#L10

[OpenSearch.DirectionAboveBelow] Use 'following or later' instead of 'below' for versions or orientation within a document. Use 'above' and 'below' only for physical space or screen descriptions.
Raw output
{"message": "[OpenSearch.DirectionAboveBelow] Use 'following or later' instead of 'below' for versions or orientation within a document. Use 'above' and 'below' only for physical space or screen descriptions.", "location": {"path": "_search-plugins/ubi/data-structures.md", "range": {"start": {"line": 10, "column": 21}}}, "severity": "WARNING"}
Expand Down
54 changes: 39 additions & 15 deletions _search-plugins/ubi/documentation.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,88 @@
---
layout: default
title: Ubi plugin management
parent: User behavior insights
has_children: false
nav_order: 2
---


# OpenSearch User Behavior Insights

This repository contains the OpenSearch plugin for the User Behavior Insights (UBI) capability. This plugin
This *repository* contains the OpenSearch plugin for the User Behavior Insights (UBI) capability. This plugin
facilitates persisting client-side events (e.g. item clicks, scroll depth) and OpenSearch queries for the purpose of analyzing the data
to improve search relevance and user experience.

## Quick Start

Check failure on line 16 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L16

[OpenSearch.HeadingCapitalization] 'Quick Start' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Quick Start' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 16, "column": 4}}}, "severity": "ERROR"}

Build the plugin. Note that you will have to match up the JDK 11 on your system to java home in the `gradle.properties` file:

Check failure on line 18 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L18

[OpenSearch.SpacingPunctuation] There should be no space before and one space after the punctuation mark in 'plugin. Note'.
Raw output
{"message": "[OpenSearch.SpacingPunctuation] There should be no space before and one space after the punctuation mark in 'plugin. Note'.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 18, "column": 11}}}, "severity": "ERROR"}

`./gradlew build`
```bash
./gradlew build
```
{% include copy.html %}

Build the OpenSearch docker image and add the plugin, then start the containers:

Check failure on line 24 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L24

[Vale.Terms] Use 'Docker' instead of 'docker'.
Raw output
{"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 24, "column": 22}}}, "severity": "ERROR"}

```
```bash
docker compose build
docker compose up
```
{% include copy.html %}

Or to start a three-node OpenSearch cluster:

```
```bash
docker compose build
docker compose -f docker-compose-cluster.yaml up
```
{% include copy.html %}

Initialize the `awesome` UBI store:

```
```bash
curl -X PUT "http://localhost:9200/_plugins/ubi/awesome?index=ecommerce&object_id=id"
```
{% include copy-curl.html %}

Send an event to the `awesome` store:

```
```bash
curl -X POST http://localhost:9200/_plugins/ubi/mystore -H "Content-Type: application/json" -d '
{
"action_name": "search",
"user_id": "98fcf189-4fa8-4322-b6f5-63fbb6b556c9",
"timestamp": 1705596607509
}'
```
{% include copy-curl.html %}

Get events:

```
```bash
curl -s http://localhost:9200/.awesome_events/_search | jq
```
{% include copy-curl.html %}

Do a search of the `ecommerce` index:

```
```bash
curl -s http://localhost:9200/ecommerce/_search -H "X-ubi-store: awesome" | jq
```
{% include copy-curl.html %}

Get queries:

```
```bash
curl -s http://localhost:9200/.awesome_queries/_search | jq
```
{% include copy-curl.html %}

Delete the store:

```
```bash
curl -X DELETE http://localhost:9200/_plugins/ubi/awesome
```
{% include copy-curl.html %}

## UBI Store

Check failure on line 87 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L87

[OpenSearch.HeadingCapitalization] 'UBI Store' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'UBI Store' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 87, "column": 4}}}, "severity": "ERROR"}

Expand Down Expand Up @@ -95,37 +114,41 @@ To create a UBI store to contain events and queries, send a `PUT` request:
```
curl -X PUT http://localhost:9200/_plugins/ubi/mystore?index=ecommerce
```
{% include copy-curl.html %}

### Deleting a UBI Store

Check failure on line 119 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L119

[OpenSearch.HeadingCapitalization] 'Deleting a UBI Store' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Deleting a UBI Store' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 119, "column": 5}}}, "severity": "ERROR"}

To delete a store, send a `DELETE` request:

```
```bash
curl -X DELETE http://localhost:9200/_plugins/ubi/mystore
```
{% include copy-curl.html %}

This will delete the UBI store and all contained events and queries. Please use this with caution.

Check warning on line 128 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L128

[OpenSearch.Please] Using 'Please' is unnecessary. Remove.
Raw output
{"message": "[OpenSearch.Please] Using 'Please' is unnecessary. Remove.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 128, "column": 70}}}, "severity": "WARNING"}

### Get a List of UBI Stores

Check failure on line 130 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L130

[OpenSearch.HeadingCapitalization] 'Get a List of UBI Stores' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Get a List of UBI Stores' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 130, "column": 5}}}, "severity": "ERROR"}

To get a list of stores, send a `GET` request:

```
```bash
curl -X GET http://localhost:9200/_plugins/ubi
```
{% include copy-curl.html %}

### Persist a Client-Side Event into a UBI Store

Check failure on line 139 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L139

[OpenSearch.HeadingCapitalization] 'Persist a Client-Side Event into a UBI Store' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Persist a Client-Side Event into a UBI Store' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 139, "column": 5}}}, "severity": "ERROR"}

To persist a client-side event into a store, send a `POST` request where the body of the request is the event:

```
```bash
curl -X POST http://localhost:9200/_plugins/ubi/mystore -H "Content-Type: application/json" -d '
{
"action_name": "search",
"user_id": "98fcf189-4fa8-4322-b6f5-63fbb6b556c9",
"timestamp": 1705596607509
}'
```
{% include copy-curl.html %}

## Capturing Queries with UBI

Check failure on line 153 in _search-plugins/ubi/documentation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/documentation.md#L153

[OpenSearch.HeadingCapitalization] 'Capturing Queries with UBI' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Capturing Queries with UBI' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/documentation.md", "range": {"start": {"line": 153, "column": 4}}}, "severity": "ERROR"}

Expand All @@ -149,9 +172,10 @@ To make this association, queries need to have a header value that indicates the

The following query tells the plugin that the query being run should be persisted to the store `mystore` and be associated with user ID `john`:

```
```bash
curl http://localhost:9200/ecommerce/_search -H "X-ubi-store: mystore" -H "X-ubi-user-id: 12345"
```
{% include copy-curl.html %}

With this query, when the plugin sees a query, the plugin will be able to associate the query with an individual user and know to persist the query in the UBI store `mystore`.

Expand Down
79 changes: 19 additions & 60 deletions _search-plugins/ubi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,34 @@ layout: default
title: User behavior insights
parent: Search relevance
has_children: false
nav_order: 220
nav_order: 1
redirect_from:
- /search-plugins/ubi/
---
# Overview
User Behavior Insights, or UBI, is a community plugin for capturing client-side events and queries for the purposes of improving search relevance and user experience.
It is a causal system, linking a user's query to all subsequent user interactions with your application until they perform another search.


# User behavior insights

User Behavior Insights, or UBI, is a community plugin for capturing client-side events and queries for the purposes of improving search relevance and user experience. UBI consists of three components:

* An OpenSearch [plugin](https://github.com/o19s/opensearch-ubi) that facilitates the storage of client-side events and queries.
* A client-side JavaScript library reference implementation that shows how to capture events and send those events to the OpenSearch UBI plugin.
* An OpenSearch Dashboards plugin that provides access to the collected events and queries for analysis. This component is still largely in the design phase.

UBI is currently only supported in OpenSearch 2.12.0.
{: .warning }

## Installing the plugin

The User Behavior Insights plugin is available for OpenSearch 2.12.0. To install the plugin, run the following command:

```bash
./bin/opensearch-plugin install \
"https://github.com/o19s/opensearch-ubi/releases/download/0.0.8/opensearch-ubi-0.0.8-os2.12.0.zip"
```
{% include copy.html %}

For plugin APIs and examples, see [OpenSearch User Behavior Insights documentation](https://github.com/o19s/opensearch-ubi/blob/main/documentation.md).

The following steps outline how to get started with the UBI plugin.

## Initializing a UBI store

A _store_ contains the client-side events and the queries. After installing the plugin we need to initialize a store. In the following request we are creating a store called `mystore`.

```json
PUT _plugins/ubi/mystore
```
{% include copy.html %}

A store consists of two OpenSearch indexes whose names are based on the name of the store being created. For the `mystore` store, the names of the indexes are:

* `.mystore_events` - This index contains the client-side events sent to the plugin by the JavaScript library.
* `.mystore_queries` - This index contains the queries that the plugin passively stores.

## Sending events to the store

With the store initialized, you can now send client-side events to our `mystore` store:

```json
POST /_plugins/ubi/mystore
{
"type": "instant-search",
"keywords": "laptop",
"url": "my_url.html",
"lang": "en-US",
"session": "npckcy4",
"channel": "demo-channel"
}
```
{% include copy-curl.html %}
TODO: link a client implementation
{: .warn }

## Capturing queries
| Explanation & Reference | Description

Check failure on line 21 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L21

[OpenSearch.TableHeadings] 'Explanation & Reference' is a table heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.TableHeadings] 'Explanation \u0026 Reference' is a table heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 21, "column": 3}}}, "severity": "ERROR"}

Check warning on line 21 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L21

[OpenSearch.Ampersand] Don't use an ampersand in place of 'and' in documentation.
Raw output
{"message": "[OpenSearch.Ampersand] Don't use an ampersand in place of 'and' in documentation.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 21, "column": 13}}}, "severity": "WARNING"}
| :--------- | :------- |
| [Ubi Plugin Admin]({{site.url}}{{site.baseurl}}/search-plugins/ubi/documentation) | How to install and use the UBI Plugin |

Check failure on line 23 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L23

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 23, "column": 4}}}, "severity": "ERROR"}

Check failure on line 23 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L23

[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/documentation)'.
Raw output
{"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/documentation)'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 23, "column": 21}}}, "severity": "ERROR"}
| [Ubi Request/Response Specification](https://github.com/o19s/ubi) | Schema standard for making Ubi requests and responses |

Check failure on line 24 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L24

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 24, "column": 4}}}, "severity": "ERROR"}

Check failure on line 24 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L24

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 24, "column": 98}}}, "severity": "ERROR"}
| [Ubi OpenSearch Schema Documentation]({{site.url}}{{site.baseurl}}/search-plugins/ubi/schemas) | Documentation on the individual Query and Event stores for OpenSearch |

Check failure on line 25 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L25

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 25, "column": 4}}}, "severity": "ERROR"}

Check failure on line 25 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L25

[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/schemas)'.
Raw output
{"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/schemas)'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 25, "column": 40}}}, "severity": "ERROR"}
| [`query_id` Data Flow]({{site.url}}{{site.baseurl}}/search-plugins/ubi/query_id) | How the `query_id` ties the search to results and user events |

Check failure on line 26 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L26

[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/query_id)'.
Raw output
{"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/query_id)'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 26, "column": 25}}}, "severity": "ERROR"}

The UBI plugin passively stores queries. To test it, you can run a query against an example index of products called `ecommerce`:

```bash
GET /ecommerce/_search -H "X-ubi-store: mystore"
```
{% include copy.html %}
| Tutorials & How-to Guides | Description

Check failure on line 29 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L29

[OpenSearch.TableHeadings] 'Tutorials & How-to Guides' is a table heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.TableHeadings] 'Tutorials \u0026 How-to Guides' is a table heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 29, "column": 3}}}, "severity": "ERROR"}

Check warning on line 29 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L29

[OpenSearch.Ampersand] Don't use an ampersand in place of 'and' in documentation.
Raw output
{"message": "[OpenSearch.Ampersand] Don't use an ampersand in place of 'and' in documentation.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 29, "column": 11}}}, "severity": "WARNING"}
| :--------- | :------- |
| [ javascript client structures ]({{site.url}}{{site.baseurl}}/search-plugins/ubi/data_structures) | Sample javascript structures for populating the Event store |

Check failure on line 31 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L31

[Vale.Terms] Use 'JavaScript' instead of 'javascript'.
Raw output
{"message": "[Vale.Terms] Use 'JavaScript' instead of 'javascript'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 31, "column": 5}}}, "severity": "ERROR"}

Check failure on line 31 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L31

[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/data_structures)'.
Raw output
{"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/data_structures)'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 31, "column": 35}}}, "severity": "ERROR"}

Check failure on line 31 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L31

[Vale.Terms] Use 'JavaScript' instead of 'javascript'.
Raw output
{"message": "[Vale.Terms] Use 'JavaScript' instead of 'javascript'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 31, "column": 111}}}, "severity": "ERROR"}
| [Ubi Sql queries ]({{site.url}}{{site.baseurl}}/search-plugins/ubi/sql_queries) | How to write analytic queries for Ubi data |

Check failure on line 32 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L32

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 32, "column": 4}}}, "severity": "ERROR"}

Check failure on line 32 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L32

[OpenSearch.Spelling] Error: Sql. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Sql. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 32, "column": 8}}}, "severity": "ERROR"}

Check failure on line 32 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L32

[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/sql_queries)'.
Raw output
{"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/sql_queries)'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 32, "column": 21}}}, "severity": "ERROR"}

Check failure on line 32 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L32

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 32, "column": 120}}}, "severity": "ERROR"}
| [Ubi Dashboard]({{site.url}}{{site.baseurl}}/search-plugins/ubi/ubi_dashboard_tutorial) | Teaches you how to build an OpenSearch dashboard with UBI data |

Check failure on line 33 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L33

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 33, "column": 4}}}, "severity": "ERROR"}

Check failure on line 33 in _search-plugins/ubi/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/index.md#L33

[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/ubi_dashboard_tutorial)'.
Raw output
{"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/search-plugins/ubi/ubi_dashboard_tutorial)'.", "location": {"path": "_search-plugins/ubi/index.md", "range": {"start": {"line": 33, "column": 18}}}, "severity": "ERROR"}
| ... | teaches how to do something |

Note that this request includes a header called `X-ubi-store`. This header allows the UBI plugin to associate this query with a UBI store.
Documentation adapted using concepts from (Diátaxis)[https://diataxis.fr/]
7 changes: 7 additions & 0 deletions _search-plugins/ubi/query_id.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
layout: default
title: Ubi data flow
parent: User behavior insights
has_children: false
nav_order: 7
---

# Basic Ubi flow

Check failure on line 9 in _search-plugins/ubi/query_id.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/query_id.md#L9

[OpenSearch.HeadingCapitalization] 'Basic Ubi flow' is a heading and should be in sentence case.
Raw output
{"message": "[OpenSearch.HeadingCapitalization] 'Basic Ubi flow' is a heading and should be in sentence case.", "location": {"path": "_search-plugins/ubi/query_id.md", "range": {"start": {"line": 9, "column": 3}}}, "severity": "ERROR"}

Check failure on line 9 in _search-plugins/ubi/query_id.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/query_id.md#L9

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/query_id.md", "range": {"start": {"line": 9, "column": 9}}}, "severity": "ERROR"}
**Executive Summary**: Once a user performs search, that search is tied to a `query_id`. Then any following user events until the next search are logged and indexed by the search's `query_id`. If the user finds something of interest, that something's identifier (`object_id` or `key_value`) is logged in the event store with the `query_id`.
Expand Down
7 changes: 7 additions & 0 deletions _search-plugins/ubi/schemas.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
layout: default
title: Ubi index schemas
parent: User behavior insights
has_children: false
nav_order: 7
---

# Key User Behavior Insights concepts
**User Behavior Insights** (Ubi) **Logging** is really just a matter of linking and indexing queries, results and events within OpenSearch.

Check failure on line 10 in _search-plugins/ubi/schemas.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/schemas.md#L10

[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: Ubi. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_search-plugins/ubi/schemas.md", "range": {"start": {"line": 10, "column": 29}}}, "severity": "ERROR"}

Check warning on line 10 in _search-plugins/ubi/schemas.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/schemas.md#L10

[OpenSearch.Simple] Don't use 'just' because it's not neutral in tone. If you mean 'only', use 'only' instead.
Raw output
{"message": "[OpenSearch.Simple] Don't use 'just' because it's not neutral in tone. If you mean 'only', use 'only' instead.", "location": {"path": "_search-plugins/ubi/schemas.md", "range": {"start": {"line": 10, "column": 56}}}, "severity": "WARNING"}
Expand Down
8 changes: 8 additions & 0 deletions _search-plugins/ubi/sql_queries.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
layout: default
title: Ubi queries with sql
parent: User behavior insights
has_children: false
nav_order: 7
---

# Sample UBI SQL queries
These can be performed on the OpenSearch Dashboards/Query Workbench:
http(s):\//`{server}`:5601/app/opensearch-query-workbench

Check failure on line 11 in _search-plugins/ubi/sql_queries.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/sql_queries.md#L11

[Vale.Terms] Use 'OpenSearch' instead of 'opensearch'.
Raw output
{"message": "[Vale.Terms] Use 'OpenSearch' instead of 'opensearch'.", "location": {"path": "_search-plugins/ubi/sql_queries.md", "range": {"start": {"line": 11, "column": 32}}}, "severity": "ERROR"}
Expand Down
Loading

0 comments on commit cf9e128

Please sign in to comment.