We've talked about app-ui search issues and PathwayCommons/app-ui#272 with @d2fong, @maxkfranz, @jvwong and realised the following.
Let's get rid of the (obsolete, forgotten) toggle Lucene escape feature but keep (and fix) the escape Lucene function - and create three different full-text search functions in this PC client library:
- phraseSearch(q) - would submit the input string q to the web service (literally, using double quotes around it, or, alternatively, submit as
*Q*, where Q is escaped/sanitised input phrase);
- luceneSearch(q) - would not touch the query string (Lucene query expression) besides applying standard url-encoding (in case of HTTP GET request); and we in fact want this one in app-ui (which analyses user input and builds more relevant Lucene expressions internally);
- keywordSearch(q) - would split 'q' into tokens (by
\s+) - "a", "b", "c",..; escape each (sanitises); then, call luceneSearch("*a* OR *b* OR *c*...")...
Also, keywordSearch and phraseSearch could have optional parameters, such as index 'field' (prefix) and 'exact' (true/false) to specifically search as, e.g., phraseSearch("q","name", false) would be equivalent to wildcard search in 'name' index: luceneSearch("name:*Q*"), where Q is escaped q.
We've talked about app-ui search issues and PathwayCommons/app-ui#272 with @d2fong, @maxkfranz, @jvwong and realised the following.
Let's get rid of the (obsolete, forgotten) toggle Lucene escape feature but keep (and fix) the escape Lucene function - and create three different full-text search functions in this PC client library:
*Q*, where Q is escaped/sanitised input phrase);\s+) - "a", "b", "c",..; escape each (sanitises); then, callluceneSearch("*a* OR *b* OR *c*...")...Also, keywordSearch and phraseSearch could have optional parameters, such as index 'field' (prefix) and 'exact' (true/false) to specifically search as, e.g.,
phraseSearch("q","name", false)would be equivalent to wildcard search in 'name' index:luceneSearch("name:*Q*"), where Q is escaped q.