ft:search and using thesaurus
Thursday, 14 January 2016 · 2 messages · last reply 16 Jan 2016
GD
Günter Dunz-Wolff14 Jan 2016 15:50 #
Hi all, hi Christian,
for a flexible search I want to use this programatic approach:
let $ft := map { 'wildcards': true() }
let $terms := 'Pa.*'
for $city in ft:search('factbook', $terms, $ft)/parent::name[ancestor::city]
let $hits := ft:mark($city[ft:contains(text(), $terms, $ft)])
return
let $name := $city/ancestor::country/name
return ($hits, $name)How could I integrate 'using thesaurus at "thesaurus.xml"', unfortunately thesaurus is not part of the $options argument of
ft:search.
Cheers, GünterCG
Christian Grün16 Jan 2016 18:13 #
I’ve just added a new issues for your features request [1].
Cheers,
Christian
[1] https://github.com/BaseXdb/basex/issues/1244
Quoted text · Günter Dunz-Wolff · 17 lines
On Thu, Jan 14, 2016 at 3:50 PM, Günter Dunz-Wolff <kleist at mail.dunzwolff.de> wrote: > Hi all, hi Christian, > > for a flexible search I want to use this programatic approach: > > let $ft := map { 'wildcards': true() } > let $terms := 'Pa.*' > for $city in ft:search('factbook', $terms, $ft)/parent::name[ancestor::city] > let $hits := ft:mark($city[ft:contains(text(), $terms, $ft)]) > return > let $name := $city/ancestor::country/name > return ($hits, $name) > > How could I integrate 'using thesaurus at "thesaurus.xml"', unfortunately thesaurus is not part of the $options argument of ft:search. > > Cheers, Günter
Written for BaseX 8.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery