Gleanex.Platform.Search (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to search

Summary

Functions

filters(opts \\ [])

@spec filters(opts :: keyword()) ::
  {:ok, Gleanex.Platform.SearchFiltersResponse.t()}
  | {:error, Gleanex.Error.t()}

List search filters

List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. Without query, returns field metadata only and does not run a search. With a nonblank query, provide exactly one datasources value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See FilterFieldInfo.values for limitations on suggested values. Rate-limited requests return HTTP 429 with Retry-After; temporary backend unavailability returns HTTP 503.

Options

  • datasources: Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, jira). With a nonblank query, exactly one datasource is required. Unknown or inaccessible identifiers return invalid_datasource.

  • query: Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents.

search(body, opts \\ [])

@spec search(body :: Gleanex.Platform.SearchRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.SearchResponse.t()} | {:error, Gleanex.Error.t()}

Search

Search your organization's connected content and return ranked document results with cursor pagination. Use GET /api/search/filters to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. Errors: HTTP 422 unprocessable_query returns no results or next_cursor. See warnings on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error.

Request Body

Content Types: application/json