Skip to content

Commit

Permalink
name files consistently with docs site and fix links.
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed May 22, 2024
1 parent 84f9395 commit e390422
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ has_children: false
nav_order: 7
---

The data structures 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.
The data structures that we use for indexing events adhere to the following nested structure that aligns with the UBI schemas. See the [schemas]({{site.url}}{{site.baseurl}}/search-plugins/schemas/) for descriptions and examples of the following fields.

`struct UbiEvent {`
- application
Expand Down
9 changes: 5 additions & 4 deletions _search-plugins/ubi/documentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: Ubi plugin management
title: UBI plugin management
parent: User behavior insights
has_children: false
nav_order: 2
Expand Down Expand Up @@ -92,7 +92,7 @@ index is used to store events, and the other index is for storing queries.
### OpenSearch data mappings
UBI has 2 primary indexes:
- **UBI Queries** stores all queries and results.
- **UBI Events** store that the Ubi client writes events to.
- **UBI Events** store that the UBI client writes events to.
*Follow the [schema deep dive]({{site.url}}{{site.baseurl}}/search-plugins/ubi/schemas/) to understand how these two indexes make UBI into a causal framework for search.*

## Plugin API
Expand Down Expand Up @@ -173,5 +173,6 @@ http://localhost:9200/ecommerce/_search -H "X-ubi-store: mystore" -H "X-ubi-user

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`.

[Sample SQL queries](documentation\queries\sql_queries.md)
[Sample OpenSearch queries](documentation\queries\dsl_queries.md)
[Sample SQL queries]({{site.url}}{{site.baseurl}}/search-plugins/ubi/sql-queries/)

[Sample OpenSearch queries]({{site.url}}{{site.baseurl}}/search-plugins/ubi/dsl-queries/)
12 changes: 12 additions & 0 deletions _search-plugins/ubi/dsl-queries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: default
title: UBI queries using OpenSearch
parent: User behavior insights
has_children: false
nav_order: 8
---

# Sample UBI using OpenSearch DSL queries

These can be performed on the OpenSearch Dashboards/Query Workbench:
http://chorus-opensearch-edition.dev.o19s.com:5601/app/opensearch-query-workbench

Check failure on line 12 in _search-plugins/ubi/dsl-queries.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/dsl-queries.md#L12

[Vale.Terms] Use 'OpenSearch' instead of 'opensearch'.
Raw output
{"message": "[Vale.Terms] Use 'OpenSearch' instead of 'opensearch'.", "location": {"path": "_search-plugins/ubi/dsl-queries.md", "range": {"start": {"line": 12, "column": 15}}}, "severity": "ERROR"}

Check failure on line 12 in _search-plugins/ubi/dsl-queries.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _search-plugins/ubi/dsl-queries.md#L12

[Vale.Terms] Use 'OpenSearch' instead of 'opensearch'.
Raw output
{"message": "[Vale.Terms] Use 'OpenSearch' instead of 'opensearch'.", "location": {"path": "_search-plugins/ubi/dsl-queries.md", "range": {"start": {"line": 12, "column": 56}}}, "severity": "ERROR"}
12 changes: 6 additions & 6 deletions _search-plugins/ubi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ User Behavior Insights, or UBI, is a community plugin for capturing client-side
It is a causal system, linking a user's query to all subsequent user interactions with your application until they perform another search.



* An machine readable [schema](https://github.com/o19s/ubi) that faciliates interoperablity of the UBI specification.
* 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.
TODO: link a client implementation
Expand All @@ -21,18 +21,18 @@ TODO: link a client implementation
<!-- vale off -->

| Explanation & Reference | Description
| :--------- | :------- |
| :---------: | :-------: |
| [UBI Request/Response Specification](https://github.com/o19s/ubi/) | Schema standard for making UBI requests and responses |
| [UBI OpenSearch Schema Documentation]({{site.url}}{{site.baseurl}}/search-plugins/ubi/schemas/) | Documentation on the individual Query and Event stores for OpenSearch |
| [`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 |


| Tutorials & How-to Guides | Description
| :--------- | :------- |
| :---------: | :-------: |
| [UBI Plugin Admin]({{site.url}}{{site.baseurl}}/search-plugins/ubi/documentation/) | How to install and use the UBI Plugin |
| [ JavaScript client structures ]({{site.url}}{{site.baseurl}}/search-plugins/ubi/data_structures/) | Sample JavaScript structures for populating the Event store |
| [UBI SQL queries ]({{site.url}}{{site.baseurl}}/search-plugins/ubi/sql_queries/) | How to write analytic queries for UBI data in SQL |
| [UBI Dashboard]({{site.url}}{{site.baseurl}}/search-plugins/ubi/ubi_dashboard_tutorial/) | Teaches you how to build an OpenSearch dashboard with UBI data |
| [ JavaScript client structures ]({{site.url}}{{site.baseurl}}/search-plugins/ubi/data-structures/) | Sample JavaScript structures for populating the Event store |
| [UBI SQL queries ]({{site.url}}{{site.baseurl}}/search-plugins/ubi/sql-queries/) | How to write analytic queries for UBI data in SQL |
| [UBI Dashboard]({{site.url}}{{site.baseurl}}/search-plugins/ubi/ubi-dashboard-tutorial/) | Teaches you how to build an OpenSearch dashboard with UBI data |
| ... | teaches how to do something |

<!-- vale on -->
Expand Down
4 changes: 2 additions & 2 deletions _search-plugins/ubi/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ There are 2 separate stores for UBI:
All underlying query information and results ([`object_id`](#object_id)'s) are stored in the **UBI Queries** store, and remains largely invisible in the background.
The only obvious difference will be in the `ubi` stanze of the json response, *which could cause index bloat if one forgets that this is enabled*.

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

View workflow job for this annotation

GitHub Actions / vale

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

[Vale.Terms] Use 'JSON' instead of 'json'.
Raw output
{"message": "[Vale.Terms] Use 'JSON' instead of 'json'.", "location": {"path": "_search-plugins/ubi/schemas.md", "range": {"start": {"line": 109, "column": 64}}}, "severity": "ERROR"}

**UBI Queries** [schema](../src/main/resources/queries-mapping.json):
**UBI Queries** [schema](https://github.com/o19s/opensearch-ubi/tree/2.14.0/src/main/resources/queries-mapping.json):
Since UBI manages the **UBI Queries** store, the developer should never have to write directly to this store (except for importing data).

- `timestamp`
Expand All @@ -130,7 +130,7 @@ Since UBI manages the **UBI Queries** store, the developer should never have to

### 2) **UBI events**
This is the event store that the client side directly indexes events to, linking the event [`action_name`](#action_name), [`object_id`](#object_id)'s and [`query_id`](#query_id)'s together with any other important event information.
Since this schema is dynamic, the developer can add any new fields and structures (such as *user* information, *geo-location* information) at index time that are not in the current **UBI Events** [schema](../src/main/resources/events-mapping.json):
Since this schema is dynamic, the developer can add any new fields and structures (such as *user* information, *geo-location* information) at index time that are not in the current **UBI Events** [schema](https://github.com/o19s/opensearch-ubi/tree/2.14.0/src/main/resources/events-mapping.json):
- `application`
<p id="application">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: Ubi queries with sql
title: UBI queries with sql
parent: User behavior insights
has_children: false
nav_order: 7
Expand Down
File renamed without changes.

0 comments on commit e390422

Please sign in to comment.