Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend semantic search widget to support more than just ECSO MeasurementTypes #1654

Closed
amoeba opened this issue Jan 26, 2021 · 9 comments · Fixed by #2502
Closed

Extend semantic search widget to support more than just ECSO MeasurementTypes #1654

amoeba opened this issue Jan 26, 2021 · 9 comments · Fixed by #2502
Assignees
Labels
ADC CI-15 Editing measurement semantics (ADC deliverable) arctic data center enhancement salmon data Open salmon data mobilization project semantics
Milestone

Comments

@amoeba
Copy link
Contributor

amoeba commented Jan 26, 2021

The Annotation filter in the search catalog is currently hard-coded to search for classes in the MeasurementType sub-tree of ECSO. It can quickly be reconfigured to search in another ontology or ontology sub-tree. This has worked well because as it's let us bootstrap some form of semantic search that is immediately useful to users by constraining scope to a single portion of a single ontology.

Screen Shot 2021-01-25 at 10 30 33 PM

However, we're starting to bring in annotations from other ontologies and it's too hard to search for datasets with those annotations using the current interface. We should consider if we can extend this to support more than just a sub-tree of a single ontology. Some ideas of mine include:

  • Let the deployment have a configured a set of ontologies that the widget might search from and optionally show browse-able trees for
  • Find a way to search just within just the set of existing annotations (by free-text). Searching for datasets by browsing the ECSO#MeasurementType tree isn't that useful until you have annotations all over the tree. It's pretty frustrating to click on a term and get zero results. As an aside: If we could show the number of results you'd get if you searched for a term next to a term in the tree browser that'd be cool
  • Let users search annotations using the main search box. We could index property labels and this would support terms from any new ontologies
@amoeba amoeba self-assigned this Jan 26, 2021
@mbjones mbjones added the salmon data Open salmon data mobilization project label Mar 22, 2021
@amoeba
Copy link
Contributor Author

amoeba commented Jun 3, 2021

I think the next iteration of this could and should work pretty similarly to the current implementation (above). Without changing too much, we could extend the current widget to:

  • Have a configurable default ontology or ontology sub-tree to search and browse
  • Accept a configurable list of ontologies or ontology sub-trees to let the user search and browse
  • Show the search and browse widget for the default ontology or ontology sub-tree by default
  • Provide an easy way for the user to select an alternative ontology or ontology sub-tree to work with

This might look something like:

Screen Shot 2021-06-02 at 4 37 12 PM

This could be done with by re-using the Bootstrap nav pills component:

Screen Shot 2021-06-02 at 4 40 27 PM

@amoeba
Copy link
Contributor Author

amoeba commented Oct 12, 2021

I've got a fully working version of the above prototype done,

Kapture 2021-10-11 at 17 14 59

And now I want to turn to how this would integrate with the variant of this filter we use in the Portals collection search builder:

Screen Shot 2021-10-11 at 5 34 05 PM

We currently have three variants of this filter and this would be a fourth. Ideally, we only have one variant, though I'm not sure that's feasible. If anyone has any good ideas I'm all ears.

amoeba added a commit that referenced this issue Oct 12, 2021
Ref #1654

I chose to duplicate the view for now until I figure out how to merge the numerous variants of our annotation search views together.
@amoeba
Copy link
Contributor Author

amoeba commented Oct 12, 2021

I spent some time tinkering and I think I have something that will cover all cases (turning four into one). The basic idea is that we'd extend the SearchableSelect to support a dropdown where the user can pick which ontology they're working against. We could use this on the main search (DataCatalogView) and in the Portals editor equally well. Since it's a change to the SearchableSelect I'm going to coordinate with @laurenwalker and @robyngit for thoughts.

Multi Ontology Search Mockups

Full link: https://www.figma.com/file/JtkdJiI8Y454uWpYsUwuvF/Multi-Ontology-Search-Mockups?node-id=0%3A1.

@robyngit
Copy link
Member

This looks great and I think it's an excellent idea to turn four views into one.

The SearchableSelect uses popovers/tooltips to show extra information about the selected labels when hovered, e.g.:

It might be helpful to show similar tooltips over the ontology to give more information about each one.

@amoeba
Copy link
Contributor Author

amoeba commented Oct 12, 2021

It might be helpful to show similar tooltips over the ontology to give more information about each one.

That's a great idea, @robyngit. Thanks.

@mbjones
Copy link
Member

mbjones commented Oct 13, 2021

Great work and interesting designs. I suggest we should discuss this semantic search UI on our Thursday semantics call, particularly with expect to what expectations we are making for search users and their knowledge of ontologies.

@robyngit
Copy link
Member

robyngit commented Mar 13, 2023

