Revisit annotation indexing rules and consider covering sameAs, equivalentClass, equivalentProperty, others?

Open
#3 5 comments 0 reactions 1 assignee View on GitHub

@amoeba is already working on this.

Since Sep 24, 2021.

Assessment

This issue has not been assessed yet.

Description

enhancement

@mbjones asked on Slack whether we index URIs for terms that are sameAs'd. I answered no but maybe we actually do and I just haven't seen it happen because we don't use sameAs much in our ontologies.

In our use of semantic search so far, we haven't made much use of alignment axioms (sameAs, equivalentClass, equivalentProperty) and have so far only used subClassOf (to materialize parent classes). I think the MOSAiC ontology is the first ontology we've enabled in search that uses things like NamedIndividuals and sameAs in a way we care about and I think our search isn't quite as good for MOSAiC as it is for others (like ECSO).

I think we could make a few changes to improve that and improve things for the future.

Change one: Include the class of any value URIs

For example, for the MOSAiC datasets we have in the Arctic Data Center, we inserted dataset-level annotations like

Screen Shot 2021-10-04 at 2 01 27 PM

Each of those annotations is to a NamedIndividual, rather than to a Class as we've been doing. How do we drive good searches for these? The only way right now is to search exactly for the term. But PS122/2, for example, is of class "_MOSAiC Specific Term" and "Campaign". I think it'd be nice if a person could search for PS122/2 directly but also by either of its classes. This same reasoning applies to the other two annotations in the screenshot above.

Change two: Include sameAs and equivalentClass/equivalentProperty relationships for terms

As another example, MOSAiC has a set of Research Location named individuals, like "Arctic Ocean". We didn't align this term but if we did in the future (say to http://purl.obolibrary.org/obo/GAZ_00000323), it'd be best if searches for either MOSAiC's term and GAZ's term returned documents annotated either way. This would benefit any future alignment work we do and improve searches.

Summary

Both changes, in addition to our current indexing rules, would be additive. That is, any search that works now also works with these changes. The current logic is:

  • For each annotation
    • Find all the property URIs
      • Index the property
      • Index any superproperties
    • Find all value URIs
      • Index the value
      • Index any superclasses

With the changes above, we'd get:

  • For each annotation
    • Find all the property URIs
      • Index the property
      • Index any superproperties
      • Index any properties that are equivalentPropertys
    • Find all value URIs
      • Index the value
      • Index any superclasses
      • Index any terms that are owl:sameAs
      • Index any terms that are equivalentClasss

I think this can be done by adjusting the SPARQL query we already use and I don't expect we'll have any performance issues or Solr index growth issues.

Dominant language
Java
Stars
0
Forks
2
Avg merge
6d 6h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataONEorg/dataone-indexer

All issues in DataONEorg/dataone-indexer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.