-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shanoir-issue#2307: solr search detects keywords and switch to expertMode #2434
shanoir-issue#2307: solr search detects keywords and switch to expertMode #2434
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think that this features and the toggle switch doesn't work well together. Maybe we should remove the toggle switch. But also I think the solr syntax detection system is too weak. I think there may be requests that doesn't include any field name.
I have found a code for checking the solr syntax that I adapted to Shanoir, see my branch https://github.com/julien-louis/shanoir-ng/blob/solr-syntax-check/shanoir-ng-front/src/app/solr/text-search/solrValidator.ts
Let's discuss this with @michaelkain
shanoir-ng-front/src/app/solr/text-search/solr.text-search-mode.component.ts
Outdated
Show resolved
Hide resolved
@pierrehenri-dauvergne So for now let's keep the button and automatically switch to expert mode but not go back automatically to normal mode. |
…when not detecting keywords
…auvergne/shanoir-ng into shanoir-issue#2307
How to test:
Open solr
In the search field at the top, write one of the keywords of expertMode: centerName datasetCreationDate studyName subjectName subjectType acquisitionEquipmentName datasetId datasetName datasetNature datasetType processed examinationComment examinationDate importDate tags magneticFieldStrength pixelBandwidth sliceThickness studyId
As soon as you write any of those keyword, the research automatically switch to expertMode:
This PR also changes the syntax error message to display something more accurate: