Skip to content
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

Merged
merged 11 commits into from
Nov 12, 2024

Conversation

pierrehenri-dauvergne
Copy link
Collaborator

@pierrehenri-dauvergne pierrehenri-dauvergne commented Oct 9, 2024

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:
image

This PR also changes the syntax error message to display something more accurate:
image

@pierrehenri-dauvergne pierrehenri-dauvergne added the REVIEWABLE Has to be reviewed label Oct 11, 2024
Copy link
Collaborator

@julien-louis julien-louis left a 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

@julien-louis
Copy link
Collaborator

@pierrehenri-dauvergne So for now let's keep the button and automatically switch to expert mode but not go back automatically to normal mode.

@julien-louis julien-louis merged commit c528f38 into fli-iam:develop Nov 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend REVIEWABLE Has to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Solr search] Auto-switch to expert mode when search field contain a facet field
2 participants