- Enterprise Search Guide: other versions:
- Getting started
- Prerequisites
- Ingestion
- Web crawler
- Connectors
- Native connectors
- Connector clients and frameworks
- Workplace Search connectors
- Usage
- Known issues
- Troubleshooting
- Logs
- Security
- Sync rules
- Content extraction
- Reference: Azure Blob Storage
- Reference: Confluence
- Reference: Google Cloud Storage
- Reference: Jira
- Reference: Microsoft SQL
- Reference: MongoDB
- Reference: MySQL
- Reference: Network drive
- Reference: Oracle
- Reference: PostgreSQL
- Reference: S3
- Reference: SharePoint
- Ingestion APIs
- Ingest pipelines
- Document enrichment with ML
- ELSER text expansion
- Indices, engines, content sources
- Programming language clients
- Behavioral analytics
- Search UI
- App Search and Workplace Search
- Search Applications
- Enterprise Search server
- Run using Docker images
- Run using downloads (packages)
- Enterprise Search server known issues
- Troubleshooting
- Troubleshooting setup
- Monitoring
- Read-only mode
- Management APIs
- Monitoring APIs
- Read-only mode API
- Storage API
- Configuration
- Configuring encryption keys
- Configuring a mail service
- Configuring SSL/TLS
- Upgrading and migrating
- Upgrading self-managed deployments
- Upgrading from Enterprise Search 7.x
- Upgrading from Enterprise Search 7.11 and earlier
- Migrating from App Search on Elastic Cloud
- Migrating from App Search on Swiftype.com
- Migrating from self-managed App Search
- Logs and logging
- Known issues
- Troubleshooting
- Help, support, and feedback
- Release notes
- 8.8.2 release notes
- 8.8.1 release notes
- 8.8.0 release notes
- 8.7.1 release notes
- 8.7.0 release notes
- 8.6.2 release notes
- 8.6.1 release notes
- 8.6.0 release notes
- 8.5.3 release notes
- 8.5.2 release notes
- 8.5.1 release notes
- 8.5.0 release notes
- 8.4.3 release notes
- 8.4.2 release notes
- 8.4.1 release notes
- 8.4.0 release notes
- 8.3.3 release notes
- 8.3.2 release notes
- 8.3.1 release notes
- 8.3.0 release notes
- 8.2.3 release notes
- 8.2.2 release notes
- 8.2.1 release notes
- 8.2.0 release notes
- 8.1.3 release notes
- 8.1.2 release notes
- 8.1.1 release notes
- 8.1.0 release notes
- 8.0.1 release notes
- 8.0.0 release notes
- 8.0.0-rc2 release notes
- 8.0.0-rc1 release notes
- 8.0.0-beta1 release notes
- 8.0.0-alpha2 release notes
- 8.0.0-alpha1 release notes
Migrating from 8.7 to 8.8
editMigrating from 8.7 to 8.8
editBehavioral analytics were introduced in beta in Elastic 8.7. In version 8.8, the data model changes to support dashboards and future features. To use these new features, you must migrate to the new data model. Follow the steps in this document to migrate.
1. Create a collection
editAny existing analytics collections can continue to receive data, but to use the new analytics features, you must create new collections. You will need to create a new collection to store your analytics data. You can do this through the Kibana UI. Refer to Getting Started.
2. Add existing events to the new collection
editIf you want to keep your existing events, you will need to:
- Transform the data using the data structure outlined in Update events.
-
Reindex them into the new datastream.
The datastream name is based on the collection name that you created.
For example, if you created a collection called
website
, the datastream name will bewebsite-behavioral_analytics-events
.
Refer to the Elasticsearch JavaScript client documentation for an example of how to reindex documents.
3. Update events
editYou will need to update your events to the new data structure.
Required fields
- All events
-
All events require the following fields:
-
@timestamp
(no change since 8.7) -
data_stream
(identifies the datastream the event belongs to){ "@timestamp": 1682671778730, "data_stream": { "namespace": "<your-collection>", // Name of your collection "type": "behavioral_analytics", // Fixed value "dataset": "events" // Fixed value } }
-
For the following events, you will need to update certain fields.
- Search Event
-
This event represents when a user searches.
Required fields:
-
search.query
{ search: { "query": "laptop", // required "filters": { "brand": ["apple"] }, page: { current: 1, size: 10, }, results: { // optional items: [ { document: { id: "123", index: "products" }, page: { url: "http://ww.my-website.com/url" } } ], total_results: 100 }, sort: { name: "relevance" } }, event: { action: "search" }, session: { id: "123" }, user: { id: "456" } }
-
- Search Click Event
-
This event represents when a user clicks a document from a search.
Required Fields:
-
search.query
-
Any of:
document
orpage
. Both are preferable.{ search: { "query": "laptop", // required "filters": { "brand": ["apple"] }, page: { current: 1, size: 10, }, results: { // optional items: [ { document: { id: "123", index: "products" }, page: { url: "http://ww.my-website.com/url" } } ], total_results: 100 }, sort: { name: "relevance" } }, event: { action: "search_click" }, document: { id: "123", index: "products" }, page: { url: "http://localhost:3000/javascript-tracker", title: "my product detail" }, session: { id: "123" }, user: { id: "456" } }
-
- Page View Event
-
This event represents when a user clicks a document from a search.
Required Fields:
-
Any of:
document
orpage
. Both are preferable.{ document: { id: "123", index: "products" }, page: { url: "http://localhost:3000/javascript-tracker", title: "my product detail" }, event: { action: "page_view" }, session: { id: "123" }, user: { id: "456" } }
-
Behavioral analytics does not support custom events in 8.8. You will not be able to use custom events created in 8.7 in the new data model.
4. Update your tracker integration
editDepending on how you integrated the tracker (using either the browser-tracker
or the javascript-tracker
), you will need to update the integration to continue to capture events.
Follow the steps in your collection’s integration page to update your integration. Find this under Enterprise Search > Behavioral Analytics > <my-collection> > Integration.
On this page