biothings / mydisease.info

7 stars 8 forks source link

too many results on Disease Ontology search #31

Closed andrewsu closed 3 years ago

andrewsu commented 3 years ago

In this API query: http://mydisease.info/v1/query?q=disease_ontology.doid=DOID\:0060369&fields=disease_ontology, I expect to get one item back (*). However, mydisease currently reports 11117 hits. The top hit is the correct item (good), but it's not clear why the others are returned.

(*) in relatively rare cases, two or more items for one DOID may be expected since we use MONDO as the primary key...

image
kevinxin90 commented 3 years ago

I suppose it's the query syntax: Tried using quotes("") around DOID, seems working fine: http://mydisease.info/v1/query?q=disease_ontology.doid="DOID:0060369"&fields=disease_ontology

andrewsu commented 3 years ago

Got it, thanks!

newgene commented 3 years ago

@andrewsu also want to note that in your original query for the q parameter, the : should be used instead of = between the field and its value. The following query works as expected:

http://mydisease.info/v1/query?q=disease_ontology.doid:DOID\:0060369&fields=disease_ontology