biothings / mychem.info

MyChem.info: A BioThings API for chemical/drug annotations
http://mychem.info
Apache License 2.0
16 stars 14 forks source link

pharmgkb.type field should be indexed as a keyword #52

Closed newgene closed 5 years ago

newgene commented 5 years ago

This line: https://github.com/biothings/mychem.info/blob/a4f8d50040030adb4c0934bdd27cfb868477cbb5/src/hub/dataload/sources/pharmgkb/pharmgkb_upload.py#L74-L76

The values of pharmgkb.type field look like just "Drug" and "Prodrug", better to index it as keyword. Is it somehow recognized in the inspector as "text" field?

sirloon commented 5 years ago

@newgene that line shows "pharmgkb.type", not "drugbank.type". As for the inspection, yes pharmgkb.type is recognized as text, not keyword

newgene commented 5 years ago

@sirloon you are right. It's my typo, should be "pharmgkb.type" field. Just updated.

Why it's a text field, does the inspector see a value with whitespaces?

newgene commented 5 years ago

Possible values for "pharmgkb.type":

['Drug', 
 'Drug Class', 
 'Drug,"Biological Intermediate"', 
 'Drug,"Ion"', 
 'Drug,"Metabolite"',
 'Prodrug']

Keep this field as "text" and close this issue.