You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the `sync_metrics` management command to ensure that the [index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html)
@@ -63,12 +63,10 @@ Now add some data:
63
63
```python
64
64
from myapp.metrics import PageView
65
65
66
-
user = User.objects.latest()
67
-
68
66
# By default we create an index for each day.
69
67
# Therefore, this will persist the document
70
-
# to an index called, e.g. "myapp_pageview_2020.02.04"
71
-
PageView.record(user_id=user.id)
68
+
# to an index named for the record type and date
69
+
PageView.record(page_id='my.page.id')
72
70
```
73
71
74
72
Go forth and search!
@@ -102,7 +100,7 @@ You can configure the index template settings by setting
0 commit comments