eGT-Labs / egt-gsa-proto

This will be the repo for Pool 2 - GSA Agile Delivery Services Prototype
0 stars 0 forks source link

Facet with slash in name fails #13

Closed jehanson closed 9 years ago

jehanson commented 9 years ago

http://localhost:9000/label-search?facet.pharm_class_cs=Nucleoside%20Analog%20%5BChemical%2FIngredient%5D

jehanson commented 9 years ago

the slash in this name is where I discovered the problem: Nucleoside Analog [Chemical/Ingredient]

jehanson commented 9 years ago

Link to line ine openfda's code that causes the problem. Our querystring needs to match this pattern or it blows up: https://github.com/FDA/openfda/blob/master/api/faers/elasticsearch_query.js#L19

var SUPPORTED_QUERY_RE = '^[0-9a-zA-Z\.\_\:\(\)\"\\[\\]\{\}\\-\\+\>\<\= ]+$';