synapse-product/synapse/storage/schema/main/delta
James Salter d902181de9
Unified search query syntax using the full-text search capabilities of the underlying DB. (#11635)
Support a unified search query syntax which leverages more of the full-text
search of each database supported by Synapse.

Supports, with the same syntax across Postgresql 11+ and Sqlite:

- quoted "search terms"
- `AND`, `OR`, `-` (negation) operators
- Matching words based on their stem, e.g. searches for "dog" matches
  documents containing "dogs". 

This is achieved by 

- If on postgresql 11+, pass the user input to `websearch_to_tsquery`
- If on sqlite, manually parse the query and transform it into the sqlite-specific
  query syntax.

Note that postgresql 10, which is close to end-of-life, falls back to using
`phraseto_tsquery`, which only supports a subset of the features.

Multiple terms separated by a space are implicitly ANDed.

Note that:

1. There is no escaping of full-text syntax that might be supported by the database;
  e.g. `NOT`, `NEAR`, `*` in sqlite. This runs the risk that people might discover this
  as accidental functionality and depend on something we don't guarantee.
2. English text is assumed for stemming. To support other languages, either the target
  language needs to be known at the time of indexing the message (via room metadata,
  or otherwise), or a separate index for each language supported could be created.

Sqlite docs: https://www.sqlite.org/fts3.html#full_text_index_queries
Postgres docs: https://www.postgresql.org/docs/11/textsearch-controls.html
2022-10-25 14:05:22 -04:00
..
12 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
13 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
14 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
15 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
16 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
17 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
18 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
19 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
20 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
21 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
22 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
24 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
25 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
26 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
27 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
28 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
29 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
30 Remove unnecessary pass statements. (#12206) 2022-03-11 07:06:21 -05:00
31 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
32 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
33 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
34 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
35 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
36 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
37 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
38 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
39 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
40 Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
41 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
42 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
43 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
44 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
45 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
46 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
47 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
48 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
49 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
50 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
51 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
52 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
53 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
54 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
55 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
56 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
57 Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
58 Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
59 Merge branch 'release-v1.37' into develop 2021-06-29 20:25:47 +01:00
60 fix ordering of bg update (#10291) 2021-07-01 18:45:55 +01:00
61 Make historical events discoverable from backfill for servers without any scrollback history (MSC2716) (#10245) 2021-07-28 10:46:37 -05:00
62 Move the sessions delta to the latest schema version. (#10725) 2021-08-31 16:38:43 +00:00
63 Add a partial index to presence_stream to speed up startups (#10748) 2021-09-03 17:16:56 +01:00
64 Move sql file for remove_deleted_devices_from_device_inbox into v65 (#11303) 2021-11-15 11:47:30 +00:00
65 Save the OIDC session ID (sid) with the device on login (#11482) 2021-12-06 12:43:06 -05:00
67 Drop unused table public_room_list_stream. (#11795) 2022-01-21 09:19:56 +00:00
68 Send device list updates to application services (MSC3202) - part 1 (#11881) 2022-03-30 14:39:27 +01:00
69 Add index to cache invalidations (#12747) 2022-05-17 09:34:59 +00:00
70 Rename delta to apply in the proper schema version. (#13050) 2022-06-14 14:34:04 +00:00
71 Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
72 Update event push action and receipt tables to support threads. (#13753) 2022-09-14 17:11:16 +00:00
73 Unified search query syntax using the full-text search capabilities of the underlying DB. (#11635) 2022-10-25 14:05:22 -04:00