Closed stcoats closed 1 year ago
Heya! Sorry to disappoint, but that's not supported at the moment
There's some hardcoded stuff going on with the simple
search, think splitting multiple words into multiple []
cql tokens, regex escaping, and adding case-sensitivity modifiers. There's also differences between how selections in a dropdown vs a basic text input vs the n-gram search form is handled, etc.
It's somewhere on the list of little nags to take a look at and improve some time, but pretty low prio. I don't expect it will ever happen short of a full rework of the application.
Here's a little summary of how the query is generated in case you're interested:
actions
functions is called to update this data store.
It's basically a collection of objects, one for every input. Containing the input string, a boolean for the case-sensitivity checkbox, and also what kind of widget we're working with (dropdown, checkboxes, basic text input, etc.)submit
the values get copied into query.tsgetPatternString
which does the conversion for the CQL
part and getFilterString
for the metadata (lucene) filter. It checks which part of the form is active, and passes the relevant values over to a util function
You can see the different handling of inputs from the different parts of the main search form.Oh yeah, what you can do is replace the entire simple search widget with a custom input, but unfortunately its output will still be processed in the regular way, i.e. hacked up into words, regex-escaped and surrounced with cql brackets. https://github.com/INL/corpus-frontend#custom-js:~:text=Write%20your%20own%20(annotation)%20search%20fields
Okay, no worries. Thank you for the additional information -- if I have the time and energy I may dive into the typescript files and take a closer look!
Hoi!
I would like to be able to enter CQL searches directly into the default search ("Simple"), as has been done by a few of the sites that are using BlackLab, so that both
see
and[word="see"]
have the same results.This would make the "Expert" tab unnecessary - how can this be hidden? I understand that the "Advanced" tab can be removed with
vuexModules.ui.actions.search.advanced.enable(false)
, but the same syntax does not seem to remove the "Expert" tab.