diff --git a/_search-plugins/ubi/client_datastructures.md b/_search-plugins/ubi/client-data-structures.md similarity index 95% rename from _search-plugins/ubi/client_datastructures.md rename to _search-plugins/ubi/client-data-structures.md index aa6f2e3c65..5b7d628cff 100644 --- a/_search-plugins/ubi/client_datastructures.md +++ b/_search-plugins/ubi/client-data-structures.md @@ -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 diff --git a/_search-plugins/ubi/documentation.md b/_search-plugins/ubi/documentation.md index 578e46b9c0..484c7873e9 100644 --- a/_search-plugins/ubi/documentation.md +++ b/_search-plugins/ubi/documentation.md @@ -1,6 +1,6 @@ --- layout: default -title: Ubi plugin management +title: UBI plugin management parent: User behavior insights has_children: false nav_order: 2 @@ -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 @@ -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/) diff --git a/_search-plugins/ubi/dsl-queries.md b/_search-plugins/ubi/dsl-queries.md new file mode 100644 index 0000000000..f3a6f481cd --- /dev/null +++ b/_search-plugins/ubi/dsl-queries.md @@ -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 diff --git a/_search-plugins/ubi/index.md b/_search-plugins/ubi/index.md index 41bf44fb56..83c7041603 100644 --- a/_search-plugins/ubi/index.md +++ b/_search-plugins/ubi/index.md @@ -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 @@ -21,18 +21,18 @@ TODO: link a client implementation | 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 | diff --git a/_search-plugins/ubi/schemas.md b/_search-plugins/ubi/schemas.md index ba43fb801b..1610cf6d71 100644 --- a/_search-plugins/ubi/schemas.md +++ b/_search-plugins/ubi/schemas.md @@ -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*. -**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` @@ -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`
diff --git a/_search-plugins/ubi/sql_queries.md b/_search-plugins/ubi/sql-queries.md similarity index 99% rename from _search-plugins/ubi/sql_queries.md rename to _search-plugins/ubi/sql-queries.md index 41badbe5ec..3d640ad0b4 100644 --- a/_search-plugins/ubi/sql_queries.md +++ b/_search-plugins/ubi/sql-queries.md @@ -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 diff --git a/_search-plugins/ubi/ubi_dashboard_tutorial.md b/_search-plugins/ubi/ubi-dashboard-tutorial.md similarity index 100% rename from _search-plugins/ubi/ubi_dashboard_tutorial.md rename to _search-plugins/ubi/ubi-dashboard-tutorial.md