glygener / glygen-issues

Repository for public GlyGen tickets
GNU General Public License v3.0
0 stars 0 forks source link

Explore (semi)targeted approaches for type ahead for simple and global search #513

Open ReneRanzinger opened 1 year ago

ReneRanzinger commented 1 year ago

This could look like this: Make list of fields that can contribute to type ahead (e.g. IDs, protein and disease names, etc,.) Performance is crucial.

rykahsay commented 7 months ago

We already have /typeahead/global_typeahead/

https://api.tst.glygen.org/typeahead/global_typeahead/?query={ "value": "brea", "limit": 10}

Currently, it is targeting which is targeting the following fields and we can add more (the more we add the slower it will be)

{
        "protein":{
            "uniprot_canonical_ac":{
                "type":"string"
            },
            "uniprot_id":{
                "type":"string"
            },
            "crossref.id":{
                "type":"objlist"
            },
            "protein_names.name":{
                "type":"objlist"
            },
            "gene_names.name":{
                "type":"objlist"
            },
            "refseq.ac":{
                "type":"objlist"
            },
            "publication.reference.id":{
                "type":"objlistobjlist"
            },
            "disease.synonyms.name":{
                "type":"objlistobjlist"
            },
            "disease.recommended_name.name":{
                "type":"objlist"
            },
            "go_annotation.categories.go_terms.id":{
                "type":"goterms"
            },
            "go_annotation.categories.go_terms.name":{
                "type":"goterms"
            }
        },
        "glycan":{
            "glytoucan_ac":{"type":"string"},
            "crossref.id":{
                "type":"objlist"
            },
            "enzyme.uniprot_canonical_ac":{
                "type":"objlist"
            },
            "enzyme.gene":{
                "type":"objlist"
            },
            "motifs.name":{
                "type":"objlist"
            },
            "publication.reference.id":{
                "type":"objlistobjlist"
            }
        },
    "enzyme":{
            "gene_names.name":{"type":"objlist"},
            "uniprot_canonical_ac":{"type":"objlist"},
            "pathway.id":{"type":"objlist"},
            "pathway.name":{"type":"objlist"}
        },
        "motif":{
            "glytoucan_ac":{"type":"string"},
            "names.name":{"type":"objlist"}
        },
        "disease":{
            "disease_id":{"type":"objlist"},
            "recommended_name.id":{"type":"objlist"},
            "synonyms.name":{"type":"objlist"},
            "recommended_name.name":{"type":"objlist"}
        }   
}
ReneRanzinger commented 7 months ago

@rykahsay the explore here is about performance for both:

So, does simple search type ahead exist? How performant is global type ahead? REgarding the list of fields to address we can bring this up on a WEndesday meeting.

rykahsay commented 2 weeks ago

@seankim658 ... when you get a chance, can you please explore this performance issue