MassBank / MassBank-web

The web server application and directly connected components for a MassBank web server
14 stars 22 forks source link

Enhancement of search #52

Open tsufz opened 7 years ago

tsufz commented 7 years ago

Implement full text search and replace quick search template, needs #9

Treutler commented 6 years ago

There are further wishes regarding enhanced search capabilities:

sneumann commented 6 years ago

Hi @fgiacomoni, as you are working on https://github.com/workflow4metabolomics/wrapper-bank-massbank-spectrum_search we can show you which of the above points we have already looked at. Yours, Steffen

fgiacomoni commented 6 years ago

Hi @sneumann - thank you for the update. Available if needed. Just in case, the above listing is more from Pierrick @pkrog. Yours, Franck

pkrog commented 6 years ago

HI @sneumann , Franck is right, these features are more of interest for my R library biodb, which I will use to enhance my lcmsmatching tool for Galaxy and eventually write other tools for querying databases. I'm very interested in any progress you can make on these requests, especially since Massbank Japan is out of order. Indeed my library was taking advantage of the possibility offered by Massbank Japan to download the whole database. As far as I know, this possibility doesn't exist with Massbank Europe, so a set of adequate requests would replace advantageously this loss.

sneumann commented 6 years ago

Hi, on the contrary: we have recently established https://github.com/MassBank/MassBank-data which is the primary data source for the upcoming MassBank software. So all your data is only a git clone or even a Download of the ZIP away. Does that help ? Yours, Steffen

pkrog commented 6 years ago

Hi Steffen,

Yes, that helps, it looks great. I'll update my library as soon as possible.

Cheers,

Pierrick

On 12 June 2018 at 11:49 pm, sneumann notifications@github.com wrote:

Hi, on the contrary: we have recently established https://github.com/MassBank/MassBank-data which is the primary data source for the upcoming MassBank software. So all your data is only a git clone or even a Download of the ZIP away. Does that help ? Yours, Steffen

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

sneumann commented 5 years ago

Hi, I recently met Abdullah Almasaeed from University of Tennessee Knoxville, and he provided us with teh following suggestion:

I took a quick look at your data and I think the following guide could be helpful in getting you started and seeing results quickly.

  1. Install ES: https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html
  2. Create an index: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
    • Note: you do not need to specify the data mappings. ES 6 can auto detect everything. So simply run the following to create an index named "data": curl -X PUT "localhost:9200/data"
  3. Create a script that can read your input files and inserts the data into ES. It looks like this is a simple "key: value” pairs so the index structure should also be simple. For each line insert data using the following curl command: curl -X POST "localhost:9200/data/_doc" -H 'Content-Type: application/json' -d'{"key": "KEY_HERE", "value": "VALUE_HERE"}'
  4. Now search is possible as such: curl -X GET "localhost:9200/data/_search" -H 'Content-Type: application/json' -d' { "query": { "simple_query_string" : { "query": "key:MY_KEY AND AND value:MY_VALUE", "default_operator": "AND" } } } ' Where MY_KEY and MY_VALUE are your search terms. E,g: "key:CH$NAME AND value:Naringenin"

Please let us know if you have any questions.

Thanks, Abdullah Almsaeed Research Associate Dept. of Entomology and Plant Pathology University of Tennessee Knoxville