diff --git a/src/resources/interface.ts b/src/resources/interface.ts index a8896d962..e6c1eed24 100644 --- a/src/resources/interface.ts +++ b/src/resources/interface.ts @@ -6,20 +6,17 @@ import { HashMap } from '../utilities/types'; /** Allowable query parameters for basic index endpoints */ export interface PlaceResourceQueryOptions { /** - * Search filter supporting the following syntax - * https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html + * Free-text search filter. Words match as prefixes against the resource's + * searchable fields (PostgreSQL full-text search); all words must match. */ q?: string; - /** - * Comma separated list of fields to search. - * Accepts wildcard expressions and boost relevance scores using caret ^ operator. - */ + /** @deprecated Ignored by the server since PlaceOS moved search to PostgreSQL (PPT-2644) */ fields?: string; - /** Number of results to return. Defaults to `20`. Max `500` */ + /** Number of results to return. Defaults to `20`. Max `10000` */ limit?: number; - /** @deprecated Use `ref` for pagination. Offset of the results to return. Max `10000` */ + /** Offset of the results to return. Max `1000000` */ offset?: number; - /** Token for accessing the next page of results, provided in the `Link` header */ + /** @deprecated Ignored by the server; pagination follows the `Link` header's offset */ ref?: string; /** Number of milliseconds to cache the query response */ cache?: number; diff --git a/src/root/functions.ts b/src/root/functions.ts index 3675207e5..fb9668c31 100644 --- a/src/root/functions.ts +++ b/src/root/functions.ts @@ -40,7 +40,7 @@ export function signal(channel: string, body: HashMap = {}): Promise { return post(`${apiEndpoint()}/signal?${q}`, body).then(() => undefined); } -/** Recreate Elasticsearch indexes */ +/** @deprecated No-op since PlaceOS moved search to PostgreSQL (PPT-2644); will be removed */ export function reindex(query_params: ReindexOptions = {}): Promise { const q = toQueryString(query_params); return post(`${apiEndpoint()}/reindex${q ? '?' + q : ''}`, {}).then( @@ -48,7 +48,7 @@ export function reindex(query_params: ReindexOptions = {}): Promise { ); } -/** Push all database data into Elasticsearch */ +/** @deprecated No-op since PlaceOS moved search to PostgreSQL (PPT-2644); will be removed */ export function backfill(): Promise { return post(`${apiEndpoint()}/backfill`, {}).then(() => undefined); }