Hi all, is there a possibility to match the query-parameters more directly to the $options argument of a ft:function? In the moment I have a rather complicated if-else-if-else-if…-scenario.
Example: if ($wildcards = "on" and $all = "on" and $case_sensitive = "on" and $using_diacritics = "on") then $collection[.//text() contains text {$query} all words using case sensitive using diacritics sensitive using wildcards] else if and so on.
Depending on query-params I want to build the ft:function with $options argument more directly. (But for example string-concatenation doesn’t work.)
Thanks for any advice.
Guenter
Hi Günter,
The function ft:search [1] was added to BaseX to fill this shortcoming of the official spec.
Hope this helps Christian
[1] https://docs.basex.org/wiki/Full-Text_Module#ft:search
On Mon, Sep 28, 2020 at 11:06 AM Günter Dunz-Wolff guenter.dunzwolff@gmail.com wrote:
Hi all, is there a possibility to match the query-parameters more directly to the $options argument of a ft:function? In the moment I have a rather complicated if-else-if-else-if…-scenario.
Example: if ($wildcards = "on" and $all = "on" and $case_sensitive = "on" and $using_diacritics = "on") then $collection[.//text() contains text {$query} all words using case sensitive using diacritics sensitive using wildcards] else if and so on.
Depending on query-params I want to build the ft:function with $options argument more directly. (But for example string-concatenation doesn’t work.)
Thanks for any advice.
Guenter
Hi Christian, thanks for your help. Is there a way to combine ft:search with ft:mark, cause at the end I need the results marked. Kind regards Guenter
Am 05.10.2020 um 09:30 schrieb Christian Grün christian.gruen@gmail.com:
Hi Günter,
The function ft:search [1] was added to BaseX to fill this shortcoming of the official spec.
Hope this helps Christian
[1] https://docs.basex.org/wiki/Full-Text_Module#ft:search
On Mon, Sep 28, 2020 at 11:06 AM Günter Dunz-Wolff guenter.dunzwolff@gmail.com wrote:
Hi all, is there a possibility to match the query-parameters more directly to the $options argument of a ft:function? In the moment I have a rather complicated if-else-if-else-if…-scenario.
Example: if ($wildcards = "on" and $all = "on" and $case_sensitive = "on" and $using_diacritics = "on") then $collection[.//text() contains text {$query} all words using case sensitive using diacritics sensitive using wildcards] else if and so on.
Depending on query-params I want to build the ft:function with $options argument more directly. (But for example string-concatenation doesn’t work.)
Thanks for any advice.
Guenter
basex-talk@mailman.uni-konstanz.de