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
Copy file name to clipboardExpand all lines: docs/site/features/event/event_search.mdx
+27-24Lines changed: 27 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,31 +3,8 @@ title: Searching Events
3
3
---
4
4
5
5
User events in Memobase are stored as a sequence of experiences, each enriched with [tags](/features/event/event_tag). By default, events are retrieved in chronological order, but Memobase also provides a powerful search function to find events based on a query.
6
-
7
6
## Semantic Search
8
7
9
-
You can perform a semantic search to find events related to a specific topic or concept.
10
-
11
-
```python
12
-
# To use the Python SDK, first install the package:
# Search for events related to the user's emotions
21
-
events = user.search_event("Anything about my emotions")
22
-
print(events)
23
-
```
24
-
25
-
This query will return events where the user discussed their emotions, events that were automatically [tagged](/features/event/event_tag) with an `emotion` tag, or events that updated profile slots related to emotion.
26
-
27
-
For a detailed list of search parameters, please refer to the [API documentation](/api-reference/events/search_events).
28
-
29
-
## Search Event Gists
30
-
31
8
A user event is a group of user infos happened in a period of time.
32
9
So when you need to search for specific facts or infos, you may need a more fine-grained search.
33
10
@@ -55,4 +32,30 @@ print(events)
55
32
```
56
33
</CodeGroup>
57
34
58
-
For detail API, please refer to [Search Event Gists](/api-reference/events/search_event_gists).
35
+
For detail API, please refer to [Search Event Gists](/api-reference/events/search_event_gists).
36
+
37
+
## Search Packed Events with Tags
38
+
39
+
You can perform a semantic search to find events related to a specific topic or concept.
40
+
41
+
Different from `search_event_gist`, the return elements of `search_event` are packed gists of user events(happened in a period of time).
42
+
43
+
We recommend more to use `search_event_gist` to retrieve fine-grained events.
44
+
45
+
```python
46
+
# To use the Python SDK, first install the package:
# Search for events related to the user's emotions
55
+
events = user.search_event("Anything about my emotions")
56
+
print(events)
57
+
```
58
+
59
+
This query will return events where the user discussed their emotions, events that were automatically [tagged](/features/event/event_tag) with an `emotion` tag, or events that updated profile slots related to emotion.
60
+
61
+
For a detailed list of search parameters, please refer to the [API documentation](/api-reference/events/search_events).
0 commit comments