PathwayCommons / cpath2

Biological pathway data integration and access platform (Pathway Commons)
http://www.pathwaycommons.org/pc2/
MIT License
6 stars 5 forks source link

ChEBI IDs do not work for 'get' (and perhaps 'graph') queries #259

Closed IgorRodchenkov closed 7 years ago

IgorRodchenkov commented 7 years ago

The catch: "... I am trying to make ChEBI IDs work in get, and it doesn’t seem to. For example the following query. (http://www.pathwaycommons.org/pc2/get?uri=CHEBI:16236) returns nothing found. Am I doing something wrong? Thanks, Manfred"... And, e.g., http://www.pathwaycommons.org/pc2/graph?kind=neighborhood&source=CHEBI:16236 does not return any data either (escaping/encoding ':' in the parameter value does not help,.. and should not...)

After looking into the code (e.g., here) and experimenting with 'search' queries, it seems there is a bug/flaw in the internal id-to-uri mapping (by full-text search) logic: despite xref IDs get indexed properly ('xrefid' is a "not analyzed" string index field), more care has be taken (e.g., using a different query parser/analyser or escaping special symbols) when building/parsing such full-text search query strings that involve such IDs as ChEBI (with ':' in them) and index field name, such as 'xrefid'...