chembl / chembl_webservices_2

Source code of the ChEMBL web services.
https://www.ebi.ac.uk/chembl/ws
Other
16 stars 3 forks source link

Document search query doesn't retreive the term searched #112

Closed Dgelemi closed 7 years ago

Dgelemi commented 7 years ago

I tried to get documents with the word activators, however, the /chembl/api/data/document/search?q=activators gives as 1st hit a document with no activators in the abstract or in the title. There is "activity" but that's not the query. If using "activators" as query, with quotes, it gives an error. I tried the "" because if I search for a string with 2 words, like secondary pocket, using secondary pocket itself gives all documents with the 2 words anywhere, but "secondary pocket" only gives the specific string (which is what I want) (the idea is to do what was done by the ChEMBL group here: http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003559

mnowotka commented 7 years ago

Hi, sorry for the late reply and thanks for reporting this. The "search" API call uses solr index to search in the full text and by default solr does a fuzzy search on text field with tokenization and stemming which makes sense in most cases.

However, if you want to do an exact search, I just enabled some more SQL-level filters that allow that so you can execute this API call to get exact (but case insensitive) results https://www.ebi.ac.uk/chembl/api/data/document.json?abstract__icontains=activators

If you want case sensitive results, just remove i in the filter name.