| 198 | } |
| 199 | |
| 200 | async query(query: string, options: { |
| 201 | k?: number; |
| 202 | userId?: string; |
| 203 | filters?: { |
| 204 | sectors?: string[]; |
| 205 | minSalience?: number; |
| 206 | user_id?: string; |
| 207 | startTime?: number; |
| 208 | endTime?: number; |
| 209 | }; |
| 210 | } = {}): Promise<any[]> { |
| 211 | if (this.mode === 'remote') { |
| 212 | return this._remoteQuery(query, options); |
| 213 | } |
| 214 | |
| 215 | const filters = { |
| 216 | ...options.filters, |
| 217 | user_id: options.filters?.user_id || options.userId |
| 218 | }; |
| 219 | |
| 220 | return await hsg_query(query, options.k || 10, filters); |
| 221 | } |
| 222 | |
| 223 | async delete(id: string): Promise<void> { |
| 224 | if (this.mode === 'remote') { |