Here is a little audit of where we are currently with this issue:

  • We have a WIP version of the annotation filter using multiple ontologies in the DataCatalog in this branch. I tested and it works pretty well, though the branch was created ~1.5 years ago and there are some conflicts with the main branch.
  • As Bryce pointed out, if we implement this new TabbedAnnotationFilter view, MetacatUI will have yet another version of an Annotation filter. (We currently use the AnnotationFilterView, the SemanticFilterView, and the AnnotatorView (deprecated)). Ideally, we would roll all of these very similar views into a single configurable view.
  • Bryce suggested extending the SearchableSelect view. This has already been done in the AnnotationFilterView, though only when the filter is rendered as a multi-select.
  • Making a single view that would work for all contexts where the Annotation filter is currently used presents some challenges. For example, in the query builder, a user can keep adding terms to the input, and those terms are displayed in the input itself. In the DataCatalog search, each time a user enters some text, it should be added to the list of "applied filters" instead. (See Specialized filters for portals #1693)

Here are some options for completing this issue:

The ideal way

Take the opportunity to combine all of the Annotation views into one. This would take the most time.

The fastest way

Use Bryce's WIP view. This needs more testing and a way to configure the ontologies for the repository. The downside is that you would not be able to configure multiple ontologies in all places, e.g. not in the QueryBuilder.

The fastest way without creating a brand new view

Add the ability to select multiple ontologies to the current AnnotationFilterView. This involves basically moving all of the logic Bryce wrote in the TabbedAnnotationFilter to the AnnotationFilterView. The downside is that the AnnotationFilterView would become larger and more complicated than it already is. Also, because the way the multi-select is rendered is so different from the way the single-select is rendered, there would probably be some duplicate logic in the same view, unless we do a bit of a refactor.

@yvanlebras
Copy link

Really of interest! Thank you for this work! Not sure I fully understand operationalization scenarios, but just my 2 cents: It appears to me of interest to index all "terminological resources terms" on metacat/metacatui so we can use a searchable form comparable to the one we can use for "attributs" with autocompletion. So having a way to select search terms using the "tree representation of terms" as proposed by @amoeba Oct 12, 2021 + "just" typing the term and having autocompletion would be very nice IMO.

@robyngit robyngit added arctic data center ADC CI-15 Editing measurement semantics (ADC deliverable) labels May 17, 2023
@robyngit robyngit added this to the 2.27.0 milestone Jun 29, 2023
@robyngit robyngit modified the milestones: 2.27.0, 2.28.0 Sep 21, 2023
robyngit added a commit that referenced this issue Jan 24, 2024
@robyngit
Copy link
Member

robyngit commented Jan 24, 2024

I'm working on this feature by first combining the two Annotation views into one. Here is a summary of those two views:

AnnotationFilterView

  • uses the SearchableSelectView if in "multiselect" mode
  • views that use it:
    • DataCatalogView
    • QueryRuleView
    • SemanticFilterView

SemanticFilterView

  • extends FilterView
  • uses AnnotationFilterView as sub-view
  • views that use it:
    • FilterGroupView
classDiagram
    class AnnotationFilterView{
     << ⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ >> 
    }
    class SemanticFilterView{
     << ⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ >>
    }
    class DataCatalogView 
    class QueryRuleView 
    class FilterGroupView 
    class FilterView
    class SearchableSelectView

    DataCatalogView --> AnnotationFilterView : embeds
    QueryRuleView --> AnnotationFilterView : embeds
    FilterGroupView --> SemanticFilterView : embeds
    AnnotationFilterView --> SearchableSelectView : embeds
    SemanticFilterView ..|> FilterView : extends
    SemanticFilterView --> AnnotationFilterView : embeds
Loading

robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
- Create the SearchSelect header, option, and options (menu)
- Load these views from the SearchSelect view
- Fixes small bugs with how the SearchSelect works, allows modifying the menu more efficiently
- Deprecate the HTML template we used for SearchSelectView and render components in JS instead

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
- Use in the Biontology and Biontology-Accordion-SearchSelect mdoels
- Add methods for formatting class attributes for use in UI elements

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
For searching for ontology classes in batches via the bioportal API

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
- Includes formatting & linting fixes
- Standardize the behaviour of fetching remote info for preselected values in SsearchSelect view
- Use the SearchSelectOptions view in the SearchSelect view
- Remove unused view property from BioOntologyBrowserView

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
Instead of Annotation Filter View

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
- Add reset method to SearchSelectView
- Allow setting the desired ontologies to search within from init of Bioont. Select View.
- Remove unused imports from FilterGroupView

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
Add icon to bioontology button

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
- This adds a caching mechanism for the results from BioPortal
- Also add Util methods required by BioontologyResults

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
- Instead of a generic Backbone collection
- Add method for fetching ontology details

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
- Use the BioontologyResults collection in the BioontologyBatch model so we can cache results from BioPortal
- Add the `bioportalOntologies` config option in the AppModel, set to some ontologies that are used currently.

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
- Make icon option for category headers in search select
- Reduce size of headers in compact mode in search select

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
Slows down everything if called too often

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
SemanticUI's modal module conflicts with the Bootstrap modal that we use
Use the Boostrap modal in BioontologySelectView instead

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
robyngit added a commit that referenced this issue Sep 9, 2024
Prevent button from spilling onto new row

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
in BioontologySelectView

Issue #1654
robyngit added a commit that referenced this issue Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADC CI-15 Editing measurement semantics (ADC deliverable) arctic data center enhancement salmon data Open salmon data mobilization project semantics
Development

Successfully merging a pull request may close this issue.

5 participants