Skip to content

Initial full text search on all projects (based on access) #2610

@bogdanromanx

Description

@bogdanromanx

Acceptance criteria:

  • upon typing in the global search bar, a new option is presented (suggested) that allows the user to search the entire deployment using full text search
    • the option is always the first suggestion
  • upon confirming the intent to search having typed a minimum of 1 character, the search result view is presented to the user displaying results in a table format
  • the search results table displays sufficient results to fill the screen real-estate without the need to scroll
  • the table will include a header describing the contents of each column
    • the name of each column must be readable (capital letter, spaces when multiple words; the name of the indexed fields are not appropriate for display)
  • the table will display sufficient columns to fill the screen real-estate without the need of horizontal scrolling
  • the first column is a numerical index of the result set
  • columns need to be rendered such that below a minimum the text will be truncated (suffixing '...')
    • upon hovering a cell that has truncated text, a tooltip should be presented to display the full value of that cell
    • if the cell is an ID (URI) the cell will display only the fragment (if exists and non-empty) otherwise the last non-empty URI path segment
    • if the cell is multi-valued all values are displayed, separated by commas and truncated (suffixing '...')
  • when clicking on a table row, the resource details window is displayed
  • an approximation of the total result count should be displayed in the top right corner of the table
  • the styling of the search result view should match the mock-ups
  • TBD: the styling of the search result view should be documented for further use in the rest of the application (in a style guide document, readme etc.)

Reference mock-ups: https://xd.adobe.com/view/50ef3eb0-46be-4b49-8e1a-6232cedf127e-05bc/

Delta:

  • Create a new Delta plugin - @umbreak
  • Create an endpoint that returns the configuration of global search (with the first 8 fields listed below) - @imsdu
  • Define the SPARQL Construct query to be used in indexing for Search (static query definition for now) - @umbreak
  • Define the ES mapping, settings (analyzer) for Search - @imsdu
  • Provision a Composite View to each project with the defined construct query - @imsdu
  • Implement the Query endpoint that targets all projections of the CompositeViews- @wwajerowicz
  • Filter the projections included in the query based on access - @wwajerowicz
  • Evaluate the use of ids instead of labels for fields that have both (e.g. brain region)

Fusion:

  • confirm the mock-ups with @adulbrich
  • update the nexus-sdk to support the new configuration endpoint
  • create an antd theme
  • build the results table with the new style recommendations
  • fit the table to the screen real-estate
  • define the ES query
  • implement the ability to display a tooltip on hover for truncated fields
  • implement the data connector for the table
  • format the ES results to feed to the table
  • modify the search box to present FTS as first option and initiate the search
  • display the resource details window on row click

Reference columns below (on the first 8 columns to be considered for this issue):

Column Name Column Type Path MINDS Example Data Type
Project Multi-Select public/sscx
Types Multi-Select @type Entity, Dataset, Trace
Name Full-Text Search name or label or prefLabel in that order C231296A-P4A2
Description Full-Text Search description This dataset is about electrophysiology traces recorded from cell 001150217A1CA1pyMPG for the project Adaptive Stimulus Set. The dataset contains one distribution of the traces in NWB file format.
Brain Region Multi-Select nsg:brainLocation / nsg:brainRegion / rdfs:label Yes primary somatosensory cortex
Subject Specie Multi-Select nsg:subject / nsg:species / rdfs:label Yes rattus norvegicus
Contributors Multi-Select nsg:contribution / prov:agent optional / schema:givenName and /schema:familyName Yes John Doe
Organisation Multi-Select nsg:contribution / prov:agent optional / schema:name Yes EPFL (École polytechnique fédérale de Lausanne)
License Multi-Select schema:license Yes Attribution 4.0 International (CC BY 4.0)
Distribution Yes
M-Type Multi-Select nsg:annotation / nsg:hasBody filter "@type":"MType" then / rdfs:label L1_DAC Neuron Morphology
Nexus Registrator Multi-Select _createdBy ulbrich
Nexus Registration Date Date Range _createdAt 2020-04-07T14:59:17.089Z
Nexus Tag Multi-Select SSCX2021

Implementation notes (assumptions):

  • CompositeViews will be used, configured with one source and one ES projection; each project will be provisioned with a composite view with fixed id and configuration
  • A search endpoint will be provided that exposes the ES query interface
  • A configuration endpoint will be provided that describes the columns to be rendered (name, property, type, unit etc.)

Not included (pending refinement on the implementation):

  • docs
  • integration tests
  • benchmarking (latency and scalability in terms of indexing and querying)

TBD: @bogdanromanx create separate tickets to address the items that are not included

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions