ncbo / ontologies_linked_data

Models and serializers for ontologies and related artifacts backed by 4store
Other
17 stars 8 forks source link

Term "biodiversity" is missing from ENVTHES ontology #165

Open mdorf opened 1 year ago

mdorf commented 1 year ago

A user on the CEDAR mailing list reported a problem with ENVTHES ontology:

Screen Shot 2022-11-21 at 10 32 58 AM

Here is the hierarchy: https://vocabs.lter-europe.net/envthes/en/page/?uri=http://vocabs.lter-europe.net/EnvThes/21673

Screen Shot 2022-11-21 at 10 33 39 AM

However, when I search the ENVTHES ontology in BP the above ‘biodiversity’ class is not matched. https://bioportal.bioontology.org/search?q=biodiversity&ontologies=ENVTHES&include_properties=false&include_views=false&includeObsolete=false&require_definition=false&exact_match=false

I get only ‘biodiversity hotspot’.

mdorf commented 1 year ago

I checked the Solr index, and the term "biodiversity" is NOT there. I am currently able to index ENVTHES with the term "biodiversity" only by introducing a redundant API call inside the GOO search module, which cannot serve as a permanent fix: https://github.com/ncbo/goo/blob/master/lib/goo/search/search.rb#L65-L71

      def indexBatch(collection, connection_name=:main)
        docs = Array.new
        collection.each do |c|

          # this code fixes the missing "biodiversity" term for ENVTHES ontology
          # however, this code is redundant and should not be used as a permanent fix
          c.bring(:prefLabel)

          docs << c.indexable_object
        end
        Goo.search_connection(connection_name).add(docs)
      end