geneontology / minerva

BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

Add autocomplete API #236

Closed tmushayahama closed 3 years ago

tmushayahama commented 5 years ago

Add autocomplete (search) API to Minerva - for use of clients to have same data and order

Endpoint

api/search/xyz it is still kinda search not autocomplete

Parameters

Parameter Format Comments
key string Partial string to match
type (optional) string closure, Ontology Class Id
limit (optional) int Page Size default 10

Return

A list of matched entities

Parameter Format Comments
id string annotation class id
label string annotation class label
Nice to have
url url link to its definition or page
aspect string closure/ontology class id if not specified on the request

Implementation: a wrapper of the current solr. Keep in mind that this can be used for function companion or search database function by adding apect to the request and adding evidence on the return

tagging @lpalbou @goodb @cmungall @kltm @balhoff any thoughts?

kltm commented 5 years ago

I think that autocomplete is likely out of scope for minerva--this sounds like a Solr job. I don't think it's wise to use Minerva as a wrapper for another service.

Also see: https://github.com/geneontology/simple-annoton-editor/issues/50#issuecomment-516625957

goodb commented 4 years ago

Given some extra time, I think its worth doing the experiment to see if the go-lego blazegraph now lurking in Minerva could support this issue. If it could, it would provide the very nice feature of making all of the ontology-related things that Noctua needs be delivered directly from Minerva. This makes testing, coherence, maintenance and long term understanding easier.

kltm commented 4 years ago

@goodb It's possible, but I'm honestly a little dubious, as I think that things like wildcards (exact matches over partial matches), weighted search against different fields (label and synonyms), and facets/pins will still be needed and I'd like to avoid multiple AC sources if possible. That said, if you think that this could be an easy thing or a big win without starting to re-implement Solr, it can be explored a little.