uniprot / enzymeportal

The EBI Enzyme Portal
http://www.ebi.ac.uk/enzymeportal/
Apache License 2.0
11 stars 4 forks source link

Results unrelated to query #203

Open rafael-alcantara opened 10 years ago

rafael-alcantara commented 10 years ago

This seems to happen randomly. Today I searched for alzheimer and got results for ehlers-danlos syndrome. Last week I made a chemical structure search and got results for cadasil (look at the location bar and the search box): ep-search

rafael-alcantara commented 10 years ago

SearchController is using now some instance fields - isCustomSearch, pathVariable - which are set for enzyme browsing. SearchController is a singleton (default for spring beans), so once a user makes a request which sets isCustomSearch to true, it remains for every subsequent requests of any user. This may be related to the issue.

rafael-alcantara commented 10 years ago

Now I searched for alzheimer in the four servers. Two of them gave the right results, one of them returned results for cadasil, the other for URIDINE 5-PRIME MONOPHOSPHATE HYDROLASE DEFICIENCY, HEMOLYTIC ANEMIA DUE TO.

rafael-alcantara commented 10 years ago

The unexpected results seem to be always disease names present in our database.

The only way of changing the search term is using SearchParams.setText, which is called by customSearch (SearchController.java:338). customSearch is only called (line 749) when the flag isCustomSearch is set to true. This happens in two places: when requesting a /ecnumber URL (line 406, not in the current version of the web application) or when requesting a /search/{id} URL.

Searching for the latter in the access logs, and using id=266120 or id=D046589 (haemolitic anemia and cadasil, respectively) I found this has been called recently:

172.18.5.2 - - [02/Feb/2014:22:05:36 +0000] "GET /enzymeportal/search/266120 HTTP/1.0" 302 - "-" "EBISearch/Nutch-1.6 (EBI search crawler; es-request@ebi.ac.uk)"
172.18.5.2 - - [02/Feb/2014:22:05:36 +0000] "GET /enzymeportal/search/D046589 HTTP/1.0" 302 - "-" "EBISearch/Nutch-1.6 (EBI search crawler; es-request@ebi.ac.uk)"

So it seems it is the EBI search crawler who is calling these URLs, hence setting the flag for custom search, the pathVariable to the disease ID and breaking subsequent searches, which return results for that disease.