Open jennydaman opened 3 years ago
https://github.com/FNNDSC/ChRIS_store/blob/e534438069449a160259d5de1381216fe8416b5b/store_backend/plugins/models.py#L186-L244
Currently, only a few search queries are supported. By the looks of it, these are
https://github.com/FNNDSC/ChRIS_store/blob/e534438069449a160259d5de1381216fe8416b5b/store_backend/plugins/models.py#L241-L244
These options are sufficient for most use cases. However there are some fields, such as author, which currently are not searchable.
author
More fields should be searchable, and individually searchable.
It would be a pain to implement the cross-product of fields as specific query-string options e.g. name_title_category. A preferred paradigm would be:
name_title_category
GET /api/v1/plugins/search/?name=fetal&title=fetal&category=fetal
Moreover, it should be possible to define the boolean operations to apply on search terms. Maybe this would look like
GET /api/v1/plugins/search/?q=(title%3D%22fetal%22ORname%3D%22fetal%22)ANDauthor%3D%22fetal%22
An advanced implementation of search queries might use a search engine like ElasticSearch.
https://github.com/FNNDSC/ChRIS_store/blob/e534438069449a160259d5de1381216fe8416b5b/store_backend/plugins/models.py#L186-L244
Currently, only a few search queries are supported. By the looks of it, these are
https://github.com/FNNDSC/ChRIS_store/blob/e534438069449a160259d5de1381216fe8416b5b/store_backend/plugins/models.py#L241-L244
These options are sufficient for most use cases. However there are some fields, such as
author
, which currently are not searchable.More fields should be searchable, and individually searchable.
It would be a pain to implement the cross-product of fields as specific query-string options e.g.
name_title_category
. A preferred paradigm would be:Moreover, it should be possible to define the boolean operations to apply on search terms. Maybe this would look like
GET /api/v1/plugins/search/?q=(title%3D%22fetal%22ORname%3D%22fetal%22)ANDauthor%3D%22fetal%22
An advanced implementation of search queries might use a search engine like ElasticSearch.