Snapshot version

You are browsing the docs for the snapshot version of Nexus, the latest release is available here

Global search

Nexus provides global search functionality across all projects through the search plugin.

Warning

The search plugin is experimental and its functionality and API can change without notice.

The search plugin relies on composite views:

  • An underlying composite view is created for every project in the Nexus deployment
  • Those views are identical and index data from their enclosing project in a single Elasticsearch projection.
  • The query endpoints filter the Elasticsearch projections from the underlying composite views and only returns results from indices to which user has access to, i.e. has views/query permission.

For instructions on how to configure global search in Nexus and how it works please visit the Search configuration page.

Api Mapping

The underlying composite views can queried to monitor their indexing progress, to query their intermediate namespaces, …

An API mapping search has been defined to make it easier:

Example:

GET /v1/views/myorg/myproject/search/offset

Will allow to get the indexing progress for search for the myorg/myproject

Query

POST /v1/search/query
{payload}

… where {payload} is a Elasticsearch query and the response is forwarded from the underlying Elasticsearch indices.

Query a suite

Nexus Delta allows to configure multiple search suites under plugins.search.suites. Each suite is composed of one or more projects. When querying using a suite, the query is only performed on the underlying Elasticsearch indices of the projects in the suite.

POST /v1/search/query/suite/{suiteName}?addProject={project}
{payload}

… where:

  • {suiteName} is the name of the suite
  • {project}: Project - can be used to extend the scope of the suite by providing other projects under the format org/project. This parameter can appear multiple times, expanding further the scope of the search.
  • {payload} is a Elasticsearch query and the response is forwarded from the underlying Elasticsearch indices.

Configuration

GET /v1/search/config

This endpoint returns the search configuration. The contents of plugins.search.fields config file is the payload of this response.

Fetch a suite

GET /v1/search/suite/{suiteName}

… where {suiteName} is the name of the suite.

Request
sourceGET /v1/search/suite/suiteName
Response
source{
  "@context": "https://bluebrain.github.io/nexus/contexts/suites.json",
  "name": "suiteName",
  "projects": [
    "org/project",
    "org2/project2"
  ]
}