Given a query string, return the top k hits from the ontology search index.
The search index is built from the ontology terms' names and synonyms, where names are weighted more heavily than synonyms. The search uses the BM25+ algorithm to rank the results.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Build the doc_text column for BM25 indexing from the name and synonyms.
See the NAME_WEIGHT and SCOPE_WEIGHTS constants for how parts of the record are weighted in the resulting document.
Per the OBO 1.4 spec, synonyms can have scopes in {EXACT, BROAD, NARROW, RELATED}. If no scope is given, it is treated as RELATED.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Bases: TypedDict
Storage of synonyms and their scope.
| Attributes: |
|
|---|