Hippocampome-Org / php

Hippocampome web portal
3 stars 2 forks source link

K1M: [search] Differences between the results of API access to search engine and direct website access #341

Closed k1moradi closed 7 years ago

k1moradi commented 7 years ago

The following search queries provides correct results on the website but not with API:

Connection:(Presynaptic:(Neurotransmitter:Inhibitory AND Morphology:(Dendrites:DG:2222 AND Axons:DG:0010) AND Markers:(I+:PV OR D+:PV)), Postsynaptic:(Morphology:(Dendrites:DG:2222 AND Axons:DG:0010) AND Markers:(I+:PV OR D+:PV)))

Expected result: 1035:DG Basket -> 1035:DG Basket

Connection:(Presynaptic:(Neurotransmitter:Inhibitory AND Morphology:(Soma:DG:00?? NOT Soma:DG:0000) AND Electrophysiology:(Rin:<350.62 AND Rin:>1.38) AND Markers:(D+:SOM OR I+:SOM)), Postsynaptic:(Morphology:(Soma:DG:00?? NOT Soma:DG:0000) AND Electrophysiology:(Rin:<180.17 AND Rin:>0.03)))

Expected result: 1013:HIPP ->1000:Granule 1013:HIPP ->1010:DG Axo-axonic 1013:HIPP ->1035:DG Basket

k1moradi commented 7 years ago

Cause: <>+ is not allowed in URIs. Solution: .replace(/>/g,'%3E').replace(/</g,'%3C').replace(/+/g,'%2B